astrotypes  0.0
Namespaces | Classes | Typedefs | Functions
pss::astrotypes::units Namespace Reference

Namespaces

 dm_constant
 
 test
 

Classes

struct  boost_unit_to_std_ratio
 conversion helper from boost time units to the std::chrono::duration::period equivalent More...
 
struct  boost_unit_to_std_ratio< Day >
 
struct  boost_unit_to_std_ratio< MicroSecond >
 
struct  boost_unit_to_std_ratio< MilliSecond >
 
struct  boost_unit_to_std_ratio< NanoSecond >
 
struct  boost_unit_to_std_ratio< PicoSecond >
 
struct  boost_unit_to_std_ratio< Second >
 
struct  has_equivalent_rep
 determine is the NumericalRep of the chrono::duration and the boost::quatity are equivalent More...
 
struct  has_equivalent_rep< boost::units::quantity< BoostUnit, NumT >, boost::units::quantity< BoostUnit2, Num2T > >
 
struct  has_equivalent_unit
 determine is the units of the chrono::duration and the boost::quatity are equivalent More...
 
struct  has_equivalent_unit< boost::units::quantity< BoostUnit, NumT >, boost::units::quantity< BoostUnit2, Num2T > >
 
struct  is_equivalent
 determine is the boost::quanity and the std::chrono:;duration are equivalent reperesentations i.e. both in unit and numerical representation More...
 
class  Quantity
 
class  Quantity< TimeUnit, NumericalRep, typename std::enable_if< boost::units::is_unit_of_dimension< TimeUnit, boost::units::time_dimension >::value >::type >
 Specialisation of Quantity unit for time dimension types. More...
 
struct  TimePoint
 extension of std::chrono::time_point for astrotypes clocks More...
 

Typedefs

using Degree = boost::units::degree::plane_angle
 
typedef boost::units::derived_dimension< boost::units::astronomical::parsec_base_unit, 1, boost::units::length_base_dimension,-3 >::type DispersionMeasureDimensionType
 
typedef boost::units::unit< DispersionMeasureDimensionType, boost::units::cgs::system > DispersionMeasureUnit
 
template<typename T >
using DispersionMeasure = boost::units::quantity< DispersionMeasureUnit, T >
 
typedef boost::units::frequency_dimension Frequency
 
using Hertz = boost::units::si::frequency
 
using KiloHertz = boost::units::make_scaled_unit< boost::units::si::frequency, boost::units::scale< 10, boost::units::static_rational< 3 >>>::type
 
using MegaHertz = boost::units::make_scaled_unit< boost::units::si::frequency, boost::units::scale< 10, boost::units::static_rational< 6 >>>::type
 
using GigaHertz = boost::units::make_scaled_unit< boost::units::si::frequency, boost::units::scale< 10, boost::units::static_rational< 9 >>>::type
 
typedef std::chrono::duration< double, std::ratio< 86400 > > julian_day
 representation of julian time is in days More...
 
typedef julian_day julian_days
 
using Meter = boost::units::si::length
 
using Meters = Meter
 
using Metre = Meter
 
using Metres = Meter
 
using CentiMeter = boost::units::make_scaled_unit< boost::units::si::length, boost::units::scale< 10, boost::units::static_rational<-3 >>>::type
 
using CentiMeters = CentiMeter
 
using CentiMetres = CentiMeter
 
using CentiMetre = CentiMeter
 
using MilliMeter = boost::units::make_scaled_unit< boost::units::si::length, boost::units::scale< 10, boost::units::static_rational<-3 >>>::type
 
using MilliMeters = MilliMeter
 
using MilliMetres = MilliMeter
 
using MilliMetre = MilliMeter
 
typedef boost::units::make_system< boost::units::astronomical::parsec_base_unit,boost::units::si::second_base_unit >::type ParsecSecSystem
 
using Parsec = boost::units::unit< boost::units::length_dimension, ParsecSecSystem >
 
using Parsecs = Parsec
 
typedef boost::units::time_dimension Time
 
typedef JulianClock::time_point JulianDate
 
typedef ModifiedJulianClock::time_point ModifiedJulianDate
 
typedef ModifiedJulianClock::time_point MJD
 
typedef J2000Clock::time_point J2000
 
using Day = boost::units::make_scaled_unit< boost::units::si::time, boost::units::scale< 86400, boost::units::static_rational< 1 >>>::type
 
using Second = boost::units::si::time
 
using Seconds = Second
 
using MilliSecond = boost::units::make_scaled_unit< boost::units::si::time, boost::units::scale< 10, boost::units::static_rational<-3 >>>::type
 
using MilliSeconds = MilliSecond
 
using MicroSecond = boost::units::make_scaled_unit< boost::units::si::time, boost::units::scale< 10, boost::units::static_rational<-6 >>>::type
 
using MicroSeconds = MicroSecond
 
using NanoSecond = boost::units::make_scaled_unit< boost::units::si::time, boost::units::scale< 10, boost::units::static_rational<-9 >>>::type
 
using NanoSeconds = NanoSecond
 
using PicoSecond = boost::units::make_scaled_unit< boost::units::si::time, boost::units::scale< 10, boost::units::static_rational<-12 >>>::type
 
using PicoSeconds = PicoSecond
 

Functions

template<typename BoostQuantity , typename ChronoNumericalRep , typename PeriodType >
constexpr std::enable_if< boost::units::is_quantity< BoostQuantity >::value &&boost::units::is_unit_of_dimension< typename BoostQuantity::unit_type, boost::units::time_dimension >::value &&!is_equivalent< BoostQuantity, std::chrono::duration< ChronoNumericalRep, PeriodType > >::value, BoostQuantity >::type duration_cast (const std::chrono::duration< ChronoNumericalRep, PeriodType > &duration)
 Mimic the std::duration_cast to convert to/from boost::units::quantity<time, X> tyeps. More...
 
template<typename BoostQuantity , typename ChronoNumericalRep , typename PeriodType >
constexpr std::enable_if< boost::units::is_quantity< BoostQuantity >::value &&boost::units::is_unit_of_dimension< typename BoostQuantity::unit_type, boost::units::time_dimension >::value &&is_equivalent< BoostQuantity, std::chrono::duration< ChronoNumericalRep, PeriodType > >::value, BoostQuantity & >::type duration_cast (std::chrono::duration< ChronoNumericalRep, PeriodType > &duration)
 
template<typename BoostQuantity , typename ChronoNumericalRep , typename PeriodType >
constexpr std::enable_if< boost::units::is_quantity< BoostQuantity >::value &&boost::units::is_unit_of_dimension< typename BoostQuantity::unit_type, boost::units::time_dimension >::value &&is_equivalent< BoostQuantity, std::chrono::duration< ChronoNumericalRep, PeriodType > >::value, const BoostQuantity & >::type duration_cast (const std::chrono::duration< ChronoNumericalRep, PeriodType > &duration)
 
template<typename ChronoDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if<!boost::units::is_quantity< ChronoDuration >::value &&boost::units::is_unit_of_dimension< BoostUnit, boost::units::time_dimension >::value &&!is_equivalent< boost::units::quantity< BoostUnit, BoostNumericalRep >, ChronoDuration >::value, ChronoDuration >::type duration_cast (const boost::units::quantity< BoostUnit, BoostNumericalRep > &duration)
 
template<typename ChronoDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if<!boost::units::is_quantity< ChronoDuration >::value &&boost::units::is_unit_of_dimension< BoostUnit, boost::units::time_dimension >::value &&is_equivalent< boost::units::quantity< BoostUnit, BoostNumericalRep >, ChronoDuration >::value, ChronoDuration & >::type duration_cast (boost::units::quantity< BoostUnit, BoostNumericalRep > &duration)
 
template<typename ChronoDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if< boost::units::is_unit_of_dimension< BoostUnit, boost::units::time_dimension >::value &&is_equivalent< boost::units::quantity< BoostUnit, BoostNumericalRep >, ChronoDuration >::value, const ChronoDuration & >::type duration_cast (const boost::units::quantity< BoostUnit, BoostNumericalRep > &duration)
 
template<typename BoostDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if< boost::units::is_quantity< BoostDuration >::value &&!is_equivalent< boost::units::quantity< BoostUnit, BoostNumericalRep >, BoostDuration >::value, BoostDuration >::type duration_cast (boost::units::quantity< BoostUnit, BoostNumericalRep > const &duration)
 
template<typename ClockType , typename Duration >
std::ostream & operator<< (std::ostream &os, TimePoint< ClockType, Duration > const &tp)
 
template<typename ClockType , typename Duration , typename Duration2 >
TimePoint< ClockType, Duration > operator+ (TimePoint< ClockType, Duration > const &lhs, Duration2 const &rhs)
 
template<typename ClockType , typename DurationType , typename Rep >
TimePoint< ClockType, DurationType > operator+ (TimePoint< ClockType, DurationType > const &lhs, boost::units::quantity< boost::units::si::time, Rep > const &rhs)
 
template<typename ClockType , typename DurationType , typename Rep >
TimePoint< ClockType, DurationType > & operator+= (TimePoint< ClockType, DurationType > &lhs, boost::units::quantity< boost::units::si::time, Rep > const &rhs)
 
template<typename ClockType , typename DurationType , typename Rep >
TimePoint< ClockType, DurationType > operator- (TimePoint< ClockType, DurationType > const &lhs, boost::units::quantity< boost::units::si::time, Rep > const &rhs)
 
template<typename ClockType , typename DurationType , typename Rep >
TimePoint< ClockType, DurationType > & operator-= (TimePoint< ClockType, DurationType > &lhs, boost::units::quantity< boost::units::si::time, Rep > const &rhs)
 
template<typename ClockType , typename Duration , typename Duration2 >
TimePoint< ClockType, Duration > operator- (TimePoint< ClockType, Duration > const &lhs, Duration2 const &rhs)
 
template<typename ClockType , typename Duration , typename Duration2 >
Duration operator- (TimePoint< ClockType, Duration > const &lhs, TimePoint< ClockType, Duration2 > const &rhs)
 
 BOOST_UNITS_STATIC_CONSTANT (parsecs_per_cube_cm, DispersionMeasureUnit)
 
 BOOST_UNITS_STATIC_CONSTANT (parsec_per_cube_cm, DispersionMeasureUnit)
 
 BOOST_UNITS_STATIC_CONSTANT (kilohertz, KiloHertz)
 
 BOOST_UNITS_STATIC_CONSTANT (megahertz, MegaHertz)
 
 BOOST_UNITS_STATIC_CONSTANT (gigahertz, MegaHertz)
 
 PSS_UNITS_DEFINE_CLOCK (J2000Clock, julian_day(JulianClock::diff_from_system_epoch.count()-2451545), J2000, false)
 a std::chrono compatible clock representing the J2000 epock More...
 
 PSS_UNITS_DEFINE_CLOCK (JulianClock, julian_day(2440587.5), JD, false)
 a std::chrono compatible clock representing the Julian Clock More...
 
 BOOST_UNITS_STATIC_CONSTANT (parsec, Parsec)
 
 BOOST_UNITS_STATIC_CONSTANT (parsecs, Parsec)
 
 PSS_UNITS_DEFINE_CLOCK (ModifiedJulianClock, julian_day(40587.0), MJD, false)
 a std::chrono compatible clock representing the NASA Modified Julian Clock More...
 
template<typename Unit , typename Rep , typename Unit2 , typename Rep2 >
Quantity< Unit, Rep > operator+ (Quantity< Unit, Rep > const &a, boost::units::quantity< Unit2, Rep2 > const &b)
 
template<typename Unit , typename Rep , typename Unit2 , typename Rep2 >
Quantity< Unit, Rep > operator- (Quantity< Unit, Rep > const &a, boost::units::quantity< Unit2, Rep2 > const &b)
 
template<typename ClockType , typename Duration >
std::ostream & operator<< (std::ostream &, TimePoint< ClockType > const &tp)
 output a TimePoint as a string to the ostream More...
 
 BOOST_UNITS_STATIC_CONSTANT (day, Day)
 
 BOOST_UNITS_STATIC_CONSTANT (days, Day)
 
 BOOST_UNITS_STATIC_CONSTANT (millisecond, MilliSecond)
 
 BOOST_UNITS_STATIC_CONSTANT (milliseconds, MilliSecond)
 
 BOOST_UNITS_STATIC_CONSTANT (microsecond, MicroSecond)
 
 BOOST_UNITS_STATIC_CONSTANT (microseconds, MicroSecond)
 
 BOOST_UNITS_STATIC_CONSTANT (nanosecond, NanoSecond)
 
 BOOST_UNITS_STATIC_CONSTANT (nanoseconds, NanoSecond)
 
 BOOST_UNITS_STATIC_CONSTANT (picosecond, PicoSecond)
 
 BOOST_UNITS_STATIC_CONSTANT (picoseconds, PicoSecond)
 

Typedef Documentation

using pss::astrotypes::units::CentiMeter = typedef boost::units::make_scaled_unit<boost::units::si::length, boost::units::scale<10, boost::units::static_rational<-3>>>::type

Definition at line 45 of file Length.h.

Definition at line 46 of file Length.h.

Definition at line 48 of file Length.h.

Definition at line 47 of file Length.h.

using pss::astrotypes::units::Day = typedef boost::units::make_scaled_unit<boost::units::si::time, boost::units::scale<86400, boost::units::static_rational<1>>>::type

Definition at line 43 of file TimeUnits.h.

using pss::astrotypes::units::Degree = typedef boost::units::degree::plane_angle

Definition at line 40 of file Angle.h.

template<typename T >
using pss::astrotypes::units::DispersionMeasure = typedef boost::units::quantity<DispersionMeasureUnit, T>

Definition at line 71 of file DispersionMeasure.h.

typedef boost::units::derived_dimension<boost::units::astronomical::parsec_base_unit, 1, boost::units::length_base_dimension, -3>::type pss::astrotypes::units::DispersionMeasureDimensionType

Definition at line 65 of file DispersionMeasure.h.

typedef boost::units::unit<DispersionMeasureDimensionType, boost::units::cgs::system> pss::astrotypes::units::DispersionMeasureUnit

Definition at line 66 of file DispersionMeasure.h.

typedef boost::units::frequency_dimension pss::astrotypes::units::Frequency

Definition at line 45 of file Frequency.h.

using pss::astrotypes::units::GigaHertz = typedef boost::units::make_scaled_unit<boost::units::si::frequency, boost::units::scale<10, boost::units::static_rational<9>>>::type

Definition at line 51 of file Frequency.h.

using pss::astrotypes::units::Hertz = typedef boost::units::si::frequency

Definition at line 48 of file Frequency.h.

typedef J2000Clock::time_point pss::astrotypes::units::J2000

Definition at line 48 of file Time.h.

typedef std::chrono::duration<double, std::ratio<86400> > pss::astrotypes::units::julian_day

representation of julian time is in days

Definition at line 39 of file JulianClock.h.

Definition at line 40 of file JulianClock.h.

typedef JulianClock::time_point pss::astrotypes::units::JulianDate

Definition at line 45 of file Time.h.

using pss::astrotypes::units::KiloHertz = typedef boost::units::make_scaled_unit<boost::units::si::frequency, boost::units::scale<10, boost::units::static_rational<3>>>::type

Definition at line 49 of file Frequency.h.

using pss::astrotypes::units::MegaHertz = typedef boost::units::make_scaled_unit<boost::units::si::frequency, boost::units::scale<10, boost::units::static_rational<6>>>::type

Definition at line 50 of file Frequency.h.

using pss::astrotypes::units::Meter = typedef boost::units::si::length

Definition at line 40 of file Length.h.

Definition at line 41 of file Length.h.

Definition at line 42 of file Length.h.

Definition at line 43 of file Length.h.

using pss::astrotypes::units::MicroSecond = typedef boost::units::make_scaled_unit<boost::units::si::time, boost::units::scale<10, boost::units::static_rational<-6>>>::type

Definition at line 50 of file TimeUnits.h.

Definition at line 51 of file TimeUnits.h.

using pss::astrotypes::units::MilliMeter = typedef boost::units::make_scaled_unit<boost::units::si::length, boost::units::scale<10, boost::units::static_rational<-3>>>::type

Definition at line 50 of file Length.h.

Definition at line 51 of file Length.h.

Definition at line 53 of file Length.h.

Definition at line 52 of file Length.h.

using pss::astrotypes::units::MilliSecond = typedef boost::units::make_scaled_unit<boost::units::si::time, boost::units::scale<10, boost::units::static_rational<-3>>>::type

Definition at line 47 of file TimeUnits.h.

Definition at line 48 of file TimeUnits.h.

typedef ModifiedJulianClock::time_point pss::astrotypes::units::MJD

Definition at line 47 of file Time.h.

typedef ModifiedJulianClock::time_point pss::astrotypes::units::ModifiedJulianDate

Definition at line 46 of file Time.h.

using pss::astrotypes::units::NanoSecond = typedef boost::units::make_scaled_unit<boost::units::si::time, boost::units::scale<10, boost::units::static_rational<-9>>>::type

Definition at line 53 of file TimeUnits.h.

Definition at line 54 of file TimeUnits.h.

using pss::astrotypes::units::Parsec = typedef boost::units::unit<boost::units::length_dimension, ParsecSecSystem>

Definition at line 58 of file Length.h.

Definition at line 59 of file Length.h.

typedef boost::units::make_system<boost::units::astronomical::parsec_base_unit ,boost::units::si::second_base_unit>::type pss::astrotypes::units::ParsecSecSystem

Definition at line 57 of file Length.h.

using pss::astrotypes::units::PicoSecond = typedef boost::units::make_scaled_unit<boost::units::si::time, boost::units::scale<10, boost::units::static_rational<-12>>>::type

Definition at line 56 of file TimeUnits.h.

Definition at line 57 of file TimeUnits.h.

using pss::astrotypes::units::Second = typedef boost::units::si::time

Definition at line 44 of file TimeUnits.h.

Definition at line 45 of file TimeUnits.h.

typedef boost::units::time_dimension pss::astrotypes::units::Time

Definition at line 42 of file Time.h.

Function Documentation

pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( kilohertz  ,
KiloHertz   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( megahertz  ,
MegaHertz   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( gigahertz  ,
MegaHertz   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( parsec  ,
Parsec   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( day  ,
Day   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( parsecs  ,
Parsec   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( days  ,
Day   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( millisecond  ,
MilliSecond   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( milliseconds  ,
MilliSecond   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( microsecond  ,
MicroSecond   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( parsecs_per_cube_cm  ,
DispersionMeasureUnit   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( microseconds  ,
MicroSecond   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( parsec_per_cube_cm  ,
DispersionMeasureUnit   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( nanosecond  ,
NanoSecond   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( nanoseconds  ,
NanoSecond   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( picosecond  ,
PicoSecond   
)
pss::astrotypes::units::BOOST_UNITS_STATIC_CONSTANT ( picoseconds  ,
PicoSecond   
)
template<typename BoostQuantity , typename ChronoNumericalRep , typename PeriodType >
constexpr std::enable_if<boost::units::is_quantity<BoostQuantity>::value && boost::units::is_unit_of_dimension<typename BoostQuantity::unit_type, boost::units::time_dimension>::value && !is_equivalent<BoostQuantity, std::chrono::duration<ChronoNumericalRep, PeriodType> >::value , BoostQuantity >::type pss::astrotypes::units::duration_cast ( const std::chrono::duration< ChronoNumericalRep, PeriodType > &  duration)

Mimic the std::duration_cast to convert to/from boost::units::quantity<time, X> tyeps.

template overload to convert from a std::chrono::duration where the Unit is a time_dimesion where the two types are equivalent (in unit and numerical rep), then there is simply a reinterpret_cast (i.e no runtime overheads). Otherwise a new object is created.

std:;chrono::duration<double, std::milli> my_duration(100);
boost::units::quantity<Seconds, double> my_boost_duration = duration_cast<boost::units::quantity<Software, double>>(my_duration);

Definition at line 97 of file BoostDurationCast.h.

template<typename BoostQuantity , typename ChronoNumericalRep , typename PeriodType >
constexpr std::enable_if<boost::units::is_quantity<BoostQuantity>::value && boost::units::is_unit_of_dimension<typename BoostQuantity::unit_type, boost::units::time_dimension>::value && is_equivalent<BoostQuantity, std::chrono::duration<ChronoNumericalRep, PeriodType> >::value , BoostQuantity& >::type pss::astrotypes::units::duration_cast ( std::chrono::duration< ChronoNumericalRep, PeriodType > &  duration)

Definition at line 113 of file BoostDurationCast.h.

template<typename BoostQuantity , typename ChronoNumericalRep , typename PeriodType >
constexpr std::enable_if<boost::units::is_quantity<BoostQuantity>::value && boost::units::is_unit_of_dimension<typename BoostQuantity::unit_type, boost::units::time_dimension>::value && is_equivalent<BoostQuantity, std::chrono::duration<ChronoNumericalRep, PeriodType> >::value , const BoostQuantity& >::type pss::astrotypes::units::duration_cast ( const std::chrono::duration< ChronoNumericalRep, PeriodType > &  duration)

Definition at line 126 of file BoostDurationCast.h.

template<typename ChronoDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if<!boost::units::is_quantity<ChronoDuration>::value && boost::units::is_unit_of_dimension<BoostUnit, boost::units::time_dimension>::value && !is_equivalent<boost::units::quantity<BoostUnit, BoostNumericalRep>, ChronoDuration>::value , ChronoDuration >::type pss::astrotypes::units::duration_cast ( const boost::units::quantity< BoostUnit, BoostNumericalRep > &  duration)

Definition at line 139 of file BoostDurationCast.h.

Here is the call graph for this function:

template<typename ChronoDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if<!boost::units::is_quantity<ChronoDuration>::value && boost::units::is_unit_of_dimension<BoostUnit, boost::units::time_dimension>::value && is_equivalent<boost::units::quantity<BoostUnit, BoostNumericalRep>, ChronoDuration>::value , ChronoDuration& >::type pss::astrotypes::units::duration_cast ( boost::units::quantity< BoostUnit, BoostNumericalRep > &  duration)

Definition at line 153 of file BoostDurationCast.h.

template<typename ChronoDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if<boost::units::is_unit_of_dimension<BoostUnit, boost::units::time_dimension>::value && is_equivalent<boost::units::quantity<BoostUnit, BoostNumericalRep>, ChronoDuration>::value , const ChronoDuration& >::type pss::astrotypes::units::duration_cast ( const boost::units::quantity< BoostUnit, BoostNumericalRep > &  duration)

Definition at line 164 of file BoostDurationCast.h.

template<typename BoostDuration , typename BoostNumericalRep , typename BoostUnit >
constexpr std::enable_if<boost::units::is_quantity<BoostDuration>::value && !is_equivalent<boost::units::quantity<BoostUnit, BoostNumericalRep>, BoostDuration>::value , BoostDuration >::type pss::astrotypes::units::duration_cast ( boost::units::quantity< BoostUnit, BoostNumericalRep > const &  duration)

Definition at line 175 of file BoostDurationCast.h.

template<typename Unit , typename Rep , typename Unit2 , typename Rep2 >
Quantity<Unit, Rep> pss::astrotypes::units::operator+ ( Quantity< Unit, Rep > const &  a,
boost::units::quantity< Unit2, Rep2 > const &  b 
)

Definition at line 78 of file Quantity.h.

template<typename ClockType , typename Duration , typename Duration2 >
TimePoint< ClockType, Duration > pss::astrotypes::units::operator+ ( TimePoint< ClockType, Duration > const &  lhs,
Duration2 const &  rhs 
)

Definition at line 117 of file TimePoint.cpp.

template<typename ClockType , typename DurationType , typename Rep >
TimePoint<ClockType, DurationType> pss::astrotypes::units::operator+ ( TimePoint< ClockType, DurationType > const &  lhs,
boost::units::quantity< boost::units::si::time, Rep > const &  rhs 
)

Definition at line 122 of file TimePoint.cpp.

Here is the call graph for this function:

template<typename ClockType , typename DurationType , typename Rep >
TimePoint<ClockType, DurationType>& pss::astrotypes::units::operator+= ( TimePoint< ClockType, DurationType > &  lhs,
boost::units::quantity< boost::units::si::time, Rep > const &  rhs 
)

Definition at line 128 of file TimePoint.cpp.

Here is the call graph for this function:

template<typename Unit , typename Rep , typename Unit2 , typename Rep2 >
Quantity<Unit, Rep> pss::astrotypes::units::operator- ( Quantity< Unit, Rep > const &  a,
boost::units::quantity< Unit2, Rep2 > const &  b 
)

Definition at line 84 of file Quantity.h.

template<typename ClockType , typename DurationType , typename Rep >
TimePoint<ClockType, DurationType> pss::astrotypes::units::operator- ( TimePoint< ClockType, DurationType > const &  lhs,
boost::units::quantity< boost::units::si::time, Rep > const &  rhs 
)

Definition at line 135 of file TimePoint.cpp.

Here is the call graph for this function:

template<typename ClockType , typename Duration , typename Duration2 >
TimePoint< ClockType, Duration > pss::astrotypes::units::operator- ( TimePoint< ClockType, Duration > const &  lhs,
Duration2 const &  rhs 
)

Definition at line 148 of file TimePoint.cpp.

template<typename ClockType , typename Duration , typename Duration2 >
Duration pss::astrotypes::units::operator- ( TimePoint< ClockType, Duration > const &  lhs,
TimePoint< ClockType, Duration2 > const &  rhs 
)

Definition at line 153 of file TimePoint.cpp.

template<typename ClockType , typename DurationType , typename Rep >
TimePoint<ClockType, DurationType>& pss::astrotypes::units::operator-= ( TimePoint< ClockType, DurationType > &  lhs,
boost::units::quantity< boost::units::si::time, Rep > const &  rhs 
)

Definition at line 141 of file TimePoint.cpp.

Here is the call graph for this function:

template<typename ClockType , typename Duration >
std::ostream& pss::astrotypes::units::operator<< ( std::ostream &  ,
TimePoint< ClockType > const &  tp 
)

output a TimePoint as a string to the ostream

in ISO8601 format UTC. For other formats you must use the to_time_t() method and the std::put_time function

template<typename ClockType , typename Duration >
std::ostream& pss::astrotypes::units::operator<< ( std::ostream &  os,
TimePoint< ClockType, Duration > const &  tp 
)

Definition at line 93 of file TimePoint.cpp.

pss::astrotypes::units::PSS_UNITS_DEFINE_CLOCK ( J2000Clock  ,
julian_day(JulianClock::diff_from_system_epoch.count()-2451545)  ,
J2000  ,
false   
)

a std::chrono compatible clock representing the J2000 epock

epocj is Julian date 2451545.0 TT (Terrestrial Time), or January 1, 2000, noon TT

pss::astrotypes::units::PSS_UNITS_DEFINE_CLOCK ( ModifiedJulianClock  ,
julian_day(40587.0)  ,
MJD  ,
false   
)

a std::chrono compatible clock representing the NASA Modified Julian Clock

pss::astrotypes::units::PSS_UNITS_DEFINE_CLOCK ( JulianClock  ,
julian_day(2440587.5)  ,
JD  ,
false   
)

a std::chrono compatible clock representing the Julian Clock