COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
math/constants.h
Go to the documentation of this file.
1 #ifndef _MATH_CONSTANTS_H
2 #define _MATH_CONSTANTS_H
3 
4 #include "support/configCosmos.h"
5 #include <cstdint>
6 
10 
12 const double PI=3.1415926535897932384626433832795028841971693993751;
14 const double DPI=3.1415926535897932384626433832795028841971693993751;
16 const double D2PI=6.2831853071795864769252867665590057683943387987502;
18 const double DPI2=1.5707963267948966192313216916397514420985846996876;
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))
30 #define DEG2RAD(deg) static_cast <double>(DTOR * (deg))
32 #define DEGOF(rad) static_cast <double>(RTOD * (rad))
34 #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 };
62 
63 #define DIRECTION_ROW 0
64 #define DIRECTION_COLUMN 1
65 
66 #define ESTIMATOR_SIZE 5
67 
69 #endif //_MATH_CONSTANTS_H
const double RTOD
Multiplicand for Radians to Degrees.
Definition: math/constants.h:27
Definition: eci2kep_test.cpp:33
Network byte order.
Motorola byte order.
const double O_SMALL
Definition: math/constants.h:39
const double DAS2R
Multiplicand for Seconds of Arc to Radians.
Definition: math/constants.h:22
const double DPI2
Double precision PI/2.
Definition: math/constants.h:18
PowerPC byte order.
const double O_UNDEFINED
Definition: math/constants.h:37
const double PI
PI.
Definition: math/constants.h:12
Headers and definitions common to all COSMOS.
Big Endian byte order.
const double O_INFINITE
Definition: math/constants.h:38
const double D_SMALL
Definition: math/constants.h:40
const double DTOR
Multiplicand for Degrees to Radians.
Definition: math/constants.h:25
Little Endian byte order.
const double D2PI
Double precision 2*PI.
Definition: math/constants.h:16
const double DS2R
Multiplicand for Seconds of Time to Radians.
Definition: math/constants.h:20
ByteOrder
Enumeration of possible byte orders.
Definition: math/constants.h:48
const double DPI
Double precision PI.
Definition: math/constants.h:14
Intel byte order.