get_sun_fraction Function

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

Compute the "sun fraction" using the circular cubic shadow model.

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 proc~apparent_position apparent_position proc~get_sun_fraction->proc~apparent_position proc~cubic_shadow_model cubic_shadow_model proc~get_sun_fraction->proc~cubic_shadow_model proc~from_j2000moon_to_j2000ssb from_j2000moon_to_j2000ssb proc~get_sun_fraction->proc~from_j2000moon_to_j2000ssb axis_angle_rotation axis_angle_rotation proc~apparent_position->axis_angle_rotation cross cross proc~apparent_position->cross proc~get_pos get_pos proc~apparent_position->proc~get_pos unit unit proc~apparent_position->unit acosd acosd proc~cubic_shadow_model->acosd asind asind proc~cubic_shadow_model->asind proc~cubic_shadow_model->unit wrap_angle wrap_angle proc~cubic_shadow_model->wrap_angle icrf_frame icrf_frame proc~from_j2000moon_to_j2000ssb->icrf_frame transform transform proc~from_j2000moon_to_j2000ssb->transform get_r get_r proc~get_pos->get_r get_rv get_rv proc~get_pos->get_rv

Called by

proc~~get_sun_fraction~~CalledByGraph proc~get_sun_fraction get_sun_fraction proc~generate_eclipse_data mission_type%generate_eclipse_data proc~generate_eclipse_data->proc~get_sun_fraction proc~halo_solver_main halo_solver_main proc~halo_solver_main->proc~generate_eclipse_data

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_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