clc; clear all; %OBJECTIVE: Calculate Total Solar Panel Power Generation Per Orbit %accounting for Cubesat Rotation. %------------------------Preliminary Assumptions------------------------------ % 1. A single 1U of solar panel coverage generates approximately 2.323W % 2. This figure is dependent on 90 degree angle of incidence with the sun. % 3. This script addresses changes in angles of incidence with the sun, % because of CubeSat course adjustment rotations, with respect to power % generation. % 4. The script assumes satellite will neglect complex orbital dynamics, % assuming sail will remain perpendicular with Earth's surface unless rotated. %------------------------------Inputs----------------------------------------- %Indicate How many units of PV cell coverage flush with each side PVunitsFWD = 9; PVunitsAFT = 0; SatOrbitTime = 10; %Time it takes for Sat to orbit 180 degrees (hours) UnitPower = 2.323; %DO NOT EDIT %Array inidicates the angular displacement at that particular degree %during orbit on daytime half of Earth, corresponding to the Column index. %Negative angles correspond to a clockwise rotation. CourseAdj = zeros(1,180); %-------------------------------MAIN-------------------------------------------- UnitPower = UnitPower*(SatOrbitTime/180); Count = 0; FWDangleInc = 0; AFTangleInc = 0; FWDangleInc2 = 0; AFTangleInc2 = 0; Power = 0; for posDeg = 1:180 Count = Count + 1; if Count == 90 Count = 0; end FWDangleInc = FWDangleInc + (Count + CourseAdj(posDeg)); AFTangleInc = -1 * FWDangleInc; FWDangleInc2 = FWDangleInc; AFTangleInc2 = AFTangleInc; if FWDangleInc < 0 FWDangleInc2 = 0; end if AFTangleInc < 0 AFTangleInc2 = 0; end if FWDangleInc > 90 AFTangleInc2 = 180 - AFTangleInc; AFTangleInc = 180 - AFTangleInc; end if AFTangleInc > 90 AFTangleInc2 = 180 - AFTangleInc; AFTangleInc = 180 - AFTangleInc; end Power = Power + ((FWDangleInc2/90)*UnitPower*PVunitsFWD); Power = Power + ((AFTangleInc2/90)*UnitPower*PVunitsAFT); end kWhPower = (Power/1000)