Aerospace Control Framework 1.0
Functions
sc_suborb.h File Reference

Suborbital utility functions. More...

Go to the source code of this file.

Functions

bool azimuth_launch_angle (double lat0, double lon0, double latF, double lonF, double jd, double tof, bool deg, double &az, double &inc, double &ra, double &m0, double &mF)
 Compute the azimuth angle at the launch site for an orbital plane that intersects the launch location and the target location. More...
 
ml_matrix ecef_to_eci (double loc_sid_time)
 Compute the transformation matrix from ECEF to ECI. More...
 
ml_matrix eci_to_orbit_plane (const ml_matrix &r, const ml_matrix &n)
 Compute the rotation matrix from ECI to orbit plane. More...
 
ml_matrix lla_to_ecef (const ml_matrix &lla, double rP)
 Convert from LLA to ECEF. More...
 
ml_matrix ecef_to_lla (const ml_matrix &ecef, double rP)
 Convert from ECEF to LLA. More...
 
void suborb_distance (double lat0, double lon0, double latF, double lonF, double &angleDist, double &range)
 Compute the minimum angular distance around the Earth that connects two points. More...
 
void suborb_lambert (double tFDes, double h0, double hF, double angleDist, double tol, double maxIter, double &gamma, double &v, double &tF)
 Find initial velocity and flight path angle that gives desired distance. More...
 
void suborb_velocity (double gamma, double h0, double hF, double angleDist, double &v, double &tF)
 Compute initial velocity and flight time for a suborb trajectory. More...
 
ml_matrix orbit_normal_from_elements (double inc, double ra)
 Computes the orbit normal from inclination and right ascension. More...
 
void optimal_intercept (const ml_matrix &rA0, const ml_matrix &vA0, const ml_matrix &lla0, double jd0, double minDist, double vBurnout, double &vDes, double &gammaDes, double &t0F, ml_matrix &llaF, double &tLaunch, double &jdLaunch)
 Computes the optimal intercept time and velocity. More...
 
ml_matrix adjust_eci_for_time (double jD0, double jDF, const ml_matrix &ECI0)
 Computes the optimal intercept time and velocity. More...
 

Function Documentation

◆ azimuth_launch_angle()

bool azimuth_launch_angle ( double  lat0,
double  lon0,
double  latF,
double  lonF,
double  jd,
double  tof,
bool  deg,
double &  az,
double &  inc,
double &  ra,
double &  m0,
double &  mF 
)

NOTE: the target longitude can be increased by accounting for the anticipated time of flight, and noting the Earth's rate of rotation during that time.

NOTE: the local azimuth angle may need to be modified to account for Earth's rotation.

Reference: Aydin, "Orbit Selection and EKV Guidance for Space-based ICBM Intercept", Masters Thesis, Naval Post-Graduate School, 2005.

Accepts lat/lon in degrees or radians; returns outputs in same format. Input 'deg' specifies input/output format.

Parameters
lat0initial latitude
lon0initial longitude
latFfinal latitude
lonFfinal longitude
jdJulian date (if negative, do not adjust with the jd)
toftime of flight
degflag for are the lat/lon in degrees?
azazimuth (returned)
incinclination (returned)
raright ascension (returned)
m0initial mean anomaly (returned)
mFfinal mean anomaly (returned)

◆ ecef_to_eci()

ml_matrix ecef_to_eci ( double  loc_sid_time)
Parameters
loc_sid_timelocal sidereal time
Returns
3x3 rotation matrix

Referenced by optimal_intercept().

◆ eci_to_orbit_plane()

ml_matrix eci_to_orbit_plane ( const ml_matrix &  r,
const ml_matrix &  n 
)

This function takes a position vector and orbit normal vector in ECI and returns the rotation matrix that rotates from the ECI frame to the orbital plane. In the orbital plane, the y vector is aligned with r, the z vector is aligned with n, and x completes the right-hand system.

Parameters
r3x1 position vector in ECI frame
n3x1 normal vector in ECI frame
Returns
3x3 rotation matrix from ECI to orbital plane

◆ lla_to_ecef()

ml_matrix lla_to_ecef ( const ml_matrix &  lla,
double  rP 
)
Parameters
lla3x1 matrix, [lat (rad); lon (rad); ht (km)]
rPRadius of the planet
Returns
ecef matrix [x; y; z] (km)

Referenced by optimal_intercept().

◆ ecef_to_lla()

ml_matrix ecef_to_lla ( const ml_matrix &  ecef,
double  rP 
)
Parameters
ecefmatrix [x; y; z] (km)
rPrP
Returns
lla matrix [lat (rad); lon (rad); ht (km)]

Referenced by optimal_intercept().

◆ suborb_distance()

void suborb_distance ( double  lat0,
double  lon0,
double  latF,
double  lonF,
double &  angleDist,
double &  range 
)

Reference: Zarchan, P. (2002) Tactical and Strategic suborb Guidance, 4th Edition, pp. 239-244.

Parameters
lat0initial latitude (rad)
lon0initial longitude (rad)
latFfinal latitude (rad)
lonFfinal longitude (rad)
angleDistangular distance of flight around Earth (rad) (returned)
rangecorresponding range along Earth's surface (km) (returned)

Referenced by optimal_intercept().

◆ suborb_lambert()

void suborb_lambert ( double  tFDes,
double  h0,
double  hF,
double  angleDist,
double  tol,
double  maxIter,
double &  gamma,
double &  v,
double &  tF 
)

Given initial and final altitudes, the desired time of flight, and the desired angular distance to fly around the globe, this routine conducts an iterative search for the initial flight path angle using the Lambert method.

References: Zarchan, P. (2002) Tactical and Strategic suborb Guidance, 4th Edition, pp. 239-244.

Parameters
tFDesdesired time of flight (sec)
h0initial altitude (km)
hFfinal altitude (km)
angleDistangular distance of flight around Earth (rad)
toltolerance for converging to tFDes (0 = default (1e-3))
maxItermaximum number of iterations (0 = default (100))
gammainitial flight path angle (rad) (returned)
vinitial velocity required (km/s) (returned)
tFflight time (sec) (returned)

References suborb_velocity().

Referenced by optimal_intercept().

◆ suborb_velocity()

void suborb_velocity ( double  gamma,
double  h0,
double  hF,
double  angleDist,
double &  v,
double &  tF 
)

Given an initial altitude and flight path angle for the suborb, compute the required velocity for it to hit the target. The target is located at a given altitude and a specified angular distance (around the Earth) away from the suborb.

References: Zarchan, P. (2002) Tactical and Strategic suborb Guidance, 4th Edition, pp. 239-244.

Parameters
gammainitial flight path angle (rad)
h0initial altitude (km)
hFfinal altitude (km)
angleDistangular distance of flight around Earth (rad)
vinitial velocity required (km/s) (returned)
tFflight time (sec) (returned)

Referenced by suborb_lambert().

◆ orbit_normal_from_elements()

ml_matrix orbit_normal_from_elements ( double  inc,
double  ra 
)

Computes the orbit normal from inclination and right ascension.

Reference: Bate, R.R., et. al. Fundamentals of Astrodynamics, p 82.

Parameters
incinclination (rad)
raright ascension (rad)
Returns
a 3x1 orbit normal vector

◆ optimal_intercept()

void optimal_intercept ( const ml_matrix &  rA0,
const ml_matrix &  vA0,
const ml_matrix &  lla0,
double  jd0,
double  minDist,
double  vBurnout,
double &  vDes,
double &  gammaDes,
double &  t0F,
ml_matrix &  llaF,
double &  tLaunch,
double &  jdLaunch 
)
Parameters
rA0(3,1) Estimated ECI position of adversarial suborb [km]
vA0(3,1) Estimated ECI velocity of adversarial suborb [km]
lla0(3,1) Latitude, longitude, altitude of interceptor
jd0Initial Juian date at time of state estimate
minDistMinimum allowable distance from target to intercept location [km]
vBurnoutMaximum attainable burnout velocity of the interceptor [km/s]
vDes(Return value) Desired burnout velocity [km/s]
gammaDes(Return value) Desired initial flight path angle (at burnout) [rad]
t0F(Return value) Desired time of flight [sec]
llaF(Return value) (3,1) Target position as latitude, longitude, altitude
tLaunch(Return value) Time until launch [sec]
jdLaunch(Return value) Julian date for launch

References ecef_to_eci(), ecef_to_lla(), lla_to_ecef(), suborb_distance(), and suborb_lambert().

◆ adjust_eci_for_time()

ml_matrix adjust_eci_for_time ( double  jD0,
double  jDF,
const ml_matrix &  ECI0 
)
Parameters
jD0Initial Juian date at time of state estimate
jDFFinal Juian date at time of state estimate
ECI0Transformation matrix
Returns
Transformed matrix