127 #define CRC16CCITT 0x1021 128 #define CRC16CCITTMSB 0x1021 129 #define CRC16CCITTR 0x8408 131 #define CRC16CCITTLSB 0x8408 132 #define CRC16CCITTRR 0x8810 227 void (*calc_vd2)(
double vi,
double *vd0,
double *vd2, int32_t axes);
246 double (*calc_vd2)(
double vi,
double vdx0,
double vdy0,
double vdz0);
272 vector<estimatorstruc>
r;
320 vector<double>
polyfit(vector<double> &
x, vector<double> &
y);
321 void multisolve(vector< vector<double> >
x, vector<double>
y, vector<double>&
a);
356 double actan(
double y,
double x);
407 LsFit(uint16_t cnt=10, uint16_t ord=2);
409 void initialize(uint16_t cnt=10, uint16_t ord=2);
410 void update(
double x,
double y);
418 double eval(
double x);
422 double slope(
double x);
426 double accel(
double x);
430 double jerk(
double x);
434 vector < vector <double> > getparms();
Gauss-Jackson Integration Instance.
Definition: mathlib.h:216
double dvi
Definition: mathlib.h:182
float floatfrom(uint8_t *pointer, ByteOrder order)
Memory to 32 bit float.
Definition: mathlib.cpp:491
void doubleto(double value, uint8_t *pointer, ByteOrder order)
64 bit floating point to memory
Definition: mathlib.cpp:702
rvector transform_q(quaternion q, rvector v)
Definition: mathlib.cpp:2317
vector< vector< double > > parms
Definition: mathlib.h:391
vector< estimatorstruc > r
Definition: mathlib.h:272
Quaternion/Rvector Union.
Definition: mathlib.h:155
double xbase
Definition: mathlib.h:276
double d
Definition: mathlib.h:143
double dvi2
Definition: mathlib.h:183
int16_t int16from(uint8_t *pointer, ByteOrder order)
Memory to 16 bit signed integer.
Definition: mathlib.cpp:424
Quaternion, scalar first using vector elements.
Definition: vector.h:562
void gauss_jackson_preset(gj_instance *gji)
Converge all axes of a Gauss-Jackson integrator prior to propagation.
Definition: mathlib.cpp:1974
gj_kernel * kern
Kernel Pointer.
Definition: mathlib.h:236
double ybase
Definition: mathlib.h:277
rvector r
Definition: mathlib.h:161
double evaluate_poly_slope(double x, rvector parms)
void multisolve(vector< vector< double > > x, vector< double > y, vector< double > &a)
Perform N equation solution.
Definition: mathlib.cpp:900
Gauss-Jackson 3D Integration Instance.
Definition: mathlib.h:233
3 element generic row vector
Definition: vector.h:53
int32_t ** binom
Definition: mathlib.h:184
Quaternion, scalar last, using vector elements.
Definition: vector.h:506
static antstruc target
Definition: agent_antenna.cpp:160
float f
Definition: mathlib.h:144
double evaluate_poly_jerk(double x, rvector parms)
int32_t i32
Definition: mathlib.h:145
double basex
Definition: mathlib.h:387
void int32to(int32_t value, uint8_t *pointer, ByteOrder order)
32 bit signed integer to memory
Definition: mathlib.cpp:582
Quaternion, scalar last, using x, y, z.
Definition: vector.h:402
void uint16to(uint16_t value, uint8_t *pointer, ByteOrder order)
16 bit unsigned integer to memory
Definition: mathlib.cpp:613
rvector rv_evaluate_poly(double x, vector< vector< double > > parms)
Evaluate vector polynomial.
Definition: mathlib.cpp:1059
Scalar value type Union.
Definition: mathlib.h:141
void floatto(float value, uint8_t *pointer, ByteOrder order)
32 bit floating point to memory
Definition: mathlib.cpp:671
qlast ql
Definition: mathlib.h:160
vector< double > a
Definition: mathlib.h:258
matrix1d m1
Definition: mathlib.h:165
void open_estimate(estimatorhandle *estimate, uint32_t size, uint32_t degree)
Initialize estimator.
Definition: mathlib.cpp:736
double vd1
Dependent variable 1st derivative.
Definition: mathlib.h:201
double sb
Definition: mathlib.h:210
quaternion q
Definition: mathlib.h:157
double * vi
Pointer to array of independent variables; order+2.
Definition: mathlib.h:225
void gauss_jackson_extrapolate(gj_instance *gji, double target)
Propagate Gauss-Jackson integration.
Definition: mathlib.cpp:2079
int32_t index
Definition: mathlib.h:273
Estimator handle.
Definition: mathlib.h:270
double actan(double y, double x)
ArcTan, limited to range 0-2PI.
Definition: mathlib.cpp:2174
gvector gv_evaluate_poly_slope(double x, vector< vector< double > > parms)
Evaluate vector polynomial slope.
Definition: mathlib.cpp:1214
Estimator structure.
Definition: mathlib.h:254
uint16_t calc_crc16ccitt_lsb(vector< uint8_t >buf)
Definition: mathlib.cpp:3019
void gauss_jackson_dekernel(gj_kernel *gjk)
Free Gauss-Jackson Integration Kernel.
Definition: mathlib.cpp:1711
pxnxm element cube
Definition: mathlib.h:178
estimatorstruc get_estimate(estimatorhandle *estimate, double x)
Get estimate.
Definition: mathlib.cpp:812
vector< double > polyfit(vector< double > &x, vector< double > &y)
Perform general order polynomial fit.
Definition: mathlib.cpp:1434
Definition: mathlib.h:361
double * q
Definition: mathlib.h:189
void uint32to(uint32_t value, uint8_t *pointer, ByteOrder order)
32 bit unsigned integer to memory
Definition: mathlib.cpp:551
double gaussian_random(double mean, double stdev)
Normal Distribution random number.
Definition: mathlib.cpp:52
double vd0
Dependent variable.
Definition: mathlib.h:199
double * c
Definition: mathlib.h:187
deque< fitelement > var
Definition: mathlib.h:389
int32_t order
Definition: mathlib.h:180
double meanx
Definition: mathlib.h:396
uint32_t u32
Definition: mathlib.h:147
ByteOrder local_byte_order()
Determine local byte order.
Definition: mathlib.cpp:375
3 element attitude vector.
Definition: vector.h:277
uint16_t depth
Definition: mathlib.h:383
double x
Definition: mathlib.h:371
3 element spherical vector
Definition: vector.h:167
double area_rv(rvector p0, rvector p1, rvector p2)
Area of a triangle.
Definition: mathlib.cpp:336
Least Squares Fit Element.
Definition: mathlib.h:368
void int16to(int16_t value, uint8_t *pointer, ByteOrder order)
16 bit signed integer to memory
Definition: mathlib.cpp:642
uint32_t size
Definition: mathlib.h:274
Headers and definitions common to all COSMOS.
rvector rv_quaternion2axis(quaternion q)
Quaternion to row vector axis and angle.
Definition: mathlib.cpp:194
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.
Definition: mathlib.cpp:1774
double evaluate_poly_accel(double x, rvector parms)
double evaluate_poly(double x, rvector parms)
uint16_t u16
Definition: mathlib.h:148
double fixangle(double angle)
Limit angle to range 0-2PI.
Definition: mathlib.cpp:2159
gj_kernel * gauss_jackson_kernel(int32_t order, double dvi)
Create Gauss-Jackson Integration Kernel.
Definition: mathlib.cpp:1543
uint32_t degree
Definition: mathlib.h:275
gj_step * stepx
Pointer to array of x steps.
Definition: mathlib.h:238
uint32_t order
Definition: mathlib.h:385
rvector rv_evaluate_poly_jerk(double x, vector< vector< double > > parms)
Evaluate vector polynomial jerk.
Definition: mathlib.cpp:1152
gvector gv_evaluate_poly_jerk(double x, vector< vector< double > > parms)
Evaluate vector polynomial jerk.
Definition: mathlib.cpp:1276
qcomplex qc
Definition: mathlib.h:158
uint32_t uint32from(uint8_t *pointer, ByteOrder order)
Memory to 32 bit unsigned integer.
Definition: mathlib.cpp:442
Definition: eci2kep_test.cpp:33
uint16_t calc_crc16ccitt_msb(vector< uint8_t >buf)
Definition: mathlib.cpp:3039
double s
Current guess of dependent variable.
Definition: mathlib.h:207
n element row matrix
Definition: matrix.h:144
svector s
Definition: mathlib.h:163
int32_t axes
Number of axes of integration.
Definition: mathlib.h:221
double * gam
Definition: mathlib.h:188
rvector rv_evaluate_poly_accel(double x, vector< vector< double > > parms)
Evaluate vector polynomial acceleration.
Definition: mathlib.cpp:1121
gvector gv_evaluate_poly(double x, vector< vector< double > > parms)
Evaluate vector polynomial.
Definition: mathlib.cpp:1183
gj_step * stepz
Pointer to array of z steps.
Definition: mathlib.h:242
int16_t set_estimate(estimatorhandle *estimate, double independent, double dependent)
Set estimator.
Definition: mathlib.cpp:755
gj_step * gauss_jackson_step(gj_kernel *kern)
Initialize a Step of a Gauss-Jackson integrator.
Definition: mathlib.cpp:1833
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.
Definition: mathlib.cpp:1920
double * vi
Pointer to array of independent variables.
Definition: mathlib.h:244
double distance_rv(rvector p0, rvector p1, rvector p2)
Distance from a line.
Definition: mathlib.cpp:291
double sa
Definition: mathlib.h:209
rvector rotate_q(quaternion q, rvector v)
Definition: mathlib.cpp:2272
rvector irotate(quaternion q, rvector v)
Indirectly rotate a row vector using a quaternion.
Definition: mathlib.cpp:2308
ByteOrder
Enumeration of possible byte orders.
Definition: math/constants.h:48
avector a
Definition: mathlib.h:166
qfirst qf
Definition: mathlib.h:159
double * lam
Definition: mathlib.h:190
vector< double > y
Definition: mathlib.h:260
char buf[128]
Definition: rw_test.cpp:40
gj_step * stepy
Pointer to array of y steps.
Definition: mathlib.h:240
double doublefrom(uint8_t *pointer, ByteOrder order)
Memory to 64 bit float.
Definition: mathlib.cpp:519
rvector rv_evaluate_poly_slope(double x, vector< vector< double > > parms)
Evaluate vector polynomial slope.
Definition: mathlib.cpp:1090
uvector rv_fitpoly(uvector x, uvector y, uint32_t order)
Perform nth order polynomial fit.
Definition: mathlib.cpp:1507
int16_t i16
Definition: mathlib.h:146
gvector gv_evaluate_poly_accel(double x, vector< vector< double > > parms)
Evaluate vector polynomial acceleration.
Definition: mathlib.cpp:1245
cvector c
Definition: mathlib.h:162
double ** alpha
Definition: mathlib.h:185
double resolution
Definition: mathlib.h:401
static double lastx
Definition: physicslib.cpp:41
3 element geodetic vector
Definition: vector.h:222
double ss
Definition: mathlib.h:208
void gauss_jackson_destep(gj_kernel *kern, gj_step *step)
Destroy a Step of a Gauss-Jackson integrator.
Definition: mathlib.cpp:1888
double vd2
Dependent variable 2nd derivative.
Definition: mathlib.h:203
Quaternion, scalar last, using imaginary elements.
Definition: vector.h:450
uint16_t uint16from(uint8_t *pointer, ByteOrder order)
Memory to 16 bit unsigned integer.
Definition: mathlib.cpp:395
gj_kernel * kern
Kernel Pointer.
Definition: mathlib.h:219
uint16_t calc_crc16ccitt(uint8_t *buf, int size, bool lsb)
Calculate CRC-16-CCITT.
Definition: mathlib.cpp:2206
gvector g
Definition: mathlib.h:164
int32_t int32from(uint8_t *pointer, ByteOrder order)
Memory to 32 bit signed integer.
Definition: mathlib.cpp:473
double fixprecision(double number, double prec)
Limit precision.
Definition: mathlib.cpp:2191
gj_step ** steps
Pointer to array of steps; one for each axis, order+2 for the orders.
Definition: mathlib.h:223
Gauss-Jackson Integration Step.
Definition: mathlib.h:196
double ** beta
Definition: mathlib.h:186
double * b
Definition: mathlib.h:205
double * a
Definition: mathlib.h:204
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.
Definition: mathlib.cpp:1951
3 element cartesian vector
Definition: vector.h:107
int32_t horder
Definition: mathlib.h:181
rvector drotate(quaternion q, rvector v)
Rotate a row vector using a quaternion.
Definition: mathlib.cpp:2261
uint16_t element_cnt
Least Squares Fit Structure.
Definition: mathlib.h:381
double stdevx
Definition: mathlib.h:398
vector< double > x
Definition: mathlib.h:259