Artemis Teensy Flight Software
The software on the Teensy in the Artemis cubesat.
constants.h
1 #ifndef _MATH_CONSTANTS_H
2 #define _MATH_CONSTANTS_H
3 
5 //#include <cstdint>
6 
10 
12 const double DPI=3.1415926535897932384626433832795028841971693993751;
14 const double D2PI=6.2831853071795864769252867665590057683943387987502;
16 const double DPI2=1.5707963267948966192313216916397514420985846996876;
18 const double D3PI2=1.5*DPI;
20 const double DS2R=7.2722052166430399038487115353692196393452995355905e-5;
22 const double DAS2R=4.8481368110953599358991410235794797595635330237270e-6;
23 
25 const double DTOR=static_cast <double>(DPI / 180.);
27 const double RTOD=static_cast <double>(180. / DPI);
29 #define RADOF(deg) static_cast <double>(DTOR * (deg))
31 #define DEG2RAD(deg) static_cast <double>(DTOR * (deg))
33 #define DEGOF(rad) static_cast <double>(RTOD * (rad))
35 #define RAD2DEG(rad) (double)(RTOD * (rad))
36 
37 const double O_UNDEFINED=999999.1;
38 const double O_INFINITE=10000000000000000000000000.9;
39 const double O_SMALL=0.00000001;
40 const double D_SMALL=static_cast <double>(1e-76);
41 
42 // BIGENDIAN and LITTLEENDIAN are defined somewhere else. This lets us place them in
43 // the ByteOrder class.
44 #undef BIGENDIAN
45 #undef LITTLEENDIAN
46 
48 enum class ByteOrder : std::uint8_t {
50  BIGENDIAN=0, // was previouly ORDER_BIGENDIAN, replace by ByteOrder::BIGENDIAN
56  LITTLEENDIAN=1, // was previouly ORDER_LITTLEENDIAN
61  NONE=2
62 };
63 
64 #define DIRECTION_ROW 0
65 #define DIRECTION_COLUMN 1
66 
67 #define ESTIMATOR_SIZE 5
69 
70 #endif //_MATH_CONSTANTS_H
Headers and definitions common to all COSMOS Kernel.
ByteOrder
Enumeration of possible byte orders.
Definition: constants.h:48
const double DTOR
Multiplicand for Degrees to Radians.
Definition: constants.h:25
const double DS2R
Multiplicand for Seconds of Time to Radians.
Definition: constants.h:20
const double DPI2
Double precision PI/2.
Definition: constants.h:16
const double D3PI2
Double precision 3*PI/2.
Definition: constants.h:18
const double D2PI
Double precision 2*PI.
Definition: constants.h:14
const double DAS2R
Multiplicand for Seconds of Arc to Radians.
Definition: constants.h:22
const double RTOD
Multiplicand for Radians to Degrees.
Definition: constants.h:27
const double DPI
Double precision PI.
Definition: constants.h:12
@ BIGENDIAN
Big Endian byte order.
@ NETWORK
Network byte order.
@ LITTLEENDIAN
Little Endian byte order.
@ PPC
PowerPC byte order.
@ MOTOROLA
Motorola byte order.
@ INTEL
Intel byte order.