Spacecraft Control Framework 1.0
Spacecraft Control Library
Files | Classes | Macros | Typedefs | Enumerations | Functions
Utilities

Math and other utility functions. More...

Files

file  sc_constants.h
 Physical and mathematical constants.
 
file  sc_coord.h
 Coordinate transformation functions.
 
 
file  sc_math.h
 Math utility functions.
 
file  sc_orbit.h
 Orbit mechanics functions and types, including Keplerian, spherical and cartesian elements.
 
file  sc_power.h
 Power system utility functions.
 
file  sc_utility.h
 Miscellaneous functions.
 

Classes

class  beam_contour
 Model beam contours. More...
 
class  CCSDS
 CCSDS space packet protocol. More...
 
class  ellipse_geometry
 Ellipse geometry class. More...
 
class  sc_history
 Spacecraft historical data storage and retrieval. More...
 
struct  orb_data_s
 Structure for storing orbit data. More...
 
struct  gps_data_s
 Data structure for the GPS model. More...
 
struct  gps_orb_out_s
 Structure for storing the orbit data output of the GPS Model. More...
 
struct  orbit_closest_point_out
 Structure for storing the data output of the closest orbit. More...
 

Macros

#define ERROR(...)   error(__FILE__,__LINE__,__VA_ARGS__)
 Macro for calling error() with file and line information.
 

Typedefs

typedef struct orb_data_s orb_data_t
 Structure for storing orbit data.
 
typedef struct gps_data_s gps_data_t
 Data structure for the GPS model.
 
typedef struct gps_orb_out_s gps_orb_out_t
 Structure for storing the orbit data output of the GPS Model.
 
typedef struct orbit_closest_point_out orbit_closest_point_out
 Structure for storing the data output of the closest orbit.
 

Enumerations

enum  {
  none , telem_int8 , telem_int16 , telem_int32 ,
  telem_float , telem_double , telem_boolean
}
 CCSDS data for the CCDS space packet protocol.
 

Functions

ml_matrix jacobian (ml_matrix RHS(ml_matrix x, double t, void *context), ml_matrix &x, double t, void *context)
 Computes the Jacobian of a nonlinear system. More...
 
void sc_log (const char *format,...)
 Print an informative log message. More...
 
void sc_warn (const char *format,...)
 Print an informative message to stderr. More...
 
void sc_error (const char *file, int line, const char *format,...)
 Print an error message and halt the calling application. More...
 

Detailed Description

Math and other utility functions.

Includes orbit mechanics, math, and coordinate tranformations.

Function Documentation

◆ jacobian()

ml_matrix jacobian ( ml_matrix   RHSml_matrix x, double t, void *context,
ml_matrix &  x,
double  t,
void *  context 
)

Computes the Jacobian of a nonlinear system.

The partials are taken with respect to the x vector. This function computes the jacobian of the function RHS which is passed to jacobian.

Parameters
RHS(ml_matrix x, double t, void *context )
xState vector
tTime
*contextPointer to data used by RHS
Returns
The current target quaternion (4x1)

◆ sc_log()

void sc_log ( const char *  format,
  ... 
)

Print an informative log message.

Log an informational message to stdout.

Use this function in the same way that printf would be used.

Parameters
formatThe format string.
Todo:
Add verbosity options to the logging mechanism.

Referenced by ImpulsiveLPManeuver(), aero_newtonian::initialize(), IterativeImpulsiveManeuver(), LPCircular(), LPEccentric(), star_meas::Pyramid(), and multi_body_central_hub::state_derivative().

◆ sc_warn()

void sc_warn ( const char *  format,
  ... 
)

Print an informative message to stderr.

Log a message to stderr.

Parameters
formatThe format string.

Referenced by ellipse_geometry::get_ellipse_point_on_tangent(), aero_newtonian::initialize(), geometry::initialize(), state_space::Initialize(), StdAtm::Initialize(), AtmJ70ToGround::Initialize(), and PID3Axis::Update().

◆ sc_error()

void sc_error ( const char *  file,
int  line,
const char *  format,
  ... 
)

Print an error message and halt the calling application.

Throw a runtime exception, halting execution of the app (if not caught) and printing an error message.

This function also takes a file and line number, and should be called as ERROR(format,...) (which will fill in the file and line info automatically) rather than directly. This function will print the error message and then halt execution of the app, and should be used only for fatal errors.

Parameters
fileThe file in which the error occurred.
lineThe line at which the error occurred.
formatThe format string.