Coordinate transformation functions. More...
Functions | |
ml_matrix | az_el_range_range_rate_to_rv (const ml_matrix &q_radar_to_hills, double az, double el, double range, double range_dot) |
Converts az, el, range and range rate to exact r and approximate v. | |
ml_matrix | q_from_u (const ml_matrix &u_catalog, const ml_matrix &u_meas) |
Returns a quaternion given at least 3 matching vectors. | |
double | q_to_angle (const ml_matrix &quaternion) |
Returns value of the angle from the quaternion in radians. | |
ml_matrix | q_to_vec (const ml_matrix &quaternion) |
Returns the value of the vector from quaternion. | |
ml_matrix | au_to_q (double angle, double unit_vec[3]) |
Compute quaternion from angle and unit vector, array format. | |
ml_matrix | au_to_q (double angle, const ml_matrix &unit_vec) |
Compute quaternion from angle and unit vector, matrix format. | |
double | q_to_au (const ml_matrix &quaternion, ml_matrix &unit_vec) |
Compute angle and unit vector from quaternion. | |
ml_matrix | eul_to_mat (const ml_matrix &euler) |
Convert 3-2-1 Euler angle sequence to a matrix that transforms in the direction of the rotation. | |
ml_matrix | eul_to_q (const ml_matrix &euler) |
Convert 3-2-1 Euler angle sequence to a quaternion that transforms in the direction of the rotation. | |
ml_matrix | delta_eul_to_q (const ml_matrix &q, const ml_matrix &euler) |
Apply a 3-2-1 Euler angle sequence to a quaternion that transforms in the direction of the rotation. | |
ml_matrix | rot_mat_x (const double &a) |
Generate a rotation matrix for angular rotation about the x axis. | |
ml_matrix | rot_mat_y (const double &a) |
Generate a rotation matrix for angular rotation about the y axis. | |
ml_matrix | rot_mat_z (const double &a) |
Generate a rotation matrix for angular rotation about the z axis. | |
ml_matrix | mat_to_q (const ml_matrix &mat) |
Convert a matrix to a quaternion. | |
ml_matrix | mat_to_eul (const ml_matrix &mat, const ml_matrix &euler) |
Convert a matrix to an Euler angle sequence. | |
ml_matrix | u_to_q (const ml_matrix &vec1, const ml_matrix &vec2) |
Computes the quaternion which aligns one vector with a second. | |
ml_matrix | perpendicular (const ml_matrix &vec) |
Computes the perpendicular vector. | |
ml_matrix | q_error (const ml_matrix &q_ref, const ml_matrix &q_meas) |
Finds the small error between two quaternions and converts them into an angle vector. | |
ml_matrix | qb_to_i_dot (const ml_matrix &quaternion, const ml_matrix &w) |
Calculates the derivative of the body to inertial quaternion. | |
ml_matrix | qi_to_b_dot (const ml_matrix &quat, const ml_matrix &w) |
Calculates the derivative of the inertial to body quaternion. | |
ml_matrix | qeb_re_ub_to_az_el (const ml_matrix &qEB, const ml_matrix &rE, const ml_matrix &vB) |
Calculate azimuth & elevation angle from ECI to body quaternion, position, and boresight vector. | |
ml_matrix | mat_eci_to_lvlh (const ml_matrix &pos, const ml_matrix &vel) |
Generate the matrix that transforms from ECI to LVLH coordinates. | |
ml_matrix | q_eci_to_lvlh (const ml_matrix &pos, const ml_matrix &vel) |
Generate the quaternion that transforms from ECI to LVLH coordinates. | |
ml_matrix | mat_eci_to_hills (const ml_matrix &r, const ml_matrix &v) |
Generate the matrix that transforms from ECI to Hills coordinates. | |
ml_matrix | q_eci_to_hills (const ml_matrix &r, const ml_matrix &v) |
Generate the quaternion that transforms from ECI to Hills coordinates. | |
ml_matrix | eci_to_hills (const ml_matrix &x0, const ml_matrix &x1) |
Transform from two ECI states to one relative state in Hills-frame. | |
ml_matrix | hills_to_eci (const ml_matrix &x0, const ml_matrix &xH) |
Transform from a relative state in Hills-frame to an absolute ECI state. | |
ml_matrix | q_to_ra_dec (const ml_matrix &quaternion, const ml_matrix &uu) |
Compute right ascension and declination from a quaterion. | |
ml_matrix | u_to_ra_dec (const ml_matrix &unit_vec) |
Computes right ascension and declination from a unit vector. | |
ml_matrix | u_to_ra_dec (const ml_matrix &unit_vec, bool normalize) |
Computes right ascension and declination from a unit vector and normalizes the result. | |
ml_matrix | ra_dec_to_q (const ml_matrix &uu, double ra, double dec) |
Compute a quaternion from right ascension and declination. | |
ml_matrix | ra_dec_to_u (double ra, double dec) |
Calculate a unit vector from right ascension and declination. | |
ml_matrix | ra_dec_to_u (const ml_matrix &ra, const ml_matrix &dec) |
Calculate a unit vector from right ascension and declination. | |
ml_matrix | az_el_to_q (ml_matrix az, ml_matrix el) |
Compute a quaternion from azimuth and elevation. | |
ml_matrix | az_el_to_q (double az, double el) |
Compute a quaternion from azimuth and elevation. | |
ml_matrix | qslerp (const ml_matrix &quat1, const ml_matrix &quat2, double t) |
Interpolates between two quaternions. | |
ml_matrix | lat_lon_alt_to_pos (double lat, double lon, double h, double f=FLATTENING_FACTOR, double a=RADIUS_EARTH) |
Compute EF position vector from latitude, longitude, and altitude. | |
ml_matrix | lat_lon_to_pos (double lat, double lon, double f, double a, bool is_geodetic) |
Converts latitude and longitude to r for an ellipsoidal planet. | |
ml_matrix | lat_lon_to_pos (double lat, double lon, double f=FLATTENING_FACTOR, double a=RADIUS_EARTH, int type=0) |
Converts latitude and longitude to r for an ellipsoidal planet. | |
ml_matrix | pos_to_lat_lon_alt (const ml_matrix &efPos, double f=FLATTENING_FACTOR, double a=RADIUS_EARTH, double tolerance=1.0e-6) |
Compute latitude, longitude, and altitude from EF position vector. | |
void | cart_to_sph (const ml_matrix &x, const ml_matrix &y, const ml_matrix &z, ml_matrix &r, ml_matrix &theta, ml_matrix &phi) |
Converts cartesian coordinates to spherical. | |
ml_matrix | cart_to_sph (const ml_matrix &x) |
Converts cartesian coordinates to spherical. Stacked form. | |
void | sph_to_cart (const ml_matrix &r, const ml_matrix &theta, const ml_matrix &phi, ml_matrix &x, ml_matrix &y, ml_matrix &z) |
Convert spherical coordinates to cartesian. | |
ml_matrix | RPhiTheta2Cart (const ml_matrix &r) |
Computes the transformation matrix from an r, phi, theta frame to cartesian. | |
ml_matrix | CameraToECI (double az, double el, double tt, const ml_matrix &qECIToBody, const ml_matrix &mBaseToBody) |
Computes the transformation matrix from a camera frame with 3 rotations to the body frame. | |
ml_matrix | eci_to_ned (const ml_matrix &r, int opt, double f=FLATTENING_FACTOR) |
Computes the transformation matrix or quaternion from a eciframe to the North East Down (NED) frame. | |
ml_matrix | u_to_az_el (const ml_matrix &u) |
Computes the azimuth and elevation of a unit vector. | |
ml_matrix | az_el_to_u (double az, double el) |
Computes u from azimuth and elevation of a unit vector. | |
ml_matrix | az_el_to_u (const ml_matrix &az, const ml_matrix &el) |
Compute a unit vector from azimuth and elevation. | |
ml_matrix | q_from_dq (const ml_matrix &q, const ml_matrix &dX) |
Computes q as the product of q and a delta quaternion. | |
ml_matrix | dq_from_dX (const ml_matrix &dX) |
Delta quaternion from a 3 vector. | |
ml_matrix | r_lvlh_to_eci (const ml_matrix &r_eci, const ml_matrix &v_eci, const ml_matrix &r) |
LVLH position to ECI. | |
ml_matrix | v_lvlh_to_eci (const ml_matrix &r_eci, const ml_matrix &v_eci, const ml_matrix &v) |
ECI position to LVLH. | |
ml_matrix | r_eci_to_lvlh (const ml_matrix &r_eci, const ml_matrix &v_eci, const ml_matrix &r) |
LVLH position to ECI. | |
ml_matrix | v_eci_to_lvlh (const ml_matrix &r_eci, const ml_matrix &v_eci, const ml_matrix &v) |
ECI position to LVLH. | |
ml_matrix | x_lvlh_to_eci (const ml_matrix &r_eci, const ml_matrix &v_eci, const ml_matrix &x) |
LVLH state to ECI. | |
ml_matrix | x_eci_to_lvlh (const ml_matrix &r_eci, const ml_matrix &v_eci, const ml_matrix &x) |
ECI state to LVLH. | |
ml_matrix | x_lvlh_to_eci (const ml_matrix &x_eci, const ml_matrix &x) |
ECI state to LVLH. | |
ml_matrix | x_eci_to_lvlh (const ml_matrix &x_eci, const ml_matrix &x) |
ECI state to LVLH. | |
ml_matrix | LLAToECEF (const ml_matrix &lla, double rP=RADIUS_EARTH) |
Compute ECEF position from latitude, longitude, altitude. | |
ml_matrix | small_angles_to_q (const ml_matrix &angle) |
Convert small angles to a quaternion. | |
ml_matrix | spice_to_3_by_3 (const ml_matrix &m, int k=1) |
Convert SPICE rotation matrix to 3x3. |
ml_matrix az_el_range_range_rate_to_rv | ( | const ml_matrix & | q_radar_to_hills, |
double | az, | ||
double | el, | ||
double | range, | ||
double | range_dot | ||
) |
az | Azimuth |
el | Elevation |
range | Range |
range_dot | Range rate |
ml_matrix q_from_u | ( | const ml_matrix & | u_catalog, |
const ml_matrix & | u_meas | ||
) |
u_catalog | A 3xn matrix of catalog unit vectors |
u_meas | A 3xn matrix of measured unit vectors |
double q_to_angle | ( | const ml_matrix & | quaternion ) |
ml_matrix q_to_vec | ( | const ml_matrix & | quaternion ) |
quaternion | The quaternion. |
ml_matrix au_to_q | ( | double | angle, |
double | unit_vec[3] | ||
) |
angle | |
unit_vec |
ml_matrix au_to_q | ( | double | angle, |
const ml_matrix & | unit_vec | ||
) |
angle | |
unit_vec |
double q_to_au | ( | const ml_matrix & | quaternion, |
ml_matrix & | unit_vec | ||
) |
quaternion | The quaternion. |
unit_vec | The unit vector will be returned in this matrix. |
ml_matrix eul_to_mat | ( | const ml_matrix & | euler ) |
euler | (3,1) The Euler angle sequence to be converted. |
ml_matrix delta_eul_to_q | ( | const ml_matrix & | q, |
const ml_matrix & | euler | ||
) |
Apply a 3-2-1 Euler angle sequence to a quaternion that transforms in the direction of the rotation.
euler | (3,1) The Euler angle sequence to be converted. |
q | (4,1) The original quaternion. |
ml_matrix rot_mat_x | ( | const double & | a ) |
Generate a rotation matrix for angular rotation about the x axis.
a | Angle of rotation (rad) |
ml_matrix rot_mat_y | ( | const double & | a ) |
Generate a rotation matrix for angular rotation about the y axis.
a | Angle of rotation (rad) |
ml_matrix rot_mat_z | ( | const double & | a ) |
Generate a rotation matrix for angular rotation about the z axis.
a | Angle of rotation (rad) |
ml_matrix mat_to_q | ( | const ml_matrix & | mat ) |
Convert a matrix to a quaternion.
Wrapper for the MatrixLib function q_from_mat.
mat | (3,3) The matrix to be converted. |
ml_matrix mat_to_eul | ( | const ml_matrix & | mat, |
const ml_matrix & | euler | ||
) |
Wrapper for the MatrixLib function q_mat_to_eul.
mat | (3,3) |
euler | (3,1) |
ml_matrix u_to_q | ( | const ml_matrix & | vec1, |
const ml_matrix & | vec2 | ||
) |
Computes the quaternion which aligns one vector with a second.
This is not a unique solution.
Wrapper for the MatrixLib function q_from_u.
vec1 | (3,1) Starting vector. |
vec2 | (3,1) Ending vector. |
ml_matrix perpendicular | ( | const ml_matrix & | vec ) |
Wrapper for the MatrixLib function q_perpendicular.
vec | (3,1) The vector. |
ml_matrix q_error | ( | const ml_matrix & | q_ref, |
const ml_matrix & | q_meas | ||
) |
This routine gives the correct sign when both vectors transform from frame a to frame b and frame b is the body frame. If the convention is reversed you must reverse the sign.
q_ref | (4,1) Reference quaternion. |
q_meas | (4,1) Measured quaternion. |
ml_matrix qb_to_i_dot | ( | const ml_matrix & | quaternion, |
const ml_matrix & | w | ||
) |
Calculates the derivative of the body to inertial quaternion.
quaternion | (4,1) The quaternion, should be a column vector |
w | (3,1) The anglular velocity, a 3 element column vector |
ml_matrix qi_to_b_dot | ( | const ml_matrix & | quat, |
const ml_matrix & | w | ||
) |
Calculates the derivative of the inertial to body quaternion.
quat | (4,1) The quaternion, should be a column vector. |
w | (3,1) The angular rate, a 3 element column vector. |
ml_matrix qeb_re_ub_to_az_el | ( | const ml_matrix & | qEB, |
const ml_matrix & | rE, | ||
const ml_matrix & | vB | ||
) |
Calculate azimuth & elevation angle from ECI to body quaternion, position, and boresight vector.
Azimuth angle is measured clockwise from north to the projection of the boresight vector onto the east-north plane. Elevation angle is the "angle off nadir", the angular distance between the nadir vector and the boresight vector. Adapted by KenW from Joe Mueller's QEB_RE_UB_to_AzEl.m matlab code in /Contracts/NavyReconfigure/Matlab
qEB | (4,1) ECI to spacecraft body coordinate frame quaternion |
rE | (3,1) ECI position of spacecraft |
vB | (3,1) boresight vector defined in body frame |
ml_matrix mat_eci_to_lvlh | ( | const ml_matrix & | pos, |
const ml_matrix & | vel | ||
) |
For LVLH coordinates; z is in the -r direction y is in the - rxv direction x completes the set
pos | (3,1) Position vectors |
vel | (3,1) Velocity vectors |
ml_matrix q_eci_to_lvlh | ( | const ml_matrix & | pos, |
const ml_matrix & | vel | ||
) |
pos | (3,1) Position vector |
vel | (3,1) Velocity vector |
ml_matrix mat_eci_to_hills | ( | const ml_matrix & | r, |
const ml_matrix & | v | ||
) |
For Hills coordinates; x is in the + r direction z is in the + rxv direction y completes the set (aligned with velocity for circular orbits)
r | (3,1) Position vector |
v | (3,1) Velocity vector |
ml_matrix q_eci_to_hills | ( | const ml_matrix & | r, |
const ml_matrix & | v | ||
) |
r | (3,1) Position vector |
v | (3,1) Velocity vector |
ml_matrix eci_to_hills | ( | const ml_matrix & | x0, |
const ml_matrix & | x1 | ||
) |
x0 | (6,1) ECI position and velocity of reference orbit |
x1 | (6,1) ECI position and velocity of secondary orbit |
ml_matrix hills_to_eci | ( | const ml_matrix & | x0, |
const ml_matrix & | xH | ||
) |
x0 | (6,1) ECI position and velocity of reference orbit |
xH | (6,1) Relative position and velocity in Hills-frame |
ml_matrix q_to_ra_dec | ( | const ml_matrix & | quaternion, |
const ml_matrix & | uu | ||
) |
Compute right ascension and declination from a quaterion.
quaternion | (4,1) The quaternion (inertial to body). |
uu | (3,1) unit vector in the body frame. |
ml_matrix u_to_ra_dec | ( | const ml_matrix & | unit_vec ) |
Computes right ascension and declination from a unit vector.
unit_vec | (3,n) Unit vector(s) |
ml_matrix u_to_ra_dec | ( | const ml_matrix & | unit_vec, |
bool | normalize | ||
) |
Computes right ascension and declination from a unit vector and normalizes the result.
unit_vec | (3,n) Unit vector(s) |
normalize | Flag indicating whether the return vector should be normalized. |
References TWO_PI.
ml_matrix ra_dec_to_q | ( | const ml_matrix & | uu, |
double | ra, | ||
double | dec | ||
) |
If right ascension and declination are defined in frame a, and u is fixed in frame b, q transforms from frame a to b such that u lies along the vector determined by (rA,dec) in frame a.
uu | (3,1) unit vector |
ra | (1) Right ascension [rad] |
dec | (1) Declination [rad] |
ml_matrix ra_dec_to_u | ( | double | ra, |
double | dec | ||
) |
ra | (1) Right ascension [rad] |
dec | (1) Declination [rad] |
ml_matrix ra_dec_to_u | ( | const ml_matrix & | ra, |
const ml_matrix & | dec | ||
) |
ra | (1,n) Right ascension [rad] |
dec | (1,n) Declination [rad] |
ml_matrix az_el_to_q | ( | ml_matrix | az, |
ml_matrix | el | ||
) |
Compute a quaternion from azimuth and elevation.
az | Is the azimuth (angle about +z from +x) |
el | is the elevation (angle about +y from +x) |
ml_matrix az_el_to_q | ( | double | az, |
double | el | ||
) |
Compute a quaternion from azimuth and elevation.
az | Is the azimuth (angle about +z from +x) |
el | is the elevation (angle about +y from +x) |
ml_matrix qslerp | ( | const ml_matrix & | quat1, |
const ml_matrix & | quat2, | ||
double | t | ||
) |
quat1 | (4,1) |
quat2 | (4,1) |
t | (1) between 0 to 1 |
ml_matrix lat_lon_alt_to_pos | ( | double | lat, |
double | lon, | ||
double | h, | ||
double | f, | ||
double | a | ||
) |
lat | Latitude in radians. |
lon | Longitude in radians. |
h | Distance above the subsatellite point. |
f | Flattening factor |
a | Equatorial radius |
ml_matrix lat_lon_to_pos | ( | double | lat, |
double | lon, | ||
double | f, | ||
double | a, | ||
bool | is_geodetic | ||
) |
lat | Latitude in radians. |
lon | Longitude in radians. |
f | Flattening factor |
a | Equatorial radius |
is_geodetic | true for geodetic |
ml_matrix lat_lon_to_pos | ( | double | lat, |
double | lon, | ||
double | f, | ||
double | a, | ||
int | type | ||
) |
lat | Latitude in radians. |
lon | Longitude in radians. |
f | Flattening factor |
a | Equatorial radius |
type | 0 for Geodetic |
ml_matrix pos_to_lat_lon_alt | ( | const ml_matrix & | efPos, |
double | f, | ||
double | a, | ||
double | tolerance | ||
) |
efPos | ECEF position (km) |
f | Flattening factor |
a | Equatorial radius |
tolerance | Tolerance for the iteration |
References PI.
void cart_to_sph | ( | const ml_matrix & | x, |
const ml_matrix & | y, | ||
const ml_matrix & | z, | ||
ml_matrix & | r, | ||
ml_matrix & | theta, | ||
ml_matrix & | phi | ||
) |
Individual vector form.
x | |
y | |
z | |
r | |
theta | |
phi |
ml_matrix cart_to_sph | ( | const ml_matrix & | x ) |
Converts cartesian coordinates to spherical. Stacked form.
Stacked matrix form.
x | Position state [x;y;z] |
void sph_to_cart | ( | const ml_matrix & | r, |
const ml_matrix & | theta, | ||
const ml_matrix & | phi, | ||
ml_matrix & | x, | ||
ml_matrix & | y, | ||
ml_matrix & | z | ||
) |
Convert spherical coordinates to cartesian.
Individual vector form.
r | |
theta | |
phi | |
x | |
y | |
z |
ml_matrix RPhiTheta2Cart | ( | const ml_matrix & | r ) |
Computes the transformation matrix from an r, phi, theta frame to cartesian.
In an RPT frame, r is the radial direction, phi is 'east', and theta is in the direction of co-elevation. When theta is zero the r vector is in the xy-plane.
r | Position vector |
ml_matrix CameraToECI | ( | double | az, |
double | el, | ||
double | tt, | ||
const ml_matrix & | qECIToBody, | ||
const ml_matrix & | mBaseToBody | ||
) |
Computes the transformation matrix from a camera frame with 3 rotations to the body frame.
az | Azimuth (rad) |
el | Elevation (rad) |
tt | Turntable angle (rad) |
qECIToBody | Quaternion from ECI to Body |
mBaseToBody | Transformation matrix from Camera base to body |
ml_matrix eci_to_ned | ( | const ml_matrix & | r, |
int | opt, | ||
double | f | ||
) |
Computes the transformation matrix or quaternion from a eciframe to the North East Down (NED) frame.
Reference: Stevens, B.L., Lewis, F.L. , Aircraft Control and Simulation, John Wiley & Sons, 1992, p. 36.
r | ECI position vector (km) |
opt | 0 output quaternion 1 output matrix (rad) |
f | Flattening factor |
ml_matrix u_to_az_el | ( | const ml_matrix & | u ) |
Computes the azimuth and elevation of a unit vector.
u | Unit vector |
ml_matrix az_el_to_u | ( | double | az, |
double | el | ||
) |
Computes u from azimuth and elevation of a unit vector.
az | Azimuth |
el | Elevation |
ml_matrix az_el_to_u | ( | const ml_matrix & | az, |
const ml_matrix & | el | ||
) |
Compute a unit vector from azimuth and elevation.
az | is the azimuth (angle about +z from +x) |
el | is the elevation (angle about +y from +x) |
ml_matrix q_from_dq | ( | const ml_matrix & | q, |
const ml_matrix & | dX | ||
) |
Computes q as the product of q and a delta quaternion.
q | Quaternion |
dX | Delta quaternion |
ml_matrix dq_from_dX | ( | const ml_matrix & | dX ) |
Delta quaternion from a 3 vector.
dX | Delta quaternion |
ml_matrix r_lvlh_to_eci | ( | const ml_matrix & | r_eci, |
const ml_matrix & | v_eci, | ||
const ml_matrix & | r | ||
) |
LVLH position to ECI.
r_eci | Position vector of reference center in the ECI frame |
v_eci | Velocity vector of reference center in the ECI frame |
r | Position vector in lvlh frame |
ml_matrix v_lvlh_to_eci | ( | const ml_matrix & | r_eci, |
const ml_matrix & | v_eci, | ||
const ml_matrix & | v | ||
) |
ECI position to LVLH.
r_eci | Position vector of reference center in the ECI frame |
v_eci | Velocity vector of reference center in the ECI frame |
v | Position vector in lvlh frame |
ml_matrix r_eci_to_lvlh | ( | const ml_matrix & | r_eci, |
const ml_matrix & | v_eci, | ||
const ml_matrix & | r | ||
) |
LVLH position to ECI.
r_eci | Position vector of reference center in the ECI frame |
v_eci | Velocity vector of reference center in the ECI frame |
r | Position vector in eci frame |
ml_matrix v_eci_to_lvlh | ( | const ml_matrix & | r_eci, |
const ml_matrix & | v_eci, | ||
const ml_matrix & | v | ||
) |
ECI position to LVLH.
r_eci | Position vector of reference center in the ECI frame |
v_eci | Velocity vector of reference center in the ECI frame |
v | Position vector in eci frame |
ml_matrix x_lvlh_to_eci | ( | const ml_matrix & | r_eci, |
const ml_matrix & | v_eci, | ||
const ml_matrix & | x | ||
) |
LVLH state to ECI.
r_eci | Position vector of reference center in the ECI frame |
v_eci | Velocity vector of reference center in the ECI frame |
x | [r;v] in lvlh frame |
ml_matrix x_eci_to_lvlh | ( | const ml_matrix & | r_eci, |
const ml_matrix & | v_eci, | ||
const ml_matrix & | x | ||
) |
ECI state to LVLH.
r_eci | Position vector of reference center in the ECI frame |
v_eci | Velocity vector of reference center in the ECI frame |
x | [r;v] in eci frame |
ml_matrix x_lvlh_to_eci | ( | const ml_matrix & | x_eci, |
const ml_matrix & | x | ||
) |
ECI state to LVLH.
x_eci | Velocity vector of reference center in the ECI frame |
x | [r;v] in lvlh frame |
ml_matrix x_eci_to_lvlh | ( | const ml_matrix & | x_eci, |
const ml_matrix & | x | ||
) |
ECI state to LVLH.
x_eci | State vector of reference center in the ECI frame [r;v] |
x | [r;v] in eci frame |
ml_matrix LLAToECEF | ( | const ml_matrix & | lla, |
double | rP | ||
) |
Compute ECEF position from latitude, longitude, altitude.
Assumes a spherical planet. Can handle an array of positions.
lla | (3xn) Latitude [rad], longitude [rad], altitude [km] |
rP | Radius of planet (for Earth: 6378.14) [km] |
ml_matrix small_angles_to_q | ( | const ml_matrix & | angle ) |
angle | Angle vector |
ml_matrix spice_to_3_by_3 | ( | const ml_matrix & | m, |
int | k | ||
) |
Convert SPICE rotation matrix to 3x3.
m | SPICE 9-by-1 rotation matrix (column major) |
k | Column |