Transform a position (and optionally velocity) vector from LVLH to RSW.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(3) | :: | dr_lvlh |
Chaser LVLH position vector relative to target [km] |
|
real(kind=wp), | intent(in), | dimension(3) | :: | dv_lvlh |
Chaser LVLH position vector relative to target [km] |
|
real(kind=wp), | intent(out), | dimension(3) | :: | dr_rsw |
Chaser RSW position vector relative to target [km] |
|
real(kind=wp), | intent(out), | optional, | dimension(3) | :: | dv_rsw |
Chaser RSW velocity vector relative to target [km/s] |
subroutine from_lvlh_to_rsw_rv(dr_lvlh,dv_lvlh,dr_rsw,dv_rsw) implicit none real(wp),dimension(3),intent(in) :: dr_lvlh !! Chaser LVLH position vector relative to target [km] real(wp),dimension(3),intent(in) :: dv_lvlh !! Chaser LVLH position vector relative to target [km] real(wp),dimension(3),intent(out) :: dr_rsw !! Chaser RSW position vector relative to target [km] real(wp),dimension(3),intent(out),optional :: dv_rsw !! Chaser RSW velocity vector relative to target [km/s] dr_rsw(2) = dr_lvlh(1) dr_rsw(3) = -dr_lvlh(2) dr_rsw(1) = -dr_lvlh(3) if (present(dv_rsw)) then dv_rsw(2) = dv_lvlh(1) dv_rsw(3) = -dv_lvlh(2) dv_rsw(1) = -dv_lvlh(3) end if end subroutine from_lvlh_to_rsw_rv