a ballistic segment in the mission
t0, tf', andx0_rotating`.xf, xf_rotating| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=:), | public, | allocatable | :: | name |
the segment name |
||
| type(segment_data), | public | :: | data | ||||
| type(segment_data), | public | :: | cached_data |
used when computing gradients |
|||
| type(geopotential_model_pines), | public, | pointer | :: | grav | => | null() |
central body geopotential model |
| class(jpl_ephemeris), | public, | pointer | :: | eph | => | null() |
the ephemeris |
| type(moon_pa_frame), | public, | pointer | :: | moon_pa | => | null() |
the moon_pa frame interpolater (its workspace: the splines are shared) |
| logical, | public | :: | pointmass_central_body | = | .false. | ||
| logical, | public | :: | include_pointmass_earth | = | .true. |
if true, earth is included as a pointmass in the force model |
|
| logical, | public | :: | include_pointmass_sun | = | .true. |
if true, sun is included as a pointmass in the force model |
|
| logical, | public | :: | include_pointmass_jupiter | = | .false. |
if true, jupiter is included as a pointmass in the force model |
|
| procedure(third_body_grav_f), | public, | pointer, nopass | :: | third_body_gravity | => | null() |
procedure used to compute 3rd body gravity |
| logical, | public | :: | stm_mode | = | .false. |
if true, the integrator state includes the state transition matrix (6 + 36 = 42 variables), and the Pines gravity routine (with its gradient) is used. |
|
| logical, | public | :: | soft_fail | = | .false. |
if true, an integrator failure sets |
|
| logical, | public | :: | failed | = | .false. |
with |
|
| logical, | public | :: | always_stm | = | .false. |
if true (with |
|
| logical, | public | :: | compute_stm | = | .false. |
if true (during propagate_segment_stm), the STM is integrated (otherwise its derivatives are zero) |
|
| real(kind=wp), | public | :: | t_offset | = | 0.0_wp |
[sec from epoch] start of the segment while it is integrated:
the integrator's time is local, from 0 at |
|
| real(kind=wp), | public, | dimension(6,6) | :: | dxf_dx0 | = | zero |
d(xf_rotating)/d(x0_rotating) |
| real(kind=wp), | public, | dimension(6) | :: | dxf_dt0 | = | zero |
d(xf_rotating)/d(t0) [per second], at fixed |
| real(kind=wp), | public, | dimension(6) | :: | dxf_dtf | = | zero |
d(xf_rotating)/d(tf) [per second] |
| type(trajectory), | public | :: | traj_inertial |
in the inertial frame (j2000-moon) |
|||
| type(trajectory), | public | :: | traj_rotating |
in the rotating frame (moon-earth, moon-centered) |
|||
| type(trajectory), | public | :: | traj_se_rotating |
in the rotating frame (sun-earth, earth-centered) |
Sets all the info in a segment for it to be propagated.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(in) | :: | t0 |
[days] |
||
| real(kind=wp), | intent(in) | :: | tf |
[days] |
||
| real(kind=wp), | intent(in), | dimension(6) | :: | x0_rotating |
state in rotating frame |
Gets the initial states of a segment
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(in) | :: | me | |||
| real(kind=wp), | intent(out), | optional | :: | t0 | ||
| real(kind=wp), | intent(out), | optional, | dimension(6) | :: | x0_rotating |
rotating frame |
After propagating a segment, this gets the outputs.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(in) | :: | me | |||
| real(kind=wp), | intent(out), | optional, | dimension(6) | :: | xf |
inertial frame |
| real(kind=wp), | intent(out), | optional, | dimension(6) | :: | xf_rotating |
rotating frame |
| real(kind=wp), | intent(out), | optional, | dimension(6) | :: | x0_rotating |
Set the outputs of a segment, assuming it has been propagated elsewhere
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(in), | dimension(6) | :: | xf |
inertial frame |
|
| real(kind=wp), | intent(in), | dimension(6) | :: | xf_rotating |
inertial frame |
Propagate a segment (assumes the inputs have already been populated)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(inout) | :: | me | |||
| integer, | intent(in), | optional | :: | mode |
1 - don't report steps, 2 - report steps (for plotting) |
|
| real(kind=wp), | intent(in), | optional | :: | tstep |
fixed time step for mode=2 |
Propagate a segment with its state transition matrix, and compute the analytic
partials of its final rotating-frame state (for jacobian_mode=2):
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(inout) | :: | me |
Set all the data in a segment.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(segment), | intent(inout) | :: | me | |||
| type(segment_data), | intent(in) | :: | d |
type,extends(ddeabm_class) :: segment !! a ballistic segment in the mission !! !! * central body is the Moon (8x8 gravity), !! with Earth and Sun as third-bodies. !! * Inputs are: `t0`, `tf', and `x0_rotating`. !! * Output are: `xf`, `xf_rotating` character(len=:),allocatable :: name !! the segment name type(segment_data) :: data type(segment_data) :: cached_data !! used when computing gradients ! These can be pointers that are pointing to the global ones in the mission, ! Or, when using OpenMP, they are allocated in each segment. type(geopotential_model_pines),pointer :: grav => null() !! central body geopotential model class(jpl_ephemeris),pointer :: eph => null() !! the ephemeris type(moon_pa_frame),pointer :: moon_pa => null() !! the moon_pa frame interpolater (its workspace: the splines are shared) logical :: pointmass_central_body = .false. logical :: include_pointmass_earth = .true. !! if true, earth is included as a pointmass in the force model logical :: include_pointmass_sun = .true. !! if true, sun is included as a pointmass in the force model logical :: include_pointmass_jupiter = .false. !! if true, jupiter is included as a pointmass in the force model procedure(third_body_grav_f),pointer,nopass :: third_body_gravity => null() !! procedure used to compute 3rd body gravity ! for the analytic partials (`jacobian_mode=2`): logical :: stm_mode = .false. !! if true, the integrator state includes the !! state transition matrix (6 + 36 = 42 variables), !! and the Pines gravity routine (with its gradient) is used. logical :: soft_fail = .false. !! if true, an integrator failure sets `failed` instead of stopping the !! program (for the trial points of the eclipse optimization) logical :: failed = .false. !! with `soft_fail`: the last propagation failed (its outputs are not valid) logical :: always_stm = .false. !! if true (with `func_with_stm`), [[propagate_segment]] also integrates !! the STM, so that every propagation takes the same steps as !! [[propagate_segment_stm]] logical :: compute_stm = .false. !! if true (during [[propagate_segment_stm]]), the STM !! is integrated (otherwise its derivatives are zero) real(wp) :: t_offset = 0.0_wp !! [sec from epoch] start of the segment while it is integrated: !! the integrator's time is local, from 0 at `t0`, so that its !! precision does not depend on how far the segment is from !! `et_ref` (the derivative and report functions add it back). !! zero otherwise. real(wp),dimension(6,6) :: dxf_dx0 = zero !! d(xf_rotating)/d(x0_rotating) real(wp),dimension(6) :: dxf_dt0 = zero !! d(xf_rotating)/d(t0) [per second], at fixed `tf` real(wp),dimension(6) :: dxf_dtf = zero !! d(xf_rotating)/d(tf) [per second] ! for saving the trajectory for plotting: type(trajectory) :: traj_inertial !! in the inertial frame (j2000-moon) type(trajectory) :: traj_rotating !! in the rotating frame (moon-earth, moon-centered) type(trajectory) :: traj_se_rotating !! in the rotating frame (sun-earth, earth-centered) contains procedure,public :: set_input => set_segment_inputs procedure,public :: get_inputs => get_segment_inputs procedure,public :: get_outputs => get_segment_outputs procedure,public :: set_outputs => set_segment_outputs procedure,public :: propagate => propagate_segment procedure,public :: propagate_stm => propagate_segment_stm procedure :: cache procedure :: uncache procedure :: put_data_in_segment end type segment