Compute the "sun fraction" using the circular cubic shadow model.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(jpl_ephemeris), | intent(inout) | :: | eph |
the ephemeris |
||
real(kind=wp), | intent(in) | :: | et |
observer ephemeris time (sec) |
||
real(kind=wp), | intent(in), | dimension(6) | :: | rv |
state of the spacecraft !! (j2000-moon frame) |
|
real(kind=wp), | intent(in) | :: | rbubble |
eclipse bubble [km]. see the reference. |
circular cubic sun frac value.
0 no eclipse,
function get_sun_fraction(eph, et, rv, rbubble) result (phi) class(jpl_ephemeris),intent(inout) :: eph !! the ephemeris real(wp),dimension(6),intent(in) :: rv !! state of the spacecraft !! (j2000-moon frame) real(wp),intent(in) :: et !! observer ephemeris time (sec) real(wp),intent(in) :: rbubble !! eclipse bubble [km]. see the reference. real(wp) :: phi !! circular cubic sun frac value. !! !! * >0 no eclipse, !! * <0 eclipse, !! * =0 on the eclipse line logical :: status_ok !! true if no problems real(wp),dimension(3) :: r_sun !! apparent state of the sun (j2000-ssb frame) real(wp),dimension(3) :: r_earth !! apparent state of the earth (j2000-ssb frame) real(wp),dimension(6) :: rv_ssb !! state of the spacecraft !! (j2000-ssb frame) call from_j2000moon_to_j2000ssb(eph, et, rv, rv_ssb) ! state of spacecraft in j2000-ssb call apparent_position(eph, body_sun, et, rv_ssb, r_sun, status_ok) ! apparent position of sun in j2000 call apparent_position(eph, body_earth, et, rv_ssb, r_earth, status_ok) ! apparent position of earth in j2000 call cubic_shadow_model(r_sun, rad_sun, r_earth, rad_earth, phi, rbubble) ! compute sun fraction value end function get_sun_fraction