1
0
mirror of https://gitlab.com/Anson-Projects/projects.git synced 2025-07-23 06:31:35 +00:00

Update julia

This commit is contained in:
2024-03-11 05:27:38 +00:00
parent 1d205652a3
commit fceed3189a
12 changed files with 1139 additions and 309 deletions

View File

@@ -18,10 +18,8 @@ format:
html:
code-tools: true
code-fold: false
kernel:
id: julia-1.4
project: ../../
freeze: true
jupyter: julia-1.10
freeze: auto
---
Determining the eclipses a satellite will encounter is a major driving factor when designing a mission in space. Thermal and power budgets have to be made with the fact that a satellite will periodically be in the complete darkness of space where it will receive no solar radiation to power the solar panels and keep the spacecraft from freezing.
@@ -62,13 +60,14 @@ ISS (ZARYA)
Now that we have the TLE, we can pass that into SatelliteToolbox's orbit propagator. Before propagating the orbit, we need to have a range of time steps to pass into the propagator. The TLE gives the mean motion, n, which is the revolutions per day, so using that, we can calculate the amount of time required for one orbit, which is all that we're worried about for this analysis. The propagator returns a tuple containing the Orbital elements, a position vector with units meters, and a velocity vector with units meters per second. For this analysis were only worried about the position vector.
```{julia mean-motion, result='show'}
ISS[1].n
ISS.mean_motion
```
```{julia orbit-propagation}
orbit = init_orbit_propagator(Val{:twobody}, ISS[1]);
time = 0:0.1:((24/ISS[1].n).*60*60); # ISS[1].n gives the mean motion, or orbits per day.
o, r, v = propagate!(orbit, time);
orbit = Propagators.init(Val(:SGP4), ISS);
time = 0:0.1:((24/ISS.mean_motion).*60*60);
propagated = Propagators.propagate!.(orbit, time);
r = first.(propagated); # Get distance from propagator
```
We just need to use the radii and vectors discussed earlier to determine if the ISS is in the penumbra or umbra. This is a lot of trigonometry and vector math that I won't bore anyone with. However, using the diagrams above and following the code in the sunlight function, you should follow what's happening. For a rigorous discussion, check out [@vallado].