49 lines
1.9 KiB
C++
49 lines
1.9 KiB
C++
#pragma once
|
|
|
|
|
|
/****************************************************************************************
|
|
* *
|
|
* MOUNT CONTROL COMPONENTS LIBRARY *
|
|
* *
|
|
* *
|
|
* LIBRARY-WIDE CONSTANTS *
|
|
* *
|
|
****************************************************************************************/
|
|
|
|
|
|
#include <numbers>
|
|
|
|
#include "mcc_traits.h"
|
|
|
|
namespace mcc
|
|
{
|
|
|
|
static constexpr double MCC_DEGRESS_TO_RADS = std::numbers::pi / 180.0;
|
|
static constexpr double MCC_RADS_TO_DEGRESS = 1.0 / MCC_DEGRESS_TO_RADS;
|
|
|
|
static constexpr double MCC_HALF_PI = std::numbers::pi / 2.0;
|
|
static constexpr double MCC_TWO_PI = std::numbers::pi * 2.0;
|
|
|
|
static constexpr double MCC_SIDERAL_TO_UT1_RATIO = 1.002737909350795; // sideral/UT1
|
|
|
|
static constexpr double MCC_J2000_MJD = 51544.5;
|
|
static constexpr double MCC_MJD_ZERO = 2400000.5;
|
|
|
|
|
|
// a value to represent of infinite time duration according to type of duration representation
|
|
template <traits::mcc_time_duration_c DT>
|
|
static constexpr DT MCC_INFINITE_DURATION_V =
|
|
std::floating_point<typename DT::rep> ? DT{std::numeric_limits<typename DT::rep>::infinity()}
|
|
: DT{std::numeric_limits<typename DT::rep>::max()};
|
|
|
|
|
|
// serializer/deserializer delimiters
|
|
|
|
// delimiter between items of serializing values sequence
|
|
static constexpr std::string_view MCC_DEFAULT_SEQ_DELIMITER{";"};
|
|
|
|
// delimiter between items of aggregative (multi-element) serializing value
|
|
static constexpr std::string_view MCC_DEFAULT_ELEM_DELIMITER{","};
|
|
|
|
} // namespace mcc
|