Processing math: 100%

relative_motion_module Module

This module contains various routines related to relative motion.

Axis systems

Three different axis systems are used here. They are:

  • The IJK frame

  • The LVLH frame, defined by:

    • x-axis : completes the right handed system (for a perfectly-circular orbit, the x-axis is ˆv)
    • y-axis : ˆh
    • z-axis : ˆr
  • The RSW frame, defined by:

    • x-axis : ˆr
    • y-axis : completes the right handed system (for a perfectly-circular orbit, the y-axis is ˆv)
    • z-axis : ˆh
  • The VUW frame, defined by:

    • x-axis : ˆv
    • y-axis : completes the right handed system
    • z-axis : ˆh

Uses

  • module~~relative_motion_module~~UsesGraph module~relative_motion_module relative_motion_module module~kind_module kind_module module~relative_motion_module->module~kind_module module~numbers_module numbers_module module~relative_motion_module->module~numbers_module iso_fortran_env iso_fortran_env module~kind_module->iso_fortran_env module~numbers_module->module~kind_module

Used by

  • module~~relative_motion_module~~UsedByGraph module~relative_motion_module relative_motion_module module~fortran_astrodynamics_toolkit fortran_astrodynamics_toolkit module~fortran_astrodynamics_toolkit->module~relative_motion_module

Interfaces

public interface from_ijk_to_lvlh

Conversion from IJK to LVLH

  • private subroutine from_ijk_to_lvlh_mat(mu, r, v, a, c, cdot)

    Author
    Jacob Williams
    Date
    4/19/2014

    Compute the transformation matrices to convert IJK to LVLH.

    See also

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: r

    position vector of target [km]

    real(kind=wp), intent(in), dimension(3) :: v

    velocity vector of target [km/s]

    real(kind=wp), intent(in), optional, dimension(3) :: a

    acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

    real(kind=wp), intent(out), dimension(3,3) :: c

    C transformation matrix

    real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

    CDOT transformation matrix

  • private subroutine from_ijk_to_lvlh_rv(mu, rt_ijk, vt_ijk, r_ijk, v_ijk, dr_lvlh, dv_lvlh)

    Author
    Jacob Williams
    Date
    8/23/2014

    Transform a position (and optionally velocity) vector from IJK to LVLH.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: rt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: vt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: r_ijk

    Chaser IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: v_ijk

    Chaser IJK absolute position vector [km]

    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]

public interface from_lvlh_to_ijk

Conversion from LVLH to IJK

  • private subroutine from_lvlh_to_ijk_mat(mu, r, v, a, c, cdot)

    Author
    Jacob Williams
    Date
    4/19/2014

    Compute the transformation matrices to convert LVLH to IJK.

    See also

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: r

    position vector of target [km]

    real(kind=wp), intent(in), dimension(3) :: v

    velocity vector of target [km/s]

    real(kind=wp), intent(in), optional, dimension(3) :: a

    acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

    real(kind=wp), intent(out), dimension(3,3) :: c

    C transformation matrix

    real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

    CDOT transformation matrix

  • private subroutine from_lvlh_to_ijk_rv(mu, rt_ijk, vt_ijk, dr_lvlh, dv_lvlh, r_ijk, v_ijk)

    Author
    Jacob Williams
    Date
    8/23/2014

    Transform a position (and optionally velocity) vector from LVLH to IJK.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: rt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: vt_ijk

    Target IJK absolute position vector [km]

    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) :: r_ijk

    Chaser IJK absolute position vector [km]

    real(kind=wp), intent(out), optional, dimension(3) :: v_ijk

    Chaser IJK absolute position vector [km]

public interface from_ijk_to_rsw

Conversion from IJK to RSW

  • private subroutine from_ijk_to_rsw_mat(mu, r, v, a, c, cdot)

    Author
    Jacob Williams
    Date
    4/19/2014

    Compute the transformation matrices to convert IJK to RSW.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: r

    position vector of target [km]

    real(kind=wp), intent(in), dimension(3) :: v

    velocity vector of target [km/s]

    real(kind=wp), intent(in), optional, dimension(3) :: a

    acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

    real(kind=wp), intent(out), dimension(3,3) :: c

    C transformation matrix

    real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

    CDOT transformation matrix

  • private subroutine from_ijk_to_rsw_rv(mu, rt_ijk, vt_ijk, r_ijk, v_ijk, dr_rsw, dv_rsw)

    Author
    Jacob Williams
    Date
    8/23/2014

    Transform a position (and optionally velocity) vector from IJK to RSW.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: rt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: vt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: r_ijk

    Chaser IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: v_ijk

    Chaser IJK absolute position vector [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 position vector relative to target [km]

public interface from_rsw_to_ijk

Conversion from RSW to IJK

  • private subroutine from_rsw_to_ijk_mat(mu, r, v, a, c, cdot)

    Author
    Jacob Williams
    Date
    4/19/2014

    Compute the transformation matrices to convert RSW to IJK.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: r

    position vector of target [km]

    real(kind=wp), intent(in), dimension(3) :: v

    velocity vector of target [km/s]

    real(kind=wp), intent(in), optional, dimension(3) :: a

    acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

    real(kind=wp), intent(out), dimension(3,3) :: c

    C transformation matrix

    real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

    CDOT transformation matrix

  • private subroutine from_rsw_to_ijk_rv(mu, rt_ijk, vt_ijk, dr_rsw, dv_rsw, r_ijk, v_ijk)

    Author
    Jacob Williams
    Date
    8/23/2014

    Transform a position (and optionally velocity) vector from RSW to IJK.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: rt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: vt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: dr_rsw

    Chaser RSW position vector [km]

    real(kind=wp), intent(in), dimension(3) :: dv_rsw

    Chaser RSW velocity vector [km/s]

    real(kind=wp), intent(out), dimension(3) :: r_ijk

    Chaser IJK absolute position vector [km]

    real(kind=wp), intent(out), optional, dimension(3) :: v_ijk

    Chaser IJK absolute velocity vector [km/s]

public interface from_lvlh_to_rsw

Conversion from LVLH to RSW

  • private subroutine from_lvlh_to_rsw_rv(dr_lvlh, dv_lvlh, dr_rsw, dv_rsw)

    Author
    Jacob Williams
    Date
    8/23/2014

    Transform a position (and optionally velocity) vector from LVLH to RSW.

    Arguments

    Type IntentOptional 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]

public interface from_rsw_to_lvlh

Conversion from RSW to LVLH

  • private subroutine from_rsw_to_lvlh_rv(dr_rsw, dv_rsw, dr_lvlh, dv_lvlh)

    Author
    Jacob Williams
    Date
    8/23/2014

    Transform a position (and optionally velocity) vector from RSW to LVLH.

    Arguments

    Type IntentOptional 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]

public interface from_ijk_to_vuw

Conversion from IJK to vuw

  • private subroutine from_ijk_to_vuw_mat(mu, r, v, a, c, cdot)

    Compute the transformation matrices to convert IJK to vuw.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2] this is used here to assume instantaneous conic motion if a is not present.

    real(kind=wp), intent(in), dimension(3) :: r

    position vector of target [km]

    real(kind=wp), intent(in), dimension(3) :: v

    velocity vector of target [km/s]

    real(kind=wp), intent(in), optional, dimension(3) :: a

    acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

    real(kind=wp), intent(out), dimension(3,3) :: c

    C transformation matrix

    real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

    CDOT transformation matrix

  • private subroutine from_ijk_to_vuw_rv(mu, rt_ijk, vt_ijk, r_ijk, v_ijk, dr_vuw, dv_vuw)

    Transform a position (and optionally velocity) vector from IJK to VUW.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: rt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: vt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: r_ijk

    Chaser IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: v_ijk

    Chaser IJK absolute position vector [km]

    real(kind=wp), intent(out), dimension(3) :: dr_vuw

    Chaser vuw position vector relative to target [km]

    real(kind=wp), intent(out), optional, dimension(3) :: dv_vuw

    Chaser vuw position vector relative to target [km]

public interface from_vuw_to_ijk

Conversion from vuw to IJK

  • private subroutine from_vuw_to_ijk_mat(mu, r, v, a, c, cdot)

    Compute the transformation matrices to convert VUW to IJK.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: r

    position vector of target [km]

    real(kind=wp), intent(in), dimension(3) :: v

    velocity vector of target [km/s]

    real(kind=wp), intent(in), optional, dimension(3) :: a

    acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

    real(kind=wp), intent(out), dimension(3,3) :: c

    C transformation matrix

    real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

    CDOT transformation matrix

  • private subroutine from_vuw_to_ijk_rv(mu, rt_ijk, vt_ijk, dr_vuw, dv_vuw, r_ijk, v_ijk)

    Transform a position (and optionally velocity) vector from VUW to IJK.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2]

    real(kind=wp), intent(in), dimension(3) :: rt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: vt_ijk

    Target IJK absolute position vector [km]

    real(kind=wp), intent(in), dimension(3) :: dr_vuw

    Chaser vuw position vector relative to target [km]

    real(kind=wp), intent(in), dimension(3) :: dv_vuw

    Chaser vuw position vector relative to target [km]

    real(kind=wp), intent(out), dimension(3) :: r_ijk

    Chaser IJK absolute position vector [km]

    real(kind=wp), intent(out), optional, dimension(3) :: v_ijk

    Chaser IJK absolute position vector [km]


Abstract Interfaces

abstract interface

  • private subroutine report_func(t, rv)

    for reporting the points in the cw_propagator.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: t

    time [sec]

    real(kind=wp), intent(in), dimension(6) :: rv

    state [km,km/s]

abstract interface

  • private subroutine frame_transform_func(mu, r, v, a, c, cdot)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(in) :: mu

    gravitational parameter [km^3/s^2] [not used by all algorithms]

    real(kind=wp), intent(in), dimension(3) :: r

    position vector of target [km]

    real(kind=wp), intent(in), dimension(3) :: v

    velocity vector of target [km/s]

    real(kind=wp), intent(in), optional, dimension(3) :: a

    acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

    real(kind=wp), intent(out), dimension(3,3) :: c

    C transformation matrix

    real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

    CDOT transformation matrix


Functions

public function cw_equations(x0, dt, n) result(x)

Author
Jacob Williams
Date
6/14/2015

Clohessy-Wiltshire equations for relative motion.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(6) :: x0

initial state [r,v] of chaser (at t0) [km, km/s]

real(kind=wp), intent(in) :: dt

elapsed time from t0 [sec]

real(kind=wp), intent(in) :: n

mean motion of target orbit (sqrt(mu/a**3)) [1/sec]

Return Value real(kind=wp), dimension(6)

final state [r,v] of chaser [km, km/s]


Subroutines

public subroutine cw_propagator(t0, x0, h, n, tf, xf, report)

Author
Jacob Williams
Date
8/23/2015

Clohessy-Wiltshire propagation routine.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: t0

initialize time [sec]

real(kind=wp), intent(in), dimension(6) :: x0

initial state in RST coordinates [km,km/s]

real(kind=wp), intent(in) :: h

abs(time step) [sec]

real(kind=wp), intent(in) :: n

mean motion of target orbit (sqrt(mu/a**3)) [1/sec]

real(kind=wp), intent(in) :: tf

final time [sec]

real(kind=wp), intent(out), dimension(6) :: xf

final state in RST coordinates [km,km/s]

procedure(report_func), optional :: report

to report each point

private subroutine from_ijk_to_frame_rv(mu, from_ijk_to_frame, rt_ijk, vt_ijk, r_ijk, v_ijk, dr_frame, dv_frame)

Transform a position (and optionally velocity) vector from IJK to a specified relative frame.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

procedure(frame_transform_func) :: from_ijk_to_frame

function to compute the transformation matrices

real(kind=wp), intent(in), dimension(3) :: rt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: vt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: r_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: v_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(out), dimension(3) :: dr_frame

Chaser frame position vector relative to target [km]

real(kind=wp), intent(out), optional, dimension(3) :: dv_frame

Chaser frame position vector relative to target [km]

private subroutine from_frame_to_ijk_rv(mu, from_frame_to_ijk, rt_ijk, vt_ijk, dr_frame, dv_frame, r_ijk, v_ijk)

Transform a position (and optionally velocity) vector from a specified relative frame to IJK.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

procedure(frame_transform_func) :: from_frame_to_ijk

function to compute the transformation matrices

real(kind=wp), intent(in), dimension(3) :: rt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: vt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: dr_frame

Chaser frame position vector relative to target [km]

real(kind=wp), intent(in), dimension(3) :: dv_frame

Chaser frame position vector relative to target [km]

real(kind=wp), intent(out), dimension(3) :: r_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(out), optional, dimension(3) :: v_ijk

Chaser IJK absolute position vector [km]

private subroutine from_ijk_to_lvlh_mat(mu, r, v, a, c, cdot)

Author
Jacob Williams
Date
4/19/2014

Compute the transformation matrices to convert IJK to LVLH.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: r

position vector of target [km]

real(kind=wp), intent(in), dimension(3) :: v

velocity vector of target [km/s]

real(kind=wp), intent(in), optional, dimension(3) :: a

acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

real(kind=wp), intent(out), dimension(3,3) :: c

C transformation matrix

real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

CDOT transformation matrix

private subroutine from_ijk_to_lvlh_rv(mu, rt_ijk, vt_ijk, r_ijk, v_ijk, dr_lvlh, dv_lvlh)

Author
Jacob Williams
Date
8/23/2014

Transform a position (and optionally velocity) vector from IJK to LVLH.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: rt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: vt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: r_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: v_ijk

Chaser IJK absolute position vector [km]

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]

private subroutine from_lvlh_to_ijk_mat(mu, r, v, a, c, cdot)

Author
Jacob Williams
Date
4/19/2014

Compute the transformation matrices to convert LVLH to IJK.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: r

position vector of target [km]

real(kind=wp), intent(in), dimension(3) :: v

velocity vector of target [km/s]

real(kind=wp), intent(in), optional, dimension(3) :: a

acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

real(kind=wp), intent(out), dimension(3,3) :: c

C transformation matrix

real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

CDOT transformation matrix

private subroutine from_lvlh_to_ijk_rv(mu, rt_ijk, vt_ijk, dr_lvlh, dv_lvlh, r_ijk, v_ijk)

Author
Jacob Williams
Date
8/23/2014

Transform a position (and optionally velocity) vector from LVLH to IJK.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: rt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: vt_ijk

Target IJK absolute position vector [km]

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) :: r_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(out), optional, dimension(3) :: v_ijk

Chaser IJK absolute position vector [km]

private subroutine from_ijk_to_vuw_mat(mu, r, v, a, c, cdot)

Compute the transformation matrices to convert IJK to vuw.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2] this is used here to assume instantaneous conic motion if a is not present.

real(kind=wp), intent(in), dimension(3) :: r

position vector of target [km]

real(kind=wp), intent(in), dimension(3) :: v

velocity vector of target [km/s]

real(kind=wp), intent(in), optional, dimension(3) :: a

acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

real(kind=wp), intent(out), dimension(3,3) :: c

C transformation matrix

real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

CDOT transformation matrix

private subroutine from_ijk_to_vuw_rv(mu, rt_ijk, vt_ijk, r_ijk, v_ijk, dr_vuw, dv_vuw)

Transform a position (and optionally velocity) vector from IJK to VUW.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: rt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: vt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: r_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: v_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(out), dimension(3) :: dr_vuw

Chaser vuw position vector relative to target [km]

real(kind=wp), intent(out), optional, dimension(3) :: dv_vuw

Chaser vuw position vector relative to target [km]

private subroutine from_vuw_to_ijk_mat(mu, r, v, a, c, cdot)

Compute the transformation matrices to convert VUW to IJK.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: r

position vector of target [km]

real(kind=wp), intent(in), dimension(3) :: v

velocity vector of target [km/s]

real(kind=wp), intent(in), optional, dimension(3) :: a

acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

real(kind=wp), intent(out), dimension(3,3) :: c

C transformation matrix

real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

CDOT transformation matrix

private subroutine from_vuw_to_ijk_rv(mu, rt_ijk, vt_ijk, dr_vuw, dv_vuw, r_ijk, v_ijk)

Transform a position (and optionally velocity) vector from VUW to IJK.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: rt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: vt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: dr_vuw

Chaser vuw position vector relative to target [km]

real(kind=wp), intent(in), dimension(3) :: dv_vuw

Chaser vuw position vector relative to target [km]

real(kind=wp), intent(out), dimension(3) :: r_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(out), optional, dimension(3) :: v_ijk

Chaser IJK absolute position vector [km]

private subroutine from_ijk_to_rsw_mat(mu, r, v, a, c, cdot)

Author
Jacob Williams
Date
4/19/2014

Compute the transformation matrices to convert IJK to RSW.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: r

position vector of target [km]

real(kind=wp), intent(in), dimension(3) :: v

velocity vector of target [km/s]

real(kind=wp), intent(in), optional, dimension(3) :: a

acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

real(kind=wp), intent(out), dimension(3,3) :: c

C transformation matrix

real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

CDOT transformation matrix

private subroutine from_ijk_to_rsw_rv(mu, rt_ijk, vt_ijk, r_ijk, v_ijk, dr_rsw, dv_rsw)

Author
Jacob Williams
Date
8/23/2014

Transform a position (and optionally velocity) vector from IJK to RSW.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: rt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: vt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: r_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: v_ijk

Chaser IJK absolute position vector [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 position vector relative to target [km]

private subroutine from_rsw_to_ijk_mat(mu, r, v, a, c, cdot)

Author
Jacob Williams
Date
4/19/2014

Compute the transformation matrices to convert RSW to IJK.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: r

position vector of target [km]

real(kind=wp), intent(in), dimension(3) :: v

velocity vector of target [km/s]

real(kind=wp), intent(in), optional, dimension(3) :: a

acceleration vector of target [km/s^2] (if not present, then a torque-free force model is assumed)

real(kind=wp), intent(out), dimension(3,3) :: c

C transformation matrix

real(kind=wp), intent(out), optional, dimension(3,3) :: cdot

CDOT transformation matrix

private subroutine from_rsw_to_ijk_rv(mu, rt_ijk, vt_ijk, dr_rsw, dv_rsw, r_ijk, v_ijk)

Author
Jacob Williams
Date
8/23/2014

Transform a position (and optionally velocity) vector from RSW to IJK.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mu

gravitational parameter [km^3/s^2]

real(kind=wp), intent(in), dimension(3) :: rt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: vt_ijk

Target IJK absolute position vector [km]

real(kind=wp), intent(in), dimension(3) :: dr_rsw

Chaser RSW position vector [km]

real(kind=wp), intent(in), dimension(3) :: dv_rsw

Chaser RSW velocity vector [km/s]

real(kind=wp), intent(out), dimension(3) :: r_ijk

Chaser IJK absolute position vector [km]

real(kind=wp), intent(out), optional, dimension(3) :: v_ijk

Chaser IJK absolute velocity vector [km/s]

private subroutine from_rsw_to_lvlh_rv(dr_rsw, dv_rsw, dr_lvlh, dv_lvlh)

Author
Jacob Williams
Date
8/23/2014

Transform a position (and optionally velocity) vector from RSW to LVLH.

Arguments

Type IntentOptional 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]

private subroutine from_lvlh_to_rsw_rv(dr_lvlh, dv_lvlh, dr_rsw, dv_rsw)

Author
Jacob Williams
Date
8/23/2014

Transform a position (and optionally velocity) vector from LVLH to RSW.

Arguments

Type IntentOptional 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]

public subroutine relative_motion_test()

Author
Jacob Williams
Date
8/22/2015

Unit tests for the relative_motion_module.

Arguments

None