Update the variables for the reference epoch in the mission class. Either computes the et from the calendar state, or vice versa.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mission_type), | intent(inout) | :: | me |
subroutine update_epoch(me) implicit none class(mission_type),intent(inout) :: me select case (me%epoch_mode) case(1) ! compute reference epoch from the date (TDB): ! save this in the mission class me%et_ref = jd_to_et(julian_date(me%year,& me%month,& me%day,& me%hour,& me%minute,& me%sec)) case(2) ! then compute calendar from et call julian_date_to_calendar_date(et_to_jd(me%et_ref),& me%year,& me%month,& me%day,& me%hour,& me%minute,& me%sec) case default error stop 'error: epoch_mode must be 1 or 2.' end select end subroutine update_epoch