COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
mathlib include file More...
#include "support/configCosmos.h"
#include "support/cosmos-errno.h"
#include "constants.h"
#include "vector.h"
#include "matrix.h"
#include "rotation.h"
#include <cmath>
#include <iostream>
Go to the source code of this file.
Classes | |
union | utype |
Scalar value type Union. More... | |
union | uvector |
Quaternion/Rvector Union. More... | |
struct | gj_kernel |
pxnxm element cube More... | |
struct | gj_step |
Gauss-Jackson Integration Step. More... | |
struct | gj_instance |
Gauss-Jackson Integration Instance. More... | |
struct | gj_instance3d |
Gauss-Jackson 3D Integration Instance. More... | |
struct | estimatorstruc |
Estimator structure. More... | |
struct | estimatorhandle |
Estimator handle. More... | |
class | LsFit |
struct | LsFit::fitelement |
Least Squares Fit Element. More... | |
Macros | |
#define | CRC16CCITT 0x1021 |
CRC-16-CCITT Normal. More... | |
#define | CRC16CCITTMSB 0x1021 |
#define | CRC16CCITTR 0x8408 |
CRC-16-CCITT Reversed. More... | |
#define | CRC16CCITTLSB 0x8408 |
#define | CRC16CCITTRR 0x8810 |
CRC-16-CCITT Reversed Reciprocal. More... | |
Functions | |
double | gaussian_random (double mean, double stdev) |
Normal Distribution random number. More... | |
double | distance_rv (rvector p0, rvector p1, rvector p2) |
Distance from a line. More... | |
double | area_rv (rvector p0, rvector p1, rvector p2) |
Area of a triangle. More... | |
double | evaluate_poly (double x, rvector parms) |
double | evaluate_poly_slope (double x, rvector parms) |
double | evaluate_poly_accel (double x, rvector parms) |
double | evaluate_poly_jerk (double x, rvector parms) |
gvector | gv_evaluate_poly (double x, vector< vector< double > > parms) |
Evaluate vector polynomial. More... | |
gvector | gv_evaluate_poly_slope (double x, vector< vector< double > > parms) |
Evaluate vector polynomial slope. More... | |
gvector | gv_evaluate_poly_accel (double x, vector< vector< double > > parms) |
Evaluate vector polynomial acceleration. More... | |
gvector | gv_evaluate_poly_jerk (double x, vector< vector< double > > parms) |
Evaluate vector polynomial jerk. More... | |
rvector | rv_evaluate_poly (double x, vector< vector< double > > parms) |
Evaluate vector polynomial. More... | |
rvector | rv_evaluate_poly_slope (double x, vector< vector< double > > parms) |
Evaluate vector polynomial slope. More... | |
rvector | rv_evaluate_poly_accel (double x, vector< vector< double > > parms) |
Evaluate vector polynomial acceleration. More... | |
rvector | rv_evaluate_poly_jerk (double x, vector< vector< double > > parms) |
Evaluate vector polynomial jerk. More... | |
rvector | rotate_q (quaternion q, rvector v) |
cvector | rotate_q (quaternion q, cvector v) |
rvector | transform_q (quaternion q, rvector v) |
rvector | drotate (quaternion q, rvector v) |
Rotate a row vector using a quaternion. More... | |
cvector | drotate (quaternion q, cvector v) |
Rotate a cartesian vector using a quaternion. More... | |
rvector | irotate (quaternion q, rvector v) |
Indirectly rotate a row vector using a quaternion. More... | |
cvector | irotate (quaternion q, cvector v) |
Indirectly rotate a cartesian vector using a quaternion. More... | |
rvector | rv_quaternion2axis (quaternion q) |
Quaternion to row vector axis and angle. More... | |
uvector | rv_fitpoly (uvector x, uvector y, uint32_t order) |
Perform nth order polynomial fit. More... | |
vector< double > | polyfit (vector< double > &x, vector< double > &y) |
Perform general order polynomial fit. More... | |
void | multisolve (vector< vector< double > > x, vector< double > y, vector< double > &a) |
Perform N equation solution. More... | |
void | open_estimate (estimatorhandle *estimate, uint32_t size, uint32_t degree) |
Initialize estimator. More... | |
int16_t | set_estimate (estimatorhandle *estimate, double independent, double dependent) |
Set estimator. More... | |
estimatorstruc | get_estimate (estimatorhandle *estimate, double x) |
Get estimate. More... | |
ByteOrder | local_byte_order () |
Determine local byte order. More... | |
uint16_t | uint16from (uint8_t *pointer, ByteOrder order) |
Memory to 16 bit unsigned integer. More... | |
int16_t | int16from (uint8_t *pointer, ByteOrder order) |
Memory to 16 bit signed integer. More... | |
uint32_t | uint32from (uint8_t *pointer, ByteOrder order) |
Memory to 32 bit unsigned integer. More... | |
int32_t | int32from (uint8_t *pointer, ByteOrder order) |
Memory to 32 bit signed integer. More... | |
float | floatfrom (uint8_t *pointer, ByteOrder order) |
Memory to 32 bit float. More... | |
double | doublefrom (uint8_t *pointer, ByteOrder order) |
Memory to 64 bit float. More... | |
void | uint32to (uint32_t value, uint8_t *pointer, ByteOrder order) |
32 bit unsigned integer to memory More... | |
void | int32to (int32_t value, uint8_t *pointer, ByteOrder order) |
32 bit signed integer to memory More... | |
void | uint16to (uint16_t value, uint8_t *pointer, ByteOrder order) |
16 bit unsigned integer to memory More... | |
void | int16to (int16_t value, uint8_t *pointer, ByteOrder order) |
16 bit signed integer to memory More... | |
void | floatto (float value, uint8_t *pointer, ByteOrder order) |
32 bit floating point to memory More... | |
void | doubleto (double value, uint8_t *pointer, ByteOrder order) |
64 bit floating point to memory More... | |
gj_kernel * | gauss_jackson_kernel (int32_t order, double dvi) |
Create Gauss-Jackson Integration Kernel. More... | |
void | gauss_jackson_dekernel (gj_kernel *gjk) |
Free Gauss-Jackson Integration Kernel. More... | |
gj_instance * | gauss_jackson_instance (gj_kernel *kern, int32_t axes, void(*calc_vd2)(double vi, double *vd0, double *vd2, int32_t axes)) |
Initialize an Instance of a Gauss-Jackson Integrator. More... | |
int | gauss_jackson_setstep (gj_instance *gji, double vi, double *vd0, double *vd1, double *vd2, int32_t istep) |
Set Independent and Dependent variables for Gauss-Jackson step. More... | |
int | gauss_jackson_getstep (gj_instance *gji, double *vi, double *vd0, double *vd1, double *vd2, int32_t istep) |
Get Independent and Dependent variables for Gauss-Jackson step. More... | |
gj_step * | gauss_jackson_step (gj_kernel *kern) |
Initialize a Step of a Gauss-Jackson integrator. More... | |
void | gauss_jackson_destep (gj_kernel *kern, gj_step *step) |
Destroy a Step of a Gauss-Jackson integrator. More... | |
void | gauss_jackson_preset (gj_instance *gji) |
Converge all axes of a Gauss-Jackson integrator prior to propagation. More... | |
void | gauss_jackson_extrapolate (gj_instance *gji, double target) |
Propagate Gauss-Jackson integration. More... | |
double | fixangle (double angle) |
Limit angle to range 0-2PI. More... | |
double | actan (double y, double x) |
ArcTan, limited to range 0-2PI. More... | |
double | fixprecision (double number, double prec) |
Limit precision. More... | |
uint16_t | calc_crc16ccitt (uint8_t *buf, int size, bool lsb) |
Calculate CRC-16-CCITT. More... | |
uint16_t | calc_crc16ccitt_lsb (vector< uint8_t >buf) |
uint16_t | calc_crc16ccitt_msb (vector< uint8_t >buf) |
mathlib include file