get_sun_fraction Function

public function get_sun_fraction(eph, et, rv, rbubble) result(phi)

Compute the "sun fraction" for eclipses by the Earth, using the circular cubic shadow model (the apparent positions of the Sun and the Earth).

Arguments

Type IntentOptional 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.

Return Value real(kind=wp)

circular cubic sun frac value.

  • 0 no eclipse,

  • <0 eclipse,
  • =0 on the eclipse line

Calls

proc~~get_sun_fraction~~CallsGraph proc~get_sun_fraction get_sun_fraction apparent_position apparent_position proc~get_sun_fraction->apparent_position cubic_shadow_model cubic_shadow_model proc~get_sun_fraction->cubic_shadow_model from_j2000body_to_j2000ssb from_j2000body_to_j2000ssb proc~get_sun_fraction->from_j2000body_to_j2000ssb

Called by

proc~~get_sun_fraction~~CalledByGraph proc~get_sun_fraction get_sun_fraction proc~find_rows find_rows proc~find_rows->proc~get_sun_fraction proc~generate_eclipse_data mission_type%generate_eclipse_data proc~generate_eclipse_data->proc~get_sun_fraction proc~row_ks row_ks proc~row_ks->proc~get_sun_fraction proc~eclipse_optimize eclipse_optimize proc~eclipse_optimize->proc~find_rows proc~eval_rows eval_rows proc~eclipse_optimize->proc~eval_rows proc~newton_finish newton_finish proc~eclipse_optimize->proc~newton_finish proc~eval_rows->proc~row_ks proc~halo_solver_main halo_solver_main proc~halo_solver_main->proc~generate_eclipse_data interface~eclipse_optimize my_solver_type%eclipse_optimize proc~halo_solver_main->interface~eclipse_optimize interface~eclipse_optimize->proc~eclipse_optimize proc~eclipse_fc eclipse_fc proc~eclipse_fc->proc~eval_rows proc~eclipse_gjac eclipse_gjac proc~eclipse_gjac->proc~eval_rows proc~newton_finish->proc~eval_rows proc~newton_func newton_func proc~newton_finish->proc~newton_func proc~newton_func->proc~eval_rows proc~newton_grad newton_grad proc~newton_grad->proc~eval_rows

Source Code

    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_j2000body_to_j2000ssb(body_moon, 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