Spacecraft Control Framework 1.0
Spacecraft Control Library
Functions
sc_sensor.h File Reference

Sensor functions. More...

Go to the source code of this file.

Functions

ml_matrix radar_model (const ml_matrix &x, const ml_matrix &qECIToBody, const ml_matrix &qBodyToRadar, const ml_matrix &omegaBody, const ml_matrix &rRadarBody)
 A radar model that returns azimuth, elevation, range and range rate. More...
 
ml_matrix quaternion_update_from_delta (const ml_matrix &x, const ml_matrix &q)
 Update a quaternion from a delta quaternion. More...
 
ml_matrix star_measurement_nonlinear (const ml_matrix &pixel_meas)
 Compute the h, R and delta measurements from star data. More...
 
ml_matrix attitude_propagation (const ml_matrix &omega, const ml_matrix &q, double dT)
 Propagate a quaternion. More...
 
ml_matrix sensor_cone (const ml_matrix &cone_angle, const ml_matrix &r0, const ml_matrix &q, const ml_matrix &u, const ml_matrix &rC, double rE, double lD=0)
 Rays from the apex of conical shell. The first column is the apex (r0) r0 is in m by rC and rE are in km. More...
 

Detailed Description

Sensor functions.

Function Documentation

◆ radar_model()

ml_matrix radar_model ( const ml_matrix &  x,
const ml_matrix &  qECIToBody,
const ml_matrix &  qBodyToRadar,
const ml_matrix &  omegaBody,
const ml_matrix &  rRadarBody 
)

A radar model that returns azimuth, elevation, range and range rate.

A radar model that returns azimuth, elevation, range and range rate.

The output vector is range, range rate, azimuth and elevation. This model is purely geometric and does not model radar processing. You must add noise externally.

Parameters
xml_matrix (6*n,1) State vector [r;v;r;v...] in ECI Frame (km,km/s)
qECIToBodyml_matrix (4,1) Quaternion from ECI to body frame
qBodyToRadarml_matrix (4,1) Quaternion from the body to the radar frame
omegaBodyml_matrix (3,1) Angular rate of the body (rad/s)
rRadarBodyml_matrix (3,1) Position of the radar in the body frame (m)
Returns
ml_matrix ml_matrix (4,4*n-4) [range;range rate; azimuth; elevation].

◆ quaternion_update_from_delta()

ml_matrix quaternion_update_from_delta ( const ml_matrix &  x,
const ml_matrix &  q 
)

Update a quaternion from a delta quaternion.

Update a quaternion from a delta quaternion.

Parameters
xml_matrix (6,1) State vector [dQ;b]
qml_matrix (4,1) Quaternion
Returns
ml_matrix (4,1) Quaternion

◆ star_measurement_nonlinear()

ml_matrix star_measurement_nonlinear ( const ml_matrix &  pixel_meas)

Compute the h, R and delta measurements from star data.

Parameters
pixel_measMeasured pixel locations
Returns
dZ Delta measurements

◆ attitude_propagation()

ml_matrix attitude_propagation ( const ml_matrix &  omega,
const ml_matrix &  q,
double  dT 
)

Propagate a quaternion.

Propagate a quaternion.

Parameters
omegaAngular velocity
qOld quaternion
dTTime change
Returns
Updated quaternion

References qi_to_b_dot().

◆ sensor_cone()

ml_matrix sensor_cone ( const ml_matrix &  cone_angle,
const ml_matrix &  r0,
const ml_matrix &  q,
const ml_matrix &  u,
const ml_matrix &  rC,
double  rE,
double  lD 
)

Rays from the apex of conical shell. The first column is the apex (r0) r0 is in m by rC and rE are in km.

Rays from the apex of conical shell. The first column is the apex (r0) r0 is in m by rC and rE are in km.

Parameters
cone_angleAngle of cone - may vary with clock angle (deg)
r0Location of the cone apex (m)
qQuaternion from the target frame to the body frame
uCone unit vector in the body frame
rCLocation of the sphere (km)
rERadius of the sphere (km)
Returns
Cone rays

References PI, and u_to_q().