ISS Eclipse Determination

Julia Astrodynamics

Determining how much sunlight a body is receiving.

Anson Biggs https://ansonbiggs.com
04-01-2021

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 with no solar radiation to power the solar panels and keep the spacecraft from freezing.

What is an Eclipse

Geometry of an Eclipse
Body Radius’s and Position Vectors

The Code

Show code
using Unitful
using LinearAlgebra
using SatelliteToolbox
using Plots
using Colors
theme(:ggplot2)
ISS = tle"""
ISS (ZARYA)
1 25544U 98067A   21103.84943184  .00000176  00000-0  11381-4 0  9990
2 25544  51.6434 300.9481 0002858 223.8443 263.8789 15.48881793278621
"""
orbit = init_orbit_propagator(Val(:twobody), ISS[1]);
time = 0:0.1:((24 / ISS[1].n) .* 60 * 60);
o, r, v = propagate!(orbit, time);
function sunlight(Rbody, r_sun_body, r_body_sc)
    Rsun = 695_700u"km"
    
    hu = Rbody * norm(r_sun_body) / (Rsun - Rbody)
    
    θe = acos((r_sun_body ⋅ r_body_sc) / (norm(r_sun_body) * norm(r_body_sc)))

    θu = atan(Rbody / hu)
    du = hu * sin(θu) / sin(θe + θu)

    θp = π - atan(norm(r_sun_body) / (Rsun + Rbody))
    dp = Rbody * sin(θp) / cos(θe - θp)

    S = 1
    if (θe < π / 2) && (norm(r_body_sc) < du)
        S = 0
    end
    if (θe < π / 2) && ((du < norm(r_body_sc)) && (norm(r_body_sc) < dp))
        S = (norm(r_body_sc .|> u"km") - du) / (dp - du) |> ustrip
    end

    return S
end
S = r .|> R -> sunlight(6371u"km", [0.5370, 1.2606, 0.5466] .* 1e8u"km", R .* u"m")

Plotting the Results

Show code
light_range = range(colorant"black", stop = colorant"yellow", length = 101);
light_colors = [light_range[unique(round(Int, 1 + s * 100))][1] for s in S];

plot(
    LinRange(0, 24, length(S)),
    S .* 100,
    linewidth = 5,
    legend = false,
    color = light_colors,
);

xlabel!("Time (hr)");
ylabel!("Sunlight (%)");
title!("ISS Sunlight Over a Day")
Rocket Motor Data: [@thrustcurve]

Figure 1: Rocket Motor Data: [@thrustcurve]

Corrections

If you see mistakes or want to suggest changes, please create an issue on the source repository.

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://gitlab.com/lander-team/air-prop-simulation, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Biggs (2021, April 1). Anson's Projects: ISS Eclipse Determination. Retrieved from https://projects.ansonbiggs.com/posts/2021-04-14-iss-eclipse-determination/

BibTeX citation

@misc{biggs2021iss,
  author = {Biggs, Anson},
  title = {Anson's Projects: ISS Eclipse Determination},
  url = {https://projects.ansonbiggs.com/posts/2021-04-14-iss-eclipse-determination/},
  year = {2021}
}