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