COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems

Additional parameters relating to position that need only be calculated once. More...

#include <convertdef.h>

Collaboration diagram for extrapos:

Public Member Functions

json11::Json to_json () const
 Convert class contents to JSON object. More...
 
void from_json (const string &s)
 Set class contents from JSON string. More...
 

Public Attributes

double utc = 0.
 Coordinated Universal Time. More...
 
double tt = 0.
 Terrestrial Time. More...
 
double ut = 0.
 UT0. More...
 
double tdb = 0.
 Dynamical Barycentric Time. More...
 
rmatrix j2e
 Transform from ICRF to Geocentric. More...
 
rmatrix dj2e
 
rmatrix ddj2e
 
rmatrix e2j
 Transform from Geocentric to ICRF. More...
 
rmatrix de2j
 
rmatrix dde2j
 
rmatrix j2t
 
rmatrix j2s
 
rmatrix t2j
 
rmatrix s2j
 
rmatrix s2t
 
rmatrix ds2t
 
rmatrix t2s
 
rmatrix dt2s
 
cartpos sun2earth
 
cartpos sun2moon
 
uint16_t closest = 0
 

Detailed Description

Additional parameters relating to position that need only be calculated once.

Member Function Documentation

json11::Json extrapos::to_json ( ) const
inline

Convert class contents to JSON object.

Returns a json11 JSON object of the class

Returns
A json11 JSON object containing every member variable within the class
613  {
614  return json11::Json::object {
615  { "utc" , utc },
616  { "tt" , tt },
617  { "ut" , ut },
618  { "tdb" , tdb },
619 
620  { "j2e" , j2e },
621  { "dj2e" , dj2e },
622  { "ddj2e" , ddj2e },
623 
624  { "e2j" , e2j },
625  { "de2j" , de2j },
626  { "dde2j" , dde2j },
627 
628  { "j2t" , j2t },
629  { "j2s" , j2s },
630  { "t2j" , t2j },
631  { "s2j" , s2j },
632  { "s2t" , s2t },
633  { "ds2t" , ds2t },
634  { "t2s" , t2s },
635  { "dt2s" , dt2s },
636 
637  { "sun2earth" , sun2earth },
638  { "sun2moon" , sun2moon },
639  { "closest" , closest }
640  };
641  }
std::map< std::string, Json > object
Definition: json11.hpp:88
cartpos sun2earth
Definition: convertdef.h:605
rmatrix j2s
Definition: convertdef.h:598
rmatrix dt2s
Definition: convertdef.h:604
rmatrix ddj2e
Definition: convertdef.h:592
rmatrix ds2t
Definition: convertdef.h:602
double tt
Terrestrial Time.
Definition: convertdef.h:584
double utc
Coordinated Universal Time.
Definition: convertdef.h:582
cartpos sun2moon
Definition: convertdef.h:606
uint16_t closest
Definition: convertdef.h:607
rmatrix t2s
Definition: convertdef.h:603
rmatrix s2j
Definition: convertdef.h:600
rmatrix de2j
Definition: convertdef.h:595
double tdb
Dynamical Barycentric Time.
Definition: convertdef.h:588
rmatrix dde2j
Definition: convertdef.h:596
rmatrix t2j
Definition: convertdef.h:599
rmatrix dj2e
Definition: convertdef.h:591
rmatrix e2j
Transform from Geocentric to ICRF.
Definition: convertdef.h:594
rmatrix s2t
Definition: convertdef.h:601
double ut
UT0.
Definition: convertdef.h:586
rmatrix j2t
Definition: convertdef.h:597
rmatrix j2e
Transform from ICRF to Geocentric.
Definition: convertdef.h:590
void extrapos::from_json ( const string &  s)
inline

Set class contents from JSON string.

Parses the provided JSON-formatted string and sets the class data. String should be formatted like the string returned from to_json()

Parameters
sJSON-formatted string to set class contents to
Returns
n/a
649  {
650  string error;
652  if(error.empty()) {
653  if(!p["utc"].is_null()) utc = p["utc"].number_value();
654  if(!p["tt"].is_null()) tt = p["tt"].number_value();
655  if(!p["ut"].is_null()) ut = p["ut"].number_value();
656  if(!p["tdb"].is_null()) tdb = p["tdb"].number_value();
657 
658  if(!p["j2e"].is_null()) j2e.from_json(p["j2e"].dump());
659  if(!p["dj2e"].is_null()) dj2e.from_json(p["dj2e"].dump());
660  if(!p["ddj2e"].is_null()) ddj2e.from_json(p["ddj2e"].dump());
661 
662  if(!p["e2j"].is_null()) e2j.from_json(p["e2j"].dump());
663  if(!p["de2j"].is_null()) de2j.from_json(p["de2j"].dump());
664  if(!p["dde2j"].is_null()) dde2j.from_json(p["dde2j"].dump());
665 
666  if(!p["j2t"].is_null()) j2t.from_json(p["j2t"].dump());
667  if(!p["j2s"].is_null()) j2s.from_json(p["j2s"].dump());
668  if(!p["t2j"].is_null()) t2j.from_json(p["t2j"].dump());
669  if(!p["s2j"].is_null()) s2j.from_json(p["s2j"].dump());
670  if(!p["s2t"].is_null()) s2t.from_json(p["s2t"].dump());
671  if(!p["ds2t"].is_null()) ds2t.from_json(p["ds2t"].dump());
672  if(!p["t2s"].is_null()) t2s.from_json(p["t2s"].dump());
673  if(!p["dt2s"].is_null()) dt2s.from_json(p["dt2s"].dump());
674 
675  if(!p["sun2earth"].is_null()) sun2earth.from_json(p["sun2earth"].dump());
676  if(!p["sun2moon"].is_null()) sun2moon.from_json(p["sun2moon"].dump());
677  if(!p["closest"].is_null()) closest = p["closest"].int_value();
678  } else {
679  cerr<<"ERROR: <"<<error<<">"<<endl;
680  }
681  return;
682  }
Definition: json11.hpp:79
cartpos sun2earth
Definition: convertdef.h:605
rmatrix j2s
Definition: convertdef.h:598
rmatrix dt2s
Definition: convertdef.h:604
rmatrix ddj2e
Definition: convertdef.h:592
rmatrix ds2t
Definition: convertdef.h:602
double tt
Terrestrial Time.
Definition: convertdef.h:584
double utc
Coordinated Universal Time.
Definition: convertdef.h:582
cartpos sun2moon
Definition: convertdef.h:606
uint16_t closest
Definition: convertdef.h:607
rmatrix t2s
Definition: convertdef.h:603
rmatrix s2j
Definition: convertdef.h:600
static double * p
Definition: gauss_jackson_test.cpp:42
void from_json(const string &js)
Set class contents from JSON string.
Definition: convertdef.h:192
void dump(std::string &out) const
rmatrix de2j
Definition: convertdef.h:595
static Json parse(const std::string &in, std::string &err, JsonParse strategy=JsonParse::STANDARD)
double tdb
Dynamical Barycentric Time.
Definition: convertdef.h:588
rmatrix dde2j
Definition: convertdef.h:596
void from_json(const string &s)
Set class contents from JSON string.
Definition: matrix.h:69
rmatrix t2j
Definition: convertdef.h:599
rmatrix dj2e
Definition: convertdef.h:591
rmatrix e2j
Transform from Geocentric to ICRF.
Definition: convertdef.h:594
rmatrix s2t
Definition: convertdef.h:601
double ut
UT0.
Definition: convertdef.h:586
rmatrix j2t
Definition: convertdef.h:597
rmatrix j2e
Transform from ICRF to Geocentric.
Definition: convertdef.h:590

Member Data Documentation

double extrapos::utc = 0.

Coordinated Universal Time.

double extrapos::tt = 0.

Terrestrial Time.

double extrapos::ut = 0.

UT0.

double extrapos::tdb = 0.

Dynamical Barycentric Time.

rmatrix extrapos::j2e

Transform from ICRF to Geocentric.

rmatrix extrapos::dj2e
rmatrix extrapos::ddj2e
rmatrix extrapos::e2j

Transform from Geocentric to ICRF.

rmatrix extrapos::de2j
rmatrix extrapos::dde2j
rmatrix extrapos::j2t
rmatrix extrapos::j2s
rmatrix extrapos::t2j
rmatrix extrapos::s2j
rmatrix extrapos::s2t
rmatrix extrapos::ds2t
rmatrix extrapos::t2s
rmatrix extrapos::dt2s
cartpos extrapos::sun2earth
cartpos extrapos::sun2moon
uint16_t extrapos::closest = 0

The documentation for this struct was generated from the following file: