Spacecraft Control Framework 1.0
Spacecraft Control Library
|
Miscellaneous functions. More...
Go to the source code of this file.
Macros | |
#define | ERROR(...) error(__FILE__,__LINE__,__VA_ARGS__) |
Macro for calling error() with file and line information. | |
Functions | |
unsigned short | GrayToBinary (unsigned short x) |
Converts gray code to binary. More... | |
unsigned short | BinaryToGray (unsigned short x) |
Converts binary to gray code. More... | |
ml_matrix | unique_numbers_in_list (const ml_matrix &u) |
Unique numbers in a list. More... | |
ml_matrix | polygon_props (const ml_matrix &v, ml_matrix f, ml_matrix &n, ml_matrix &r) |
Polygon properties for a set of polygons. More... | |
double | polygon (const ml_matrix &v, ml_matrix &n, ml_matrix &r) |
Polygon properties for a single polygon. More... | |
int | get_naif_code (const char *s) |
Get NAIF code. More... | |
double | attitude_maneuver_time (double inertia, double torque, double angle, double momentum_max) |
Attitude maneuver time. More... | |
void | sc_log (const char *format,...) |
Log an informational message to stdout. More... | |
void | sc_warn (const char *format,...) |
Log a message to stderr. More... | |
void | sc_error (const char *file, int line, const char *format,...) |
Throw a runtime exception, halting execution of the app (if not caught) and printing an error message. More... | |
Miscellaneous functions.
unsigned short GrayToBinary | ( | unsigned short | x | ) |
Converts gray code to binary.
x | gray code. |
unsigned short BinaryToGray | ( | unsigned short | x | ) |
Converts binary to gray code.
Converts binary to gray code.
x | binary. |
ml_matrix unique_numbers_in_list | ( | const ml_matrix & | u | ) |
Unique numbers in a list.
Unique numbers in a list.
u | row matrix |
ml_matrix polygon_props | ( | const ml_matrix & | v, |
ml_matrix | f, | ||
ml_matrix & | n, | ||
ml_matrix & | r | ||
) |
Polygon properties for a set of polygons.
Polygon properties for a set of polygons.
v | nx3 matrix of vectors |
f | mxp matrix of faces holding indexes to v |
n | return normals 3xm |
f | return position vectors 3xm |
References polygon().
Referenced by aero_newtonian::initialize().
double polygon | ( | const ml_matrix & | v, |
ml_matrix & | n, | ||
ml_matrix & | r | ||
) |
Polygon properties for a single polygon.
Polygon properties for a single polygon.
v | 3xn matrix of vectors |
n | return normals 3x1 |
r | return position vector 3x1 |
Referenced by polygon_props().
int get_naif_code | ( | const char * | s | ) |
Get NAIF code.
Get NAIF code.
The input is assumed to be lower case
s | string |
Referenced by planet_ecliptic_to_orbit().
double attitude_maneuver_time | ( | double | inertia, |
double | torque, | ||
double | angle, | ||
double | momentum_max | ||
) |
Attitude maneuver time.
Attitude maneuver time.
UNFINISHED.
inertia | axis inertia |
torque | maximum torque |
angle | desired angle |
momentum_max | maximum allowable momentum |