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 extraatt:

Public Member Functions

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

Public Attributes

double utc = 0.
 Coordinated Universal Time. More...
 
rmatrix j2b
 Transform from ICRF to Body frame. More...
 
rmatrix b2j
 Transform from Body frame to ICRF. More...
 

Detailed Description

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

Member Function Documentation

json11::Json extraatt::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
702  {
703  return json11::Json::object {
704  { "utc" , utc },
705  { "j2b" , j2b },
706  { "b2j" , b2j }
707  };
708  }
std::map< std::string, Json > object
Definition: json11.hpp:88
rmatrix j2b
Transform from ICRF to Body frame.
Definition: convertdef.h:694
rmatrix b2j
Transform from Body frame to ICRF.
Definition: convertdef.h:696
double utc
Coordinated Universal Time.
Definition: convertdef.h:692
void extraatt::from_json ( const string &  js)
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
716  {
717  string error;
718  json11::Json parsed = json11::Json::parse(js,error);
719  if(error.empty()) {
720  if(!parsed["utc"].is_null()) utc = parsed["utc"].number_value();
721  if(!parsed["j2b"].is_null()) j2b.from_json(parsed["j2b"].dump());
722  if(!parsed["b2j"].is_null()) b2j.from_json(parsed["b2j"].dump());
723  } else {
724  cerr<<"ERROR = "<<error<<endl;
725  }
726  return;
727  }
Definition: json11.hpp:79
void dump(std::string &out) const
static Json parse(const std::string &in, std::string &err, JsonParse strategy=JsonParse::STANDARD)
void from_json(const string &s)
Set class contents from JSON string.
Definition: matrix.h:69
rmatrix j2b
Transform from ICRF to Body frame.
Definition: convertdef.h:694
rmatrix b2j
Transform from Body frame to ICRF.
Definition: convertdef.h:696
double utc
Coordinated Universal Time.
Definition: convertdef.h:692

Member Data Documentation

double extraatt::utc = 0.

Coordinated Universal Time.

rmatrix extraatt::j2b

Transform from ICRF to Body frame.

rmatrix extraatt::b2j

Transform from Body frame to ICRF.


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