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

#include <jsondef.h>

Collaboration diagram for cosmosstruc:

Public Types

using name_map = map< string, void * >
 Support for Namespace 2.0. More...
 
using name_mapping = pair< string, void * >
 
using type_map = map< string, string >
 
using type_mapping = pair< string, string >
 

Public Member Functions

void set_up_rotation_matrix ()
 
void set_PQW (double time)
 
void set_IJK_from_PQW ()
 
void set_PQW_from_IJK ()
 
bool name_exists (const string &s)
 Checks if provided name exists within Namespace 2.0. More...
 
size_t size ()
 Returns the length of the map used to represent Namespace 2.0. More...
 
void print_all_names () const
 Prints every name within Namespace 2.0. More...
 
void print_all_names_types () const
 Prints every name and the associated type within Namespace 2.0. More...
 
void print_all_names_types_values () const
 Prints every name and the associated value and type within Namespace 2.0. More...
 
vector< string > get_all_names () const
 Get every name within Namespace 2.0. More...
 
void add_name (const string &s, void *v, string t)
 Adds a name, memory location, and datatype to Namespace 2.0. More...
 
void remove_name (const string &s)
 Removes a name, memory location, and datatype from Namespace 2.0. More...
 
void remove_name_recursive (const string &s)
 Removes names from Namespace 2.0 recursively. More...
 
void add_default_names ()
 Add default names for every accessible memory location within the COSMOS Data Structure (cosmosstruc) to Namespace 2.0. More...
 
string get_name (void *v)
 Gets the name associated with the provided memory address in Namespace 2.0. More...
 
string get_type (const string &s) const
 Gets the data type associated with the provided name in Namespace 2.0. More...
 
template<class T >
Tget_pointer (const string &s) const
 Gets the pointer to the memory address associated with the provided name in Namespace 2.0. More...
 
template<class T >
T get_value (const string &s) const
 Gets the value of the data associated with the provided name in Namespace 2.0. More...
 
template<class T >
void set_value (const string &s, const T &value) const
 Sets the value of the data associated with the provided name in Namespace 2.0. More...
 
void set_json (const string &json)
 Sets the data in Namespace 2.0 with a JSON-formatted string. More...
 
template<class T >
string get_json (const string &s)
 Gets a JSON-formatted string of the data associated with the provided name in Namespace 2.0. More...
 
string get_json (const string &s)
 Gets a JSON-formatted string of the data associated with the provided name in Namespace 2.0. (Non-template version) More...
 
void replace (std::string &str, const std::string &from, const std::string &to)
 Replace every occurance of a substring within a string with another subtring. More...
 
void pretty_form (string &js)
 Pretty-fy text. More...
 
template<class T >
string get_json_pretty (const string &s)
 
json11::Json to_json () const
 Convert class contents to a JSON object. More...
 
void from_json (const string &s)
 Set class contents from JSON string. More...
 
bool left_ass (char a)
 Checks if operator is left-associative. More...
 
bool equal_ass (char a, char b)
 Checks if two operators have equal precedence. More...
 
bool higher (char a, char b)
 Checks for higher operator precedence. More...
 
int apply_op (stack< char > &ops, stack< double > &answer)
 Applies an arithmetic operation between two values. More...
 
double equationator (const string &str)
 Evaluate the expression of a python?Matlab? equation. More...
 

Public Attributes

double timestamp = 0.
 Timestamp for last change to data. More...
 
uint16_t jmapped = 0
 Whether JSON map has been created. More...
 
vector< vector< jsonentry > > jmap
 JSON Namespace Map matrix. first entry hash, second is items with that hash. More...
 
vector< vector< jsonequation > > emap
 JSON Equation Map matrix. More...
 
vector< vector< unitstruc > > unit
 JSON Unit Map matrix: first level is for unit type, second level is for all variants (starting with primary). More...
 
vector< equationstrucequation
 Vector of Equations. More...
 
nodestruc node
 Structure for summary information in node. More...
 
vector< vertexstrucvertexs
 Vector of all vertexs in node. More...
 
vector< vertexstrucnormals
 Vector of all vertexs in node. More...
 
vector< facestrucfaces
 Vector of all faces in node. More...
 
vector< piecestrucpieces
 Vector of all pieces in node. More...
 
wavefront obj
 Wavefront obj structure. More...
 
vector< devicestrucdevice
 Vector of all general (common) information for devices (components) in node. More...
 
devspecstruc devspec
 Structure for devices (components) special data in node, by type. More...
 
vector< portstrucport
 Vector of all ports known to node. More...
 
vector< agentstrucagent
 Single entry vector for agent information. More...
 
vector< eventstrucevent
 Single entry vector for event information. More...
 
vector< targetstructarget
 Vector of all targets known to node. More...
 
vector< userstrucuser
 Single entry vector for user information. More...
 
vector< tlestructle
 Array of Two Line Elements. More...
 
jsonnode json
 JSON descriptive information. More...
 
double mass = 1.0
 Support for Simulation (just for testing and integration) More...
 
double dens = 1.0
 
double t_pos = 0.0
 
double x_pos = 0.0
 
double y_pos = 0.0
 
double z_pos = 0.0
 
double t_vel = 0.0
 
double x_vel = 0.0
 
double y_vel = 0.0
 
double z_vel = 0.0
 
double t_acc = 0.0
 
double x_acc = 0.0
 
double y_acc = 0.0
 
double z_acc = 0.0
 
double t_way = 0.0
 
double x_way = 0.0
 
double y_way = 0.0
 
double z_way = 0.0
 
double pitch = 0.0
 
double roll = 0.0
 
double yaw = 0.0
 
double a = 0.0
 
double e = 0.0
 
double b = a*sqrt(1.0 - pow(e,2.0))
 
double l = a*(1.0-pow(e,2.0))
 
double i = 0.0
 
double O = 0.0
 
double w = 0.0
 
double tau = 0.0
 
double G = 6.6743015e-11
 
double mass_of_Earth = 5.9722e24
 
double mu = G * mass_of_Earth
 
double n = pow( (mu / pow(a,3.0) ), (0.5) )
 
double T = ( 2.0 * M_PI ) / n
 
double t = 0.0
 
double M = fmod(n * (t - tau), 2*M_PI)
 
double v = M + (2.0*e-0.25*pow(e,3.0))*sin(M) + 1.25*pow(e,2.0)*sin(2.0*M) + (13.0/12.0)*pow(e,3.0)*sin(3.0*M)
 
double r = l / (1.0 + e*cos(v))
 
double P_pos_t = r * cos(v)
 
double Q_pos_t = r * sin(v)
 
double W_pos_t = 0.0
 
double P_vel_t = sqrt(mu/l) * -sin(v)
 
double Q_vel_t = sqrt(mu/l) * (e+cos(v))
 
double W_vel_t = 0.0
 
double R_0_0 = 0.0
 
double R_1_0 = 0.0
 
double R_2_0 = 0.0
 
double R_0_1 = 0.0
 
double R_1_1 = 0.0
 
double R_2_1 = 0.0
 
double R_0_2 = 0.0
 
double R_1_2 = 0.0
 
double R_2_2 = 0.0
 
double I_pos_t = 0.0
 
double J_pos_t = 0.0
 
double K_pos_t = 0.0
 
double I_vel_t = 0.0
 
double J_vel_t = 0.0
 
double K_vel_t = 0.0
 
name_map names
 
type_map types
 

Member Typedef Documentation

using cosmosstruc::name_map = map<string,void*>

Support for Namespace 2.0.

using cosmosstruc::name_mapping = pair<string,void*>
using cosmosstruc::type_map = map<string,string>
using cosmosstruc::type_mapping = pair<string,string>

Member Function Documentation

void cosmosstruc::set_up_rotation_matrix ( )
inline
4401  {
4402  R_0_0 = -sin(O)*cos(i)*sin(w) + cos(O)*cos(w);
4403  R_0_1 = -sin(O)*cos(i)*cos(w) - cos(O)*sin(w);
4404  R_0_2 = sin(O)*sin(i);
4405 
4406  R_1_0 = cos(O)*cos(i)*sin(w) + sin(O)*cos(w);
4407  R_1_1 = cos(O)*cos(i)*cos(w) - sin(O)*sin(w);
4408  R_1_2 = -cos(O)*sin(i);
4409 
4410  R_2_0 = sin(i)*sin(w);
4411  R_2_1 = sin(i)*cos(w);
4412  R_2_2 = cos(i);
4413  return;
4414  }
double R_1_1
Definition: jsondef.h:4394
double R_1_0
Definition: jsondef.h:4390
double R_2_2
Definition: jsondef.h:4399
double O
Definition: jsondef.h:4336
double R_0_0
Definition: jsondef.h:4389
double R_1_2
Definition: jsondef.h:4398
double R_0_1
Definition: jsondef.h:4393
double w
Definition: jsondef.h:4338
double R_2_1
Definition: jsondef.h:4395
double R_0_2
Definition: jsondef.h:4397
double R_2_0
Definition: jsondef.h:4391
double i
Definition: jsondef.h:4334
void cosmosstruc::set_PQW ( double  time)
inline
4425  {
4426 
4427 // to find position and velocity at time t
4428  // 0 Make sure all necessary orbital elements are set
4429  t = time;
4430  l = a*(1.0-pow(e,2.0));
4431  // 1 Calculate mean anamoly (M)
4432  M = fmod(n * (t - tau), 2*M_PI);
4433  // 2 Calculate true anamoly (v)
4434  v = M + (2.0*e-0.25*pow(e,3.0))*sin(M) + 1.25*pow(e,2.0)*sin(2.0*M) + (13.0/12.0)*pow(e,3.0)*sin(3.0*M);
4435  // 3 Calculate radius (r)
4436  r = l / (1.0 + e*cos(v));
4437  // 4 Calculate position vector <P_pos_t, Q_pos_t, W_pos_t>
4438  P_pos_t = r * cos(v);
4439  Q_pos_t = r * sin(v);
4440  W_pos_t = 0.0;
4441  P_vel_t = sqrt(mu/l) * -sin(v);
4442  //Q_vel_t = sqrt(mu/l) * (e+cos(v))*sin(v);
4443  Q_vel_t = sqrt(mu/l) * (e+cos(v));
4444  W_vel_t = 0.0;
4445 
4446  return;
4447 
4448  }
double P_vel_t
Definition: jsondef.h:4377
double Q_vel_t
Definition: jsondef.h:4378
double W_pos_t
Definition: jsondef.h:4374
double W_vel_t
Definition: jsondef.h:4379
double l
Definition: jsondef.h:4330
double Q_pos_t
Definition: jsondef.h:4373
double mu
Definition: jsondef.h:4350
double P_pos_t
Definition: jsondef.h:4372
double r
Definition: jsondef.h:4369
double M
Definition: jsondef.h:4363
double n
Definition: jsondef.h:4353
double a
Definition: jsondef.h:4320
double tau
Definition: jsondef.h:4340
double v
Definition: jsondef.h:4366
double t
Definition: jsondef.h:4359
double e
Definition: jsondef.h:4322
void cosmosstruc::set_IJK_from_PQW ( )
inline
4451  {
4456 
4460  return;
4461  }
double P_vel_t
Definition: jsondef.h:4377
double R_1_1
Definition: jsondef.h:4394
double I_vel_t
Definition: jsondef.h:4420
double K_vel_t
Definition: jsondef.h:4422
double Q_vel_t
Definition: jsondef.h:4378
double W_pos_t
Definition: jsondef.h:4374
double J_pos_t
Definition: jsondef.h:4418
double R_1_0
Definition: jsondef.h:4390
double R_2_2
Definition: jsondef.h:4399
double K_pos_t
Definition: jsondef.h:4419
double W_vel_t
Definition: jsondef.h:4379
double R_0_0
Definition: jsondef.h:4389
double R_1_2
Definition: jsondef.h:4398
double R_0_1
Definition: jsondef.h:4393
double Q_pos_t
Definition: jsondef.h:4373
double J_vel_t
Definition: jsondef.h:4421
double P_pos_t
Definition: jsondef.h:4372
double R_2_1
Definition: jsondef.h:4395
void set_up_rotation_matrix()
Definition: jsondef.h:4401
double I_pos_t
Definition: jsondef.h:4417
double R_0_2
Definition: jsondef.h:4397
double R_2_0
Definition: jsondef.h:4391
void cosmosstruc::set_PQW_from_IJK ( )
inline
4464  {
4469 
4473  return;
4474  }
double P_vel_t
Definition: jsondef.h:4377
double R_1_1
Definition: jsondef.h:4394
double I_vel_t
Definition: jsondef.h:4420
double K_vel_t
Definition: jsondef.h:4422
double Q_vel_t
Definition: jsondef.h:4378
double W_pos_t
Definition: jsondef.h:4374
double J_pos_t
Definition: jsondef.h:4418
double R_1_0
Definition: jsondef.h:4390
double R_2_2
Definition: jsondef.h:4399
double K_pos_t
Definition: jsondef.h:4419
double W_vel_t
Definition: jsondef.h:4379
double R_0_0
Definition: jsondef.h:4389
double R_1_2
Definition: jsondef.h:4398
double R_0_1
Definition: jsondef.h:4393
double Q_pos_t
Definition: jsondef.h:4373
double J_vel_t
Definition: jsondef.h:4421
double P_pos_t
Definition: jsondef.h:4372
double R_2_1
Definition: jsondef.h:4395
void set_up_rotation_matrix()
Definition: jsondef.h:4401
double I_pos_t
Definition: jsondef.h:4417
double R_0_2
Definition: jsondef.h:4397
double R_2_0
Definition: jsondef.h:4391
bool cosmosstruc::name_exists ( const string &  s)
inline

Checks if provided name exists within Namespace 2.0.

Parameters
sstring representing name to search for
Returns
Returns true if name exists. Returns false if not.
4508 { return (names.find(s) == names.end()) ? false : true; }
name_map names
Definition: jsondef.h:4499
size_t cosmosstruc::size ( )
inline

Returns the length of the map used to represent Namespace 2.0.

Returns
Size size_t of the map used to represent Namespace 2.0
4514 { return names.size(); }
name_map names
Definition: jsondef.h:4499
void cosmosstruc::print_all_names ( ) const
inline

Prints every name within Namespace 2.0.

For debug use.

Returns
n/a
4520  {
4521  name_map::const_iterator it = names.begin();
4522  while(it != names.end()) { cout<<(it++)->first<<endl; }
4523  }
name_map names
Definition: jsondef.h:4499
void cosmosstruc::print_all_names_types ( ) const
inline

Prints every name and the associated type within Namespace 2.0.

For debug use.

Returns
n/a
4529  {
4530  name_map::const_iterator n = names.begin();
4531  while(n != names.end()) {
4532  type_map::const_iterator t = types.find(n->first);
4533  if(t == types.end()) {
4534  cout<<left<<setw(40)<<(n++)->first<<endl;
4535  } else {
4536  cout<<left<<setw(40)<<(n++)->first<<t->second<<endl;
4537  }
4538  }
4539  return;
4540  }
name_map names
Definition: jsondef.h:4499
type_map types
Definition: jsondef.h:4500
double n
Definition: jsondef.h:4353
double t
Definition: jsondef.h:4359
void cosmosstruc::print_all_names_types_values ( ) const
inline

Prints every name and the associated value and type within Namespace 2.0.

For debug use.

Returns
n/a
4547  {
4548  name_map::const_iterator n = names.begin();
4549  while(n != names.end()) {
4550  type_map::const_iterator t = types.find(n->first);
4551  if(t == types.end()) {
4552  cout<<left<<setw(40)<<(n++)->first<<endl;
4553  } else {
4554  cout<<left<<setw(40)<<(n++)->first<<left<<setw(16)<<t->second;
4555  if(t->second=="double") {
4556  cout<<left<<setw(32)<<setprecision(std::numeric_limits<double>::digits10)<<fixed<<get_value<double>(t->first)<<endl;
4557  } else if(t->second=="float") {
4558  cout<<left<<setw(32)<<setprecision(std::numeric_limits<float>::digits10)<<fixed<<get_value<float>(t->first)<<endl;
4559  } else if(t->second=="int") {
4560  cout<<left<<setw(32)<<get_value<int>(t->first)<<endl;
4561  } else if(t->second=="uint32_t") {
4562  cout<<left<<setw(32)<<get_value<uint32_t>(t->first)<<endl;
4563  } else if(t->second=="int32_t") {
4564  cout<<left<<setw(32)<<get_value<int32_t>(t->first)<<endl;
4565  } else if(t->second=="uint16_t") {
4566  cout<<left<<setw(32)<<get_value<uint16_t>(t->first)<<endl;
4567  } else if(t->second=="int16_t") {
4568  cout<<left<<setw(32)<<get_value<int16_t>(t->first)<<endl;
4569  } else if(t->second=="uint8_t") {
4570  cout<<left<<setw(32)<<get_value<uint8_t>(t->first)<<endl;
4571  } else if(t->second=="int8_t") {
4572  cout<<left<<setw(32)<<get_value<int8_t>(t->first)<<endl;
4573  } else if(t->second=="size_t") {
4574  cout<<left<<setw(32)<<get_value<size_t>(t->first)<<endl;
4575  } else if(t->second=="bool") {
4576  cout<<left<<setw(32)<<get_value<bool>(t->first)<<endl;
4577  } else if(t->second=="string") {
4578  cout<<left<<setw(32)<<get_value<string>(t->first)<<endl;
4579  } else {
4580  cout<<endl;
4581  }
4582  }
4583  }
4584  return;
4585  }
name_map names
Definition: jsondef.h:4499
type_map types
Definition: jsondef.h:4500
double n
Definition: jsondef.h:4353
double t
Definition: jsondef.h:4359
vector<string> cosmosstruc::get_all_names ( ) const
inline

Get every name within Namespace 2.0.

Returns a vector of strings containing every name within Namespace 2.0.

Returns
Vector of strings of all names within Namespace 2.0.
4591  {
4592  vector<string> all_names;
4593  name_map::const_iterator it = names.begin();
4594  while(it != names.end()) { all_names.push_back((it++)->first); }
4595  return all_names;
4596  }
name_map names
Definition: jsondef.h:4499
void cosmosstruc::add_name ( const string &  s,
void *  v,
string  t 
)
inline

Adds a name, memory location, and datatype to Namespace 2.0.

Associates a name with a specific memory location of the COSMOS Data Structure (cosmosstruc) and a specific data type. Multiple names may point to the same memory address. Names may point to primitive datatypes, user-defined objects, vectors of primitive datatypes, or vectors of user-defined objects. Whitespace and all punctuation besides unescaped double quotes are supported for inclusion in names.

Parameters
sstring representing name of data
vvoid* representing memory address of data
tstring representing datatype of data
Returns
n/a
4611  {
4612  names.insert(name_mapping(s,v));
4613  types.insert(type_mapping(s,t));
4614  };
pair< string, string > type_mapping
Definition: jsondef.h:4497
name_map names
Definition: jsondef.h:4499
type_map types
Definition: jsondef.h:4500
pair< string, void * > name_mapping
Definition: jsondef.h:4494
double v
Definition: jsondef.h:4366
double t
Definition: jsondef.h:4359
void cosmosstruc::remove_name ( const string &  s)
inline

Removes a name, memory location, and datatype from Namespace 2.0.

Removes a single entry added into Namespace 2.0 with add_name().

Parameters
sstring representing name of data to remove
Returns
n/a
4623  {
4624  names.erase(s);
4625  types.erase(s);
4626  }
name_map names
Definition: jsondef.h:4499
type_map types
Definition: jsondef.h:4500
void cosmosstruc::remove_name_recursive ( const string &  s)
inline

Removes names from Namespace 2.0 recursively.

Removes reference to memory location and data type associated with the provided name, then searches through Namespace 2.0 removing entries for all children of the provided name. E.g., if provided the name of an array, will remove the entry associated with the array and also the entries of every one of its elements.

Parameters
sstring representing name of data (and its children) to remove
Returns
n/a
4634  {
4635  auto p = names.lower_bound(s);
4636  auto q = names.end();
4637  const string sbracket = s + "[";
4638  const string sdot = s + ".";
4639 
4640  // search through name map for names of the object/collection and its members
4641  while (p != q) {
4642  if (p->first.compare(s) == 0 || // if exact match s is found. eg: "jmap" but not "jmapped"
4643  p->first.compare(0, sbracket.size(), sbracket) == 0 || // if search string s + [ is found. eg: "jmap[0]"
4644  p->first.compare(0, sdot.size(), sdot) == 0) { // if search string s + . is found. eg: "node.name"
4645  names.erase(p++);
4646  } else {
4647  ++p;
4648  }
4649  }
4650 
4651  auto p2 = types.lower_bound(s);
4652  auto q2 = types.end();
4653  while (p2 != q2) {
4654  if (p2->first.compare(s) == 0 || // if exact match s is found. eg: "jmap" but not "jmapped"
4655  p2->first.compare(0, sbracket.size(), sbracket) == 0 || // if search string s + [ is found. eg: "jmap[0]"
4656  p2->first.compare(0, sdot.size(), sdot) == 0) { // if search string s + . is found. eg: "node.name"
4657  types.erase(p2++);
4658  } else {
4659  ++p2;
4660  }
4661  }
4662 
4663  }
static double * p
Definition: gauss_jackson_test.cpp:42
name_map names
Definition: jsondef.h:4499
type_map types
Definition: jsondef.h:4500
void cosmosstruc::add_default_names ( )
inline

Add default names for every accessible memory location within the COSMOS Data Structure (cosmosstruc) to Namespace 2.0.

Provide a default name for every accessible memory location within the COSMOS Data Structure (cosmosstruc) for Namespace 2.0. Naming convention follows the exact representation of the object in code. E.g., default name for equation[0].name is "equation[0].name".

Parameters
none
Returns
n/a
4671  {
4672 
4673  // default names for Simulation
4674  add_name("mass", &mass, "double");
4675  add_name("density", &dens, "double");
4676 
4677  add_name("t_position", &t_pos, "double");
4678  add_name("x_position", &x_pos, "double");
4679  add_name("y_position", &y_pos, "double");
4680  add_name("z_position", &z_pos, "double");
4681 
4682  add_name("t_velocity", &t_vel, "double");
4683  add_name("x_velocity", &x_vel, "double");
4684  add_name("y_velocity", &y_vel, "double");
4685  add_name("z_velocity", &z_vel, "double");
4686 
4687  add_name("t_acceleration", &t_acc, "double");
4688  add_name("x_acceleration", &x_acc, "double");
4689  add_name("y_acceleration", &y_acc, "double");
4690  add_name("z_acceleration", &z_acc, "double");
4691 
4692  add_name("t_waypoint", &t_way, "double");
4693  add_name("x_waypoint", &x_way, "double");
4694  add_name("y_waypoint", &y_way, "double");
4695  add_name("z_waypoint", &z_way, "double");
4696 
4697  add_name("pitch", &pitch, "double");
4698  add_name("roll", &roll, "double");
4699  add_name("yaw", &yaw, "double");
4700 
4701 
4702  // the whole she-bang
4703  add_name("cinfo", this, "cosmosstruc");
4704 
4705  // double timestamp
4706  add_name("timestamp", &timestamp, "double");
4707 
4708  // uint16_t jmapped
4709  add_name("jmapped", &jmapped, "uint16_t");
4710 
4711  // vector<vector<unitstruc>> unit
4712  add_name("unit", &unit, "vector<vector<unitstruc>>");
4713  for(size_t i = 0; i < unit.capacity(); ++i) {
4714  string basename = "unit[" + std::to_string(i) + "]";
4715  add_name(basename, &unit[i], "vector<unitstruc>");
4716  for(size_t j = 0; j < unit[i].capacity(); ++j) {
4717  string rebasename = basename + "[" + std::to_string(j) + "]";
4718  add_name(rebasename, &unit[i][j], "unitstruc");
4719  add_name(rebasename+".name", &unit[i][j].name, "string");
4720  add_name(rebasename+".type", &unit[i][j].type, "uint16_t");
4721  add_name(rebasename+".p0", &unit[i][j].p0, "float");
4722  add_name(rebasename+".p1", &unit[i][j].p1, "float");
4723  add_name(rebasename+".p2", &unit[i][j].p2, "float");
4724  }
4725  }
4726 
4727 
4728  // vector<equationstruc> equation
4729  add_name("equation", &equation, "vector<equationstruc>");
4730  for(size_t i = 0; i < equation.capacity(); ++i) {
4731  string basename = "equation[" + std::to_string(i) + "]";
4732  add_name(basename, &equation[i], "equationstruc");
4733  add_name(basename+".name", &equation[i].name, "string");
4734  add_name(basename+".value", &equation[i].value, "string");
4735  }
4736 
4737  // nodestruc node
4738  add_name("node", &node, "nodestruc");
4739  add_name("node.name", &node.name, "char[]");
4740  add_name("node.lastevent", &node.lastevent, "char[]");
4741  add_name("node.lasteventutc", &node.lasteventutc, "double");
4742  add_name("node.type", &node.type, "uint16_t");
4743  add_name("node.state", &node.state, "uint16_t");
4744  add_name("node.vertex_cnt", &node.vertex_cnt, "uint16_t");
4745  add_name("node.normal_cnt", &node.normal_cnt, "uint16_t");
4746  add_name("node.face_cnt", &node.face_cnt, "uint16_t");
4747  add_name("node.piece_cnt", &node.piece_cnt, "uint16_t");
4748  add_name("node.device_cnt", &node.device_cnt, "uint16_t");
4749  add_name("node.port_cnt", &node.port_cnt, "uint16_t");
4750  add_name("node.agent_cnt", &node.agent_cnt, "uint16_t");
4751  add_name("node.event_cnt", &node.event_cnt, "uint16_t");
4752  add_name("node.target_cnt", &node.target_cnt, "uint16_t");
4753  add_name("node.user_cnt", &node.user_cnt, "uint16_t");
4754  add_name("node.tle_cnt", &node.tle_cnt, "uint16_t");
4755  add_name("node.flags", &node.flags, "uint16_t");
4756  add_name("node.powmode", &node.powmode, "int16_t");
4757  add_name("node.downtime", &node.downtime, "uint32_t");
4758  add_name("node.azfrom", &node.azfrom, "float");
4759  add_name("node.elfrom", &node.elfrom, "float");
4760  add_name("node.azto", &node.azto, "float");
4761  add_name("node.elto", &node.elto, "float");
4762  add_name("node.range", &node.range, "float");
4763  add_name("node.utcoffset", &node.utcoffset, "double");
4764  add_name("node.utc", &node.utc, "double");
4765  add_name("node.utcstart", &node.utcstart, "double");
4766  add_name("node.loc", &node.loc, "locstruc");
4767  add_name("node.loc.utc", &node.loc.utc, "double");
4768  add_name("node.loc.pos", &node.loc.pos, "posstruc");
4769  add_name("node.loc.pos.utc", &node.loc.pos.utc, "double");
4770  add_name("node.loc.pos.icrf", &node.loc.pos.icrf, "cartpos");
4771  add_name("node.loc.pos.icrf.utc", &node.loc.pos.icrf.utc, "double");
4772  add_name("node.loc.pos.icrf.s", &node.loc.pos.icrf.s, "rvector");
4773  add_name("node.loc.pos.icrf.s.col", &node.loc.pos.icrf.s.col, "double[]");
4774  for(size_t i = 0; i < sizeof(node.loc.pos.icrf.s.col)/sizeof(node.loc.pos.icrf.s.col[0]); ++i) {
4775  string basename = "node.loc.pos.icrf.s.col[" + std::to_string(i) + "]";
4776  add_name(basename, &node.loc.pos.icrf.s.col[i], "double");
4777  }
4778  add_name("node.loc.pos.icrf.v", &node.loc.pos.icrf.v, "rvector");
4779  add_name("node.loc.pos.icrf.v.col", &node.loc.pos.icrf.v.col, "double[]");
4780  for(size_t i = 0; i < sizeof(node.loc.pos.icrf.v.col)/sizeof(node.loc.pos.icrf.v.col[0]); ++i) {
4781  string basename = "node.loc.pos.icrf.v.col[" + std::to_string(i) + "]";
4782  add_name(basename, &node.loc.pos.icrf.v.col[i], "double");
4783  }
4784  add_name("node.loc.pos.icrf.a", &node.loc.pos.icrf.a, "rvector");
4785  add_name("node.loc.pos.icrf.a.col", &node.loc.pos.icrf.a.col, "double[]");
4786  for(size_t i = 0; i < sizeof(node.loc.pos.icrf.a.col)/sizeof(node.loc.pos.icrf.a.col[0]); ++i) {
4787  string basename = "node.loc.pos.icrf.a.col[" + std::to_string(i) + "]";
4788  add_name(basename, &node.loc.pos.icrf.a.col[i], "double");
4789  }
4790  add_name("node.loc.pos.icrf.pass", &node.loc.pos.icrf.pass, "uint32_t");
4791  add_name("node.loc.pos.eci", &node.loc.pos.eci, "cartpos");
4792  add_name("node.loc.pos.eci.utc", &node.loc.pos.eci.utc, "double");
4793  add_name("node.loc.pos.eci.s", &node.loc.pos.eci.s, "rvector");
4794  add_name("node.loc.pos.eci.s.col", &node.loc.pos.eci.s.col, "double[]");
4795  for(size_t i = 0; i < sizeof(node.loc.pos.eci.s.col)/sizeof(node.loc.pos.eci.s.col[0]); ++i) {
4796  string basename = "node.loc.pos.eci.s.col[" + std::to_string(i) + "]";
4797  add_name(basename, &node.loc.pos.eci.s.col[i], "double");
4798  }
4799  add_name("node.loc.pos.eci.v", &node.loc.pos.eci.v, "rvector");
4800  add_name("node.loc.pos.eci.v.col", &node.loc.pos.eci.v.col, "double[]");
4801  for(size_t i = 0; i < sizeof(node.loc.pos.eci.v.col)/sizeof(node.loc.pos.eci.v.col[0]); ++i) {
4802  string basename = "node.loc.pos.eci.v.col[" + std::to_string(i) + "]";
4803  add_name(basename, &node.loc.pos.eci.v.col[i], "double");
4804  }
4805  add_name("node.loc.pos.eci.a", &node.loc.pos.eci.a, "rvector");
4806  add_name("node.loc.pos.eci.a.col", &node.loc.pos.eci.a.col, "double[]");
4807  for(size_t i = 0; i < sizeof(node.loc.pos.eci.a.col)/sizeof(node.loc.pos.eci.a.col[0]); ++i) {
4808  string basename = "node.loc.pos.eci.a.col[" + std::to_string(i) + "]";
4809  add_name(basename, &node.loc.pos.eci.a.col[i], "double");
4810  }
4811  add_name("node.loc.pos.eci.pass", &node.loc.pos.eci.pass, "uint32_t");
4812  add_name("node.loc.pos.sci", &node.loc.pos.sci, "cartpos");
4813  add_name("node.loc.pos.sci.utc", &node.loc.pos.sci.utc, "double");
4814  add_name("node.loc.pos.sci.s", &node.loc.pos.sci.s, "rvector");
4815  add_name("node.loc.pos.sci.s.col", &node.loc.pos.sci.s.col, "double[]");
4816  for(size_t i = 0; i < sizeof(node.loc.pos.sci.s.col)/sizeof(node.loc.pos.sci.s.col[0]); ++i) {
4817  string basename = "node.loc.pos.sci.s.col[" + std::to_string(i) + "]";
4818  add_name(basename, &node.loc.pos.sci.s.col[i], "double");
4819  }
4820  add_name("node.loc.pos.sci.v", &node.loc.pos.sci.v, "rvector");
4821  add_name("node.loc.pos.sci.v.col", &node.loc.pos.sci.v.col, "double[]");
4822  for(size_t i = 0; i < sizeof(node.loc.pos.sci.v.col)/sizeof(node.loc.pos.sci.v.col[0]); ++i) {
4823  string basename = "node.loc.pos.sci.v.col[" + std::to_string(i) + "]";
4824  add_name(basename, &node.loc.pos.sci.v.col[i], "double");
4825  }
4826  add_name("node.loc.pos.sci.a", &node.loc.pos.sci.a, "rvector");
4827  add_name("node.loc.pos.sci.a.col", &node.loc.pos.sci.a.col, "double[]");
4828  for(size_t i = 0; i < sizeof(node.loc.pos.sci.a.col)/sizeof(node.loc.pos.sci.a.col[0]); ++i) {
4829  string basename = "node.loc.pos.sci.a.col[" + std::to_string(i) + "]";
4830  add_name(basename, &node.loc.pos.sci.a.col[i], "double");
4831  }
4832  add_name("node.loc.pos.sci.pass", &node.loc.pos.sci.pass, "uint32_t");
4833  add_name("node.loc.pos.geoc", &node.loc.pos.geoc, "cartpos");
4834  add_name("node.loc.pos.geoc.utc", &node.loc.pos.geoc.utc, "double");
4835  add_name("node.loc.pos.geoc.s", &node.loc.pos.geoc.s, "rvector");
4836  add_name("node.loc.pos.geoc.s.col", &node.loc.pos.geoc.s.col, "double[]");
4837  for(size_t i = 0; i < sizeof(node.loc.pos.geoc.s.col)/sizeof(node.loc.pos.geoc.s.col[0]); ++i) {
4838  string basename = "node.loc.pos.geoc.s.col[" + std::to_string(i) + "]";
4839  add_name(basename, &node.loc.pos.geoc.s.col[i], "double");
4840  }
4841  add_name("node.loc.pos.geoc.v", &node.loc.pos.geoc.v, "rvector");
4842  add_name("node.loc.pos.geoc.v.col", &node.loc.pos.geoc.v.col, "double[]");
4843  for(size_t i = 0; i < sizeof(node.loc.pos.geoc.v.col)/sizeof(node.loc.pos.geoc.v.col[0]); ++i) {
4844  string basename = "node.loc.pos.geoc.v.col[" + std::to_string(i) + "]";
4845  add_name(basename, &node.loc.pos.geoc.v.col[i], "double");
4846  }
4847  add_name("node.loc.pos.geoc.a", &node.loc.pos.geoc.a, "rvector");
4848  add_name("node.loc.pos.geoc.a.col", &node.loc.pos.geoc.a.col, "double[]");
4849  for(size_t i = 0; i < sizeof(node.loc.pos.geoc.a.col)/sizeof(node.loc.pos.geoc.a.col[0]); ++i) {
4850  string basename = "node.loc.pos.geoc.a.col[" + std::to_string(i) + "]";
4851  add_name(basename, &node.loc.pos.geoc.a.col[i], "double");
4852  }
4853  add_name("node.loc.pos.geoc.pass", &node.loc.pos.geoc.pass, "uint32_t");
4854  add_name("node.loc.pos.selc", &node.loc.pos.selc, "cartpos");
4855  add_name("node.loc.pos.selc.utc", &node.loc.pos.selc.utc, "double");
4856  add_name("node.loc.pos.selc.s", &node.loc.pos.selc.s, "rvector");
4857  add_name("node.loc.pos.selc.s.col", &node.loc.pos.selc.s.col, "double[]");
4858  for(size_t i = 0; i < sizeof(node.loc.pos.selc.s.col)/sizeof(node.loc.pos.selc.s.col[0]); ++i) {
4859  string basename = "node.loc.pos.selc.s.col[" + std::to_string(i) + "]";
4860  add_name(basename, &node.loc.pos.selc.s.col[i], "double");
4861  }
4862  add_name("node.loc.pos.selc.v", &node.loc.pos.selc.v, "rvector");
4863  add_name("node.loc.pos.selc.v.col", &node.loc.pos.selc.v.col, "double[]");
4864  for(size_t i = 0; i < sizeof(node.loc.pos.selc.v.col)/sizeof(node.loc.pos.selc.v.col[0]); ++i) {
4865  string basename = "node.loc.pos.selc.v.col[" + std::to_string(i) + "]";
4866  add_name(basename, &node.loc.pos.selc.v.col[i], "double");
4867  }
4868  add_name("node.loc.pos.selc.a", &node.loc.pos.selc.a, "rvector");
4869  add_name("node.loc.pos.selc.a.col", &node.loc.pos.selc.a.col, "double[]");
4870  for(size_t i = 0; i < sizeof(node.loc.pos.selc.a.col)/sizeof(node.loc.pos.selc.a.col[0]); ++i) {
4871  string basename = "node.loc.pos.selc.a.col[" + std::to_string(i) + "]";
4872  add_name(basename, &node.loc.pos.selc.a.col[i], "double");
4873  }
4874  add_name("node.loc.pos.selc.pass", &node.loc.pos.selc.pass, "uint32_t");
4875  add_name("node.loc.pos.geod", &node.loc.pos.geod, "geoidpos");
4876  add_name("node.loc.pos.geod.utc", &node.loc.pos.geod.utc, "double");
4877  add_name("node.loc.pos.geod.s", &node.loc.pos.geod.s, "gvector");
4878  add_name("node.loc.pos.geod.s.lat", &node.loc.pos.geod.s.lat, "double");
4879  add_name("node.loc.pos.geod.s.lon", &node.loc.pos.geod.s.lon, "double");
4880  add_name("node.loc.pos.geod.s.h", &node.loc.pos.geod.s.h, "double");
4881  add_name("node.loc.pos.geod.v", &node.loc.pos.geod.v, "gvector");
4882  add_name("node.loc.pos.geod.v.lat", &node.loc.pos.geod.v.lat, "double");
4883  add_name("node.loc.pos.geod.v.lon", &node.loc.pos.geod.v.lon, "double");
4884  add_name("node.loc.pos.geod.v.h", &node.loc.pos.geod.v.h, "double");
4885  add_name("node.loc.pos.geod.a", &node.loc.pos.geod.a, "gvector");
4886  add_name("node.loc.pos.geod.a.lat", &node.loc.pos.geod.a.lat, "double");
4887  add_name("node.loc.pos.geod.a.lon", &node.loc.pos.geod.a.lon, "double");
4888  add_name("node.loc.pos.geod.a.h", &node.loc.pos.geod.a.h, "double");
4889  add_name("node.loc.pos.geod.pass", &node.loc.pos.geod.pass, "uint32_t");
4890  add_name("node.loc.pos.selg", &node.loc.pos.selg, "geoidpos");
4891  add_name("node.loc.pos.selg.utc", &node.loc.pos.selg.utc, "double");
4892  add_name("node.loc.pos.selg.s", &node.loc.pos.selg.s, "gvector");
4893  add_name("node.loc.pos.selg.s.lat", &node.loc.pos.selg.s.lat, "double");
4894  add_name("node.loc.pos.selg.s.lon", &node.loc.pos.selg.s.lon, "double");
4895  add_name("node.loc.pos.selg.s.h", &node.loc.pos.selg.s.h, "double");
4896  add_name("node.loc.pos.selg.v", &node.loc.pos.selg.v, "gvector");
4897  add_name("node.loc.pos.selg.v.lat", &node.loc.pos.selg.v.lat, "double");
4898  add_name("node.loc.pos.selg.v.lon", &node.loc.pos.selg.v.lon, "double");
4899  add_name("node.loc.pos.selg.v.h", &node.loc.pos.selg.v.h, "double");
4900  add_name("node.loc.pos.selg.a", &node.loc.pos.selg.a, "gvector");
4901  add_name("node.loc.pos.selg.a.lat", &node.loc.pos.selg.a.lat, "double");
4902  add_name("node.loc.pos.selg.a.lon", &node.loc.pos.selg.a.lon, "double");
4903  add_name("node.loc.pos.selg.a.h", &node.loc.pos.selg.a.h, "double");
4904  add_name("node.loc.pos.selg.pass", &node.loc.pos.selg.pass, "uint32_t");
4905  add_name("node.loc.pos.geos", &node.loc.pos.geos, "spherpos");
4906  add_name("node.loc.pos.geos.utc", &node.loc.pos.geos.utc, "double");
4907  add_name("node.loc.pos.geos.s", &node.loc.pos.geos.s, "svector");
4908  add_name("node.loc.pos.geos.s.phi", &node.loc.pos.geos.s.phi, "double");
4909  add_name("node.loc.pos.geos.s.lambda", &node.loc.pos.geos.s.lambda, "double");
4910  add_name("node.loc.pos.geos.s.r", &node.loc.pos.geos.s.r, "double");
4911  add_name("node.loc.pos.geos.v", &node.loc.pos.geos.v, "svector");
4912  add_name("node.loc.pos.geos.v.phi", &node.loc.pos.geos.v.phi, "double");
4913  add_name("node.loc.pos.geos.v.lambda", &node.loc.pos.geos.v.lambda, "double");
4914  add_name("node.loc.pos.geos.v.r", &node.loc.pos.geos.v.r, "double");
4915  add_name("node.loc.pos.geos.a", &node.loc.pos.geos.a, "svector");
4916  add_name("node.loc.pos.geos.a.phi", &node.loc.pos.geos.a.phi, "double");
4917  add_name("node.loc.pos.geos.a.lambda", &node.loc.pos.geos.a.lambda, "double");
4918  add_name("node.loc.pos.geos.a.r", &node.loc.pos.geos.a.r, "double");
4919  add_name("node.loc.pos.geos.pass", &node.loc.pos.geos.pass, "uint32_t");
4920  add_name("node.loc.pos.extra", &node.loc.pos.extra, "extrapos");
4921  add_name("node.loc.pos.extra.utc", &node.loc.pos.extra.utc, "double");
4922  add_name("node.loc.pos.extra.tt", &node.loc.pos.extra.tt, "double");
4923  add_name("node.loc.pos.extra.ut", &node.loc.pos.extra.ut, "double");
4924  add_name("node.loc.pos.extra.tdb", &node.loc.pos.extra.tdb, "double");
4925  add_name("node.loc.pos.extra.j2e", &node.loc.pos.extra.j2e, "rmatrix");
4926  add_name("node.loc.pos.extra.j2e.row", &node.loc.pos.extra.j2e.row, "rvector[]");
4927  for(size_t i = 0; i < sizeof(node.loc.pos.extra.j2e.row)/sizeof(node.loc.pos.extra.j2e.row[0]); ++i) {
4928  string basename = "node.loc.pos.extra.j2e.row[" + std::to_string(i) + "]";
4929  add_name(basename, &node.loc.pos.extra.j2e.row[i], "rvector");
4930  add_name(basename+".col", &node.loc.pos.extra.j2e.row[i].col, "double[]");
4931  for(size_t j = 0; j < sizeof(node.loc.pos.extra.j2e.row[i].col)/sizeof(node.loc.pos.extra.j2e.row[i].col[0]); ++j) {
4932  string rebasename = basename + ".col[" + std::to_string(j) + "]";
4933  add_name(rebasename, &node.loc.pos.extra.j2e.row[i].col[j], "double");
4934  }
4935  }
4936  add_name("node.loc.pos.extra.dj2e", &node.loc.pos.extra.dj2e, "rmatrix");
4937  add_name("node.loc.pos.extra.dj2e.row", &node.loc.pos.extra.dj2e.row, "rvector[]");
4938  for(size_t i = 0; i < sizeof(node.loc.pos.extra.dj2e.row)/sizeof(node.loc.pos.extra.dj2e.row[0]); ++i) {
4939  string basename = "node.loc.pos.extra.dj2e.row[" + std::to_string(i) + "]";
4940  add_name(basename, &node.loc.pos.extra.dj2e.row[i], "rvector");
4941  add_name(basename+".col", &node.loc.pos.extra.dj2e.row[i].col, "double[]");
4942  for(size_t j = 0; j < sizeof(node.loc.pos.extra.dj2e.row[i].col)/sizeof(node.loc.pos.extra.dj2e.row[i].col[0]); ++j) {
4943  string rebasename = basename + ".col[" + std::to_string(j) + "]";
4944  add_name(rebasename, &node.loc.pos.extra.dj2e.row[i].col[j], "double");
4945  }
4946  }
4947  add_name("node.loc.pos.extra.ddj2e", &node.loc.pos.extra.ddj2e, "rmatrix");
4948  add_name("node.loc.pos.extra.ddj2e.row", &node.loc.pos.extra.ddj2e.row, "rvector[]");
4949  for(size_t i = 0; i < sizeof(node.loc.pos.extra.ddj2e.row)/sizeof(node.loc.pos.extra.ddj2e.row[0]); ++i) {
4950  string basename = "node.loc.pos.extra.ddj2e.row[" + std::to_string(i) + "]";
4951  add_name(basename, &node.loc.pos.extra.ddj2e.row[i], "rvector");
4952  add_name(basename+".col", &node.loc.pos.extra.ddj2e.row[i].col, "double[]");
4953  for(size_t j = 0; j < sizeof(node.loc.pos.extra.ddj2e.row[i].col)/sizeof(node.loc.pos.extra.ddj2e.row[i].col[0]); ++j) {
4954  string rebasename = basename + ".col[" + std::to_string(j) + "]";
4955  add_name(rebasename, &node.loc.pos.extra.ddj2e.row[i].col[j], "double");
4956  }
4957  }
4958  add_name("node.loc.pos.extra.e2j", &node.loc.pos.extra.e2j, "rmatrix");
4959  add_name("node.loc.pos.extra.e2j.row", &node.loc.pos.extra.e2j.row, "rvector[]");
4960  for(size_t i = 0; i < sizeof(node.loc.pos.extra.e2j.row)/sizeof(node.loc.pos.extra.e2j.row[0]); ++i) {
4961  string basename = "node.loc.pos.extra.e2j.row[" + std::to_string(i) + "]";
4962  add_name(basename, &node.loc.pos.extra.e2j.row[i], "rvector");
4963  add_name(basename+".col", &node.loc.pos.extra.e2j.row[i].col, "double[]");
4964  for(size_t j = 0; j < sizeof(node.loc.pos.extra.e2j.row[i].col)/sizeof(node.loc.pos.extra.e2j.row[i].col[0]); ++j) {
4965  string rebasename = basename + ".col[" + std::to_string(j) + "]";
4966  add_name(rebasename, &node.loc.pos.extra.e2j.row[i].col[j], "double");
4967  }
4968  }
4969  add_name("node.loc.pos.extra.de2j", &node.loc.pos.extra.de2j, "rmatrix");
4970  add_name("node.loc.pos.extra.de2j.row", &node.loc.pos.extra.de2j.row, "rvector[]");
4971  for(size_t i = 0; i < sizeof(node.loc.pos.extra.de2j.row)/sizeof(node.loc.pos.extra.de2j.row[0]); ++i) {
4972  string basename = "node.loc.pos.extra.de2j.row[" + std::to_string(i) + "]";
4973  add_name(basename, &node.loc.pos.extra.de2j.row[i], "rvector");
4974  add_name(basename+".col", &node.loc.pos.extra.de2j.row[i].col, "double[]");
4975  for(size_t j = 0; j < sizeof(node.loc.pos.extra.de2j.row[i].col)/sizeof(node.loc.pos.extra.de2j.row[i].col[0]); ++j) {
4976  string rebasename = basename + ".col[" + std::to_string(j) + "]";
4977  add_name(rebasename, &node.loc.pos.extra.de2j.row[i].col[j], "double");
4978  }
4979  }
4980  add_name("node.loc.pos.extra.dde2j", &node.loc.pos.extra.dde2j, "rmatrix");
4981  add_name("node.loc.pos.extra.dde2j.row", &node.loc.pos.extra.dde2j.row, "rvector[]");
4982  for(size_t i = 0; i < sizeof(node.loc.pos.extra.dde2j.row)/sizeof(node.loc.pos.extra.dde2j.row[0]); ++i) {
4983  string basename = "node.loc.pos.extra.dde2j.row[" + std::to_string(i) + "]";
4984  add_name(basename, &node.loc.pos.extra.dde2j.row[i], "rvector");
4985  add_name(basename+".col", &node.loc.pos.extra.dde2j.row[i].col, "double[]");
4986  for(size_t j = 0; j < sizeof(node.loc.pos.extra.dde2j.row[i].col)/sizeof(node.loc.pos.extra.dde2j.row[i].col[0]); ++j) {
4987  string rebasename = basename + ".col[" + std::to_string(j) + "]";
4988  add_name(rebasename, &node.loc.pos.extra.dde2j.row[i].col[j], "double");
4989  }
4990  }
4991  add_name("node.loc.pos.extra.j2t", &node.loc.pos.extra.j2t, "rmatrix");
4992  add_name("node.loc.pos.extra.j2t.row", &node.loc.pos.extra.j2t.row, "rvector[]");
4993  for(size_t i = 0; i < sizeof(node.loc.pos.extra.j2t.row)/sizeof(node.loc.pos.extra.j2t.row[0]); ++i) {
4994  string basename = "node.loc.pos.extra.j2t.row[" + std::to_string(i) + "]";
4995  add_name(basename, &node.loc.pos.extra.j2t.row[i], "rvector");
4996  add_name(basename+".col", &node.loc.pos.extra.j2t.row[i].col, "double[]");
4997  for(size_t j = 0; j < sizeof(node.loc.pos.extra.j2t.row[i].col)/sizeof(node.loc.pos.extra.j2t.row[i].col[0]); ++j) {
4998  string rebasename = basename + ".col[" + std::to_string(j) + "]";
4999  add_name(rebasename, &node.loc.pos.extra.j2t.row[i].col[j], "double");
5000  }
5001  }
5002  add_name("node.loc.pos.extra.j2s", &node.loc.pos.extra.j2s, "rmatrix");
5003  add_name("node.loc.pos.extra.j2s.row", &node.loc.pos.extra.j2s.row, "rvector[]");
5004  for(size_t i = 0; i < sizeof(node.loc.pos.extra.j2s.row)/sizeof(node.loc.pos.extra.j2s.row[0]); ++i) {
5005  string basename = "node.loc.pos.extra.j2s.row[" + std::to_string(i) + "]";
5006  add_name(basename, &node.loc.pos.extra.j2s.row[i], "rvector");
5007  add_name(basename+".col", &node.loc.pos.extra.j2s.row[i].col, "double[]");
5008  for(size_t j = 0; j < sizeof(node.loc.pos.extra.j2s.row[i].col)/sizeof(node.loc.pos.extra.j2s.row[i].col[0]); ++j) {
5009  string rebasename = basename + ".col[" + std::to_string(j) + "]";
5010  add_name(rebasename, &node.loc.pos.extra.j2s.row[i].col[j], "double");
5011  }
5012  }
5013  add_name("node.loc.pos.extra.t2j", &node.loc.pos.extra.t2j, "rmatrix");
5014  add_name("node.loc.pos.extra.t2j.row", &node.loc.pos.extra.t2j.row, "rvector[]");
5015  for(size_t i = 0; i < sizeof(node.loc.pos.extra.t2j.row)/sizeof(node.loc.pos.extra.t2j.row[0]); ++i) {
5016  string basename = "node.loc.pos.extra.t2j.row[" + std::to_string(i) + "]";
5017  add_name(basename, &node.loc.pos.extra.t2j.row[i], "rvector");
5018  add_name(basename+".col", &node.loc.pos.extra.t2j.row[i].col, "double[]");
5019  for(size_t j = 0; j < sizeof(node.loc.pos.extra.t2j.row[i].col)/sizeof(node.loc.pos.extra.t2j.row[i].col[0]); ++j) {
5020  string rebasename = basename + ".col[" + std::to_string(j) + "]";
5021  add_name(rebasename, &node.loc.pos.extra.t2j.row[i].col[j], "double");
5022  }
5023  }
5024  add_name("node.loc.pos.extra.s2j", &node.loc.pos.extra.s2j, "rmatrix");
5025  add_name("node.loc.pos.extra.s2j.row", &node.loc.pos.extra.s2j.row, "rvector[]");
5026  for(size_t i = 0; i < sizeof(node.loc.pos.extra.s2j.row)/sizeof(node.loc.pos.extra.s2j.row[0]); ++i) {
5027  string basename = "node.loc.pos.extra.s2j.row[" + std::to_string(i) + "]";
5028  add_name(basename, &node.loc.pos.extra.s2j.row[i], "rvector");
5029  add_name(basename+".col", &node.loc.pos.extra.s2j.row[i].col, "double[]");
5030  for(size_t j = 0; j < sizeof(node.loc.pos.extra.s2j.row[i].col)/sizeof(node.loc.pos.extra.s2j.row[i].col[0]); ++j) {
5031  string rebasename = basename + ".col[" + std::to_string(j) + "]";
5032  add_name(rebasename, &node.loc.pos.extra.s2j.row[i].col[j], "double");
5033  }
5034  }
5035  add_name("node.loc.pos.extra.s2t", &node.loc.pos.extra.s2t, "rmatrix");
5036  add_name("node.loc.pos.extra.s2t.row", &node.loc.pos.extra.s2t.row, "rvector[]");
5037  for(size_t i = 0; i < sizeof(node.loc.pos.extra.s2t.row)/sizeof(node.loc.pos.extra.s2t.row[0]); ++i) {
5038  string basename = "node.loc.pos.extra.s2t.row[" + std::to_string(i) + "]";
5039  add_name(basename, &node.loc.pos.extra.s2t.row[i], "rvector");
5040  add_name(basename+".col", &node.loc.pos.extra.s2t.row[i].col, "double[]");
5041  for(size_t j = 0; j < sizeof(node.loc.pos.extra.s2t.row[i].col)/sizeof(node.loc.pos.extra.s2t.row[i].col[0]); ++j) {
5042  string rebasename = basename + ".col[" + std::to_string(j) + "]";
5043  add_name(rebasename, &node.loc.pos.extra.s2t.row[i].col[j], "double");
5044  }
5045  }
5046  add_name("node.loc.pos.extra.ds2t", &node.loc.pos.extra.ds2t, "rmatrix");
5047  add_name("node.loc.pos.extra.ds2t.row", &node.loc.pos.extra.ds2t.row, "rvector[]");
5048  for(size_t i = 0; i < sizeof(node.loc.pos.extra.ds2t.row)/sizeof(node.loc.pos.extra.ds2t.row[0]); ++i) {
5049  string basename = "node.loc.pos.extra.ds2t.row[" + std::to_string(i) + "]";
5050  add_name(basename, &node.loc.pos.extra.ds2t.row[i], "rvector");
5051  add_name(basename+".col", &node.loc.pos.extra.ds2t.row[i].col, "double[]");
5052  for(size_t j = 0; j < sizeof(node.loc.pos.extra.ds2t.row[i].col)/sizeof(node.loc.pos.extra.ds2t.row[i].col[0]); ++j) {
5053  string rebasename = basename + ".col[" + std::to_string(j) + "]";
5054  add_name(rebasename, &node.loc.pos.extra.ds2t.row[i].col[j], "double");
5055  }
5056  }
5057  add_name("node.loc.pos.extra.t2s", &node.loc.pos.extra.t2s, "rmatrix");
5058  add_name("node.loc.pos.extra.t2s.row", &node.loc.pos.extra.t2s.row, "rvector[]");
5059  for(size_t i = 0; i < sizeof(node.loc.pos.extra.t2s.row)/sizeof(node.loc.pos.extra.t2s.row[0]); ++i) {
5060  string basename = "node.loc.pos.extra.t2s.row[" + std::to_string(i) + "]";
5061  add_name(basename, &node.loc.pos.extra.t2s.row[i], "rvector");
5062  add_name(basename+".col", &node.loc.pos.extra.t2s.row[i].col, "double[]");
5063  for(size_t j = 0; j < sizeof(node.loc.pos.extra.t2s.row[i].col)/sizeof(node.loc.pos.extra.t2s.row[i].col[0]); ++j) {
5064  string rebasename = basename + ".col[" + std::to_string(j) + "]";
5065  add_name(rebasename, &node.loc.pos.extra.t2s.row[i].col[j], "double");
5066  }
5067  }
5068  add_name("node.loc.pos.extra.dt2s", &node.loc.pos.extra.dt2s, "rmatrix");
5069  add_name("node.loc.pos.extra.dt2s.row", &node.loc.pos.extra.dt2s.row, "rvector[]");
5070  for(size_t i = 0; i < sizeof(node.loc.pos.extra.dt2s.row)/sizeof(node.loc.pos.extra.dt2s.row[0]); ++i) {
5071  string basename = "node.loc.pos.extra.dt2s.row[" + std::to_string(i) + "]";
5072  add_name(basename, &node.loc.pos.extra.dt2s.row[i], "rvector");
5073  add_name(basename+".col", &node.loc.pos.extra.dt2s.row[i].col, "double[]");
5074  for(size_t j = 0; j < sizeof(node.loc.pos.extra.dt2s.row[i].col)/sizeof(node.loc.pos.extra.dt2s.row[i].col[0]); ++j) {
5075  string rebasename = basename + ".col[" + std::to_string(j) + "]";
5076  add_name(rebasename, &node.loc.pos.extra.dt2s.row[i].col[j], "double");
5077  }
5078  }
5079  add_name("node.loc.pos.extra.sun2earth", &node.loc.pos.extra.sun2earth, "cartpos");
5080  add_name("node.loc.pos.extra.sun2earth.utc", &node.loc.pos.extra.sun2earth.utc, "double");
5081  add_name("node.loc.pos.extra.sun2earth.s", &node.loc.pos.extra.sun2earth.s, "rvector");
5082  add_name("node.loc.pos.extra.sun2earth.s.col", &node.loc.pos.extra.sun2earth.s.col, "double[]");
5083  for(size_t i = 0; i < sizeof(node.loc.pos.extra.sun2earth.s.col)/sizeof(node.loc.pos.extra.sun2earth.s.col[0]); ++i) {
5084  string basename = "node.loc.pos.extra.sun2earth.s.col[" + std::to_string(i) + "]";
5085  add_name(basename, &node.loc.pos.extra.sun2earth.s.col[i], "double");
5086  }
5087  add_name("node.loc.pos.extra.sun2earth.v", &node.loc.pos.extra.sun2earth.v, "rvector");
5088  add_name("node.loc.pos.extra.sun2earth.v.col", &node.loc.pos.extra.sun2earth.v.col, "double[]");
5089  for(size_t i = 0; i < sizeof(node.loc.pos.extra.sun2earth.v.col)/sizeof(node.loc.pos.extra.sun2earth.v.col[0]); ++i) {
5090  string basename = "node.loc.pos.extra.sun2earth.v.col[" + std::to_string(i) + "]";
5091  add_name(basename, &node.loc.pos.extra.sun2earth.v.col[i], "double");
5092  }
5093  add_name("node.loc.pos.extra.sun2earth.a", &node.loc.pos.extra.sun2earth.a, "rvector");
5094  add_name("node.loc.pos.extra.sun2earth.a.col", &node.loc.pos.extra.sun2earth.a.col, "double[]");
5095  for(size_t i = 0; i < sizeof(node.loc.pos.extra.sun2earth.a.col)/sizeof(node.loc.pos.extra.sun2earth.a.col[0]); ++i) {
5096  string basename = "node.loc.pos.extra.sun2earth.a.col[" + std::to_string(i) + "]";
5097  add_name(basename, &node.loc.pos.extra.sun2earth.a.col[i], "double");
5098  }
5099  add_name("node.loc.pos.extra.sun2earth.pass", &node.loc.pos.extra.sun2earth.pass, "uint32_t");
5100  add_name("node.loc.pos.extra.sun2moon", &node.loc.pos.extra.sun2moon, "cartpos");
5101  add_name("node.loc.pos.extra.sun2moon.utc", &node.loc.pos.extra.sun2moon.utc, "double");
5102  add_name("node.loc.pos.extra.sun2moon.s", &node.loc.pos.extra.sun2moon.s, "rvector");
5103  add_name("node.loc.pos.extra.sun2moon.s.col", &node.loc.pos.extra.sun2moon.s.col, "double[]");
5104  for(size_t i = 0; i < sizeof(node.loc.pos.extra.sun2moon.s.col)/sizeof(node.loc.pos.extra.sun2moon.s.col[0]); ++i) {
5105  string basename = "node.loc.pos.extra.sun2moon.s.col[" + std::to_string(i) + "]";
5106  add_name(basename, &node.loc.pos.extra.sun2moon.s.col[i], "double");
5107  }
5108  add_name("node.loc.pos.extra.sun2moon.v", &node.loc.pos.extra.sun2moon.v, "rvector");
5109  add_name("node.loc.pos.extra.sun2moon.v.col", &node.loc.pos.extra.sun2moon.v.col, "double[]");
5110  for(size_t i = 0; i < sizeof(node.loc.pos.extra.sun2moon.v.col)/sizeof(node.loc.pos.extra.sun2moon.v.col[0]); ++i) {
5111  string basename = "node.loc.pos.extra.sun2moon.v.col[" + std::to_string(i) + "]";
5112  add_name(basename, &node.loc.pos.extra.sun2moon.v.col[i], "double");
5113  }
5114  add_name("node.loc.pos.extra.sun2moon.a", &node.loc.pos.extra.sun2moon.a, "rvector");
5115  add_name("node.loc.pos.extra.sun2moon.a.col", &node.loc.pos.extra.sun2moon.a.col, "double[]");
5116  for(size_t i = 0; i < sizeof(node.loc.pos.extra.sun2moon.a.col)/sizeof(node.loc.pos.extra.sun2moon.a.col[0]); ++i) {
5117  string basename = "node.loc.pos.extra.sun2moon.a.col[" + std::to_string(i) + "]";
5118  add_name(basename, &node.loc.pos.extra.sun2moon.a.col[i], "double");
5119  }
5120  add_name("node.loc.pos.extra.sun2moon.pass", &node.loc.pos.extra.sun2moon.pass, "uint32_t");
5121  add_name("node.loc.pos.extra.closest", &node.loc.pos.extra.closest, "uint16_t");
5122  add_name("node.loc.pos.earthsep", &node.loc.pos.earthsep, "float");
5123  add_name("node.loc.pos.moonsep", &node.loc.pos.moonsep, "float");
5124  add_name("node.loc.pos.sunsize", &node.loc.pos.sunsize, "float");
5125  add_name("node.loc.pos.sunradiance", &node.loc.pos.sunradiance, "float");
5126  add_name("node.loc.pos.bearth", &node.loc.pos.bearth, "rvector");
5127  add_name("node.loc.pos.bearth.col", &node.loc.pos.bearth.col, "double[]");
5128  for(size_t i = 0; i < sizeof(node.loc.pos.bearth.col)/sizeof(node.loc.pos.bearth.col[0]); ++i) {
5129  string basename = "node.loc.pos.bearth.col[" + std::to_string(i) + "]";
5130  add_name(basename, &node.loc.pos.bearth.col[i], "double");
5131  }
5132  add_name("node.loc.pos.orbit", &node.loc.pos.orbit, "double");
5133  add_name("node.loc.att", &node.loc.att, "attstruc");
5134  add_name("node.loc.att.utc", &node.loc.att.utc, "double");
5135  add_name("node.loc.att.topo", &node.loc.att.topo, "qatt");
5136  add_name("node.loc.att.topo.utc", &node.loc.att.topo.utc, "double");
5137  add_name("node.loc.att.topo.s", &node.loc.att.topo.s, "quaternion");
5138  add_name("node.loc.att.topo.s.d", &node.loc.att.topo.s.d, "cvector");
5139  add_name("node.loc.att.topo.s.d.x", &node.loc.att.topo.s.d.x, "double");
5140  add_name("node.loc.att.topo.s.d.y", &node.loc.att.topo.s.d.y, "double");
5141  add_name("node.loc.att.topo.s.d.z", &node.loc.att.topo.s.d.z, "double");
5142  add_name("node.loc.att.topo.s.w", &node.loc.att.topo.s.w, "double");
5143  add_name("node.loc.att.topo.v", &node.loc.att.topo.v, "rvector");
5144  add_name("node.loc.att.topo.v.col", &node.loc.att.topo.v.col, "double[]");
5145  for(size_t i = 0; i < sizeof(node.loc.att.topo.v.col)/sizeof(node.loc.att.topo.v.col[0]); ++i) {
5146  string basename = "node.loc.att.topo.v.col[" + std::to_string(i) + "]";
5147  add_name(basename, &node.loc.att.topo.v.col[i], "double");
5148  }
5149  add_name("node.loc.att.topo.a", &node.loc.att.topo.a, "rvector");
5150  add_name("node.loc.att.topo.a.col", &node.loc.att.topo.a.col, "double[]");
5151  for(size_t i = 0; i < sizeof(node.loc.att.topo.a.col)/sizeof(node.loc.att.topo.a.col[0]); ++i) {
5152  string basename = "node.loc.att.topo.a.col[" + std::to_string(i) + "]";
5153  add_name(basename, &node.loc.att.topo.a.col[i], "double");
5154  }
5155  add_name("node.loc.att.topo.pass", &node.loc.att.topo.pass, "uint32_t");
5156  add_name("node.loc.att.lvlh", &node.loc.att.lvlh, "qatt");
5157  add_name("node.loc.att.lvlh.utc", &node.loc.att.lvlh.utc, "double");
5158  add_name("node.loc.att.lvlh.s", &node.loc.att.lvlh.s, "quaternion");
5159  add_name("node.loc.att.lvlh.s.d", &node.loc.att.lvlh.s.d, "cvector");
5160  add_name("node.loc.att.lvlh.s.d.x", &node.loc.att.lvlh.s.d.x, "double");
5161  add_name("node.loc.att.lvlh.s.d.y", &node.loc.att.lvlh.s.d.y, "double");
5162  add_name("node.loc.att.lvlh.s.d.z", &node.loc.att.lvlh.s.d.z, "double");
5163  add_name("node.loc.att.lvlh.s.w", &node.loc.att.lvlh.s.w, "double");
5164  add_name("node.loc.att.lvlh.v", &node.loc.att.lvlh.v, "rvector");
5165  add_name("node.loc.att.lvlh.v.col", &node.loc.att.lvlh.v.col, "double[]");
5166  for(size_t i = 0; i < sizeof(node.loc.att.lvlh.v.col)/sizeof(node.loc.att.lvlh.v.col[0]); ++i) {
5167  string basename = "node.loc.att.lvlh.v.col[" + std::to_string(i) + "]";
5168  add_name(basename, &node.loc.att.lvlh.v.col[i], "double");
5169  }
5170  add_name("node.loc.att.lvlh.a", &node.loc.att.lvlh.a, "rvector");
5171  add_name("node.loc.att.lvlh.a.col", &node.loc.att.lvlh.a.col, "double[]");
5172  for(size_t i = 0; i < sizeof(node.loc.att.lvlh.a.col)/sizeof(node.loc.att.lvlh.a.col[0]); ++i) {
5173  string basename = "node.loc.att.lvlh.a.col[" + std::to_string(i) + "]";
5174  add_name(basename, &node.loc.att.lvlh.a.col[i], "double");
5175  }
5176  add_name("node.loc.att.lvlh.pass", &node.loc.att.lvlh.pass, "uint32_t");
5177  add_name("node.loc.att.geoc", &node.loc.att.geoc, "qatt");
5178  add_name("node.loc.att.geoc.utc", &node.loc.att.geoc.utc, "double");
5179  add_name("node.loc.att.geoc.s", &node.loc.att.geoc.s, "quaternion");
5180  add_name("node.loc.att.geoc.s.d", &node.loc.att.geoc.s.d, "cvector");
5181  add_name("node.loc.att.geoc.s.d.x", &node.loc.att.geoc.s.d.x, "double");
5182  add_name("node.loc.att.geoc.s.d.y", &node.loc.att.geoc.s.d.y, "double");
5183  add_name("node.loc.att.geoc.s.d.z", &node.loc.att.geoc.s.d.z, "double");
5184  add_name("node.loc.att.geoc.s.w", &node.loc.att.geoc.s.w, "double");
5185  add_name("node.loc.att.geoc.v", &node.loc.att.geoc.v, "rvector");
5186  add_name("node.loc.att.geoc.v.col", &node.loc.att.geoc.v.col, "double[]");
5187  for(size_t i = 0; i < sizeof(node.loc.att.geoc.v.col)/sizeof(node.loc.att.geoc.v.col[0]); ++i) {
5188  string basename = "node.loc.att.geoc.v.col[" + std::to_string(i) + "]";
5189  add_name(basename, &node.loc.att.geoc.v.col[i], "double");
5190  }
5191  add_name("node.loc.att.geoc.a", &node.loc.att.geoc.a, "rvector");
5192  add_name("node.loc.att.geoc.a.col", &node.loc.att.geoc.a.col, "double[]");
5193  for(size_t i = 0; i < sizeof(node.loc.att.geoc.a.col)/sizeof(node.loc.att.geoc.a.col[0]); ++i) {
5194  string basename = "node.loc.att.geoc.a.col[" + std::to_string(i) + "]";
5195  add_name(basename, &node.loc.att.geoc.a.col[i], "double");
5196  }
5197  add_name("node.loc.att.geoc.pass", &node.loc.att.geoc.pass, "uint32_t");
5198  add_name("node.loc.att.selc", &node.loc.att.selc, "qatt");
5199  add_name("node.loc.att.selc.utc", &node.loc.att.selc.utc, "double");
5200  add_name("node.loc.att.selc.s", &node.loc.att.selc.s, "quaternion");
5201  add_name("node.loc.att.selc.s.d", &node.loc.att.selc.s.d, "cvector");
5202  add_name("node.loc.att.selc.s.d.x", &node.loc.att.selc.s.d.x, "double");
5203  add_name("node.loc.att.selc.s.d.y", &node.loc.att.selc.s.d.y, "double");
5204  add_name("node.loc.att.selc.s.d.z", &node.loc.att.selc.s.d.z, "double");
5205  add_name("node.loc.att.selc.s.w", &node.loc.att.selc.s.w, "double");
5206  add_name("node.loc.att.selc.v", &node.loc.att.selc.v, "rvector");
5207  add_name("node.loc.att.selc.v.col", &node.loc.att.selc.v.col, "double[]");
5208  for(size_t i = 0; i < sizeof(node.loc.att.selc.v.col)/sizeof(node.loc.att.selc.v.col[0]); ++i) {
5209  string basename = "node.loc.att.selc.v.col[" + std::to_string(i) + "]";
5210  add_name(basename, &node.loc.att.selc.v.col[i], "double");
5211  }
5212  add_name("node.loc.att.selc.a", &node.loc.att.selc.a, "rvector");
5213  add_name("node.loc.att.selc.a.col", &node.loc.att.selc.a.col, "double[]");
5214  for(size_t i = 0; i < sizeof(node.loc.att.selc.a.col)/sizeof(node.loc.att.selc.a.col[0]); ++i) {
5215  string basename = "node.loc.att.selc.a.col[" + std::to_string(i) + "]";
5216  add_name(basename, &node.loc.att.selc.a.col[i], "double");
5217  }
5218  add_name("node.loc.att.selc.pass", &node.loc.att.selc.pass, "uint32_t");
5219  add_name("node.loc.att.icrf", &node.loc.att.icrf, "qatt");
5220  add_name("node.loc.att.icrf.utc", &node.loc.att.icrf.utc, "double");
5221  add_name("node.loc.att.icrf.s", &node.loc.att.icrf.s, "quaternion");
5222  add_name("node.loc.att.icrf.s.d", &node.loc.att.icrf.s.d, "cvector");
5223  add_name("node.loc.att.icrf.s.d.x", &node.loc.att.icrf.s.d.x, "double");
5224  add_name("node.loc.att.icrf.s.d.y", &node.loc.att.icrf.s.d.y, "double");
5225  add_name("node.loc.att.icrf.s.d.z", &node.loc.att.icrf.s.d.z, "double");
5226  add_name("node.loc.att.icrf.s.w", &node.loc.att.icrf.s.w, "double");
5227  add_name("node.loc.att.icrf.v", &node.loc.att.icrf.v, "rvector");
5228  add_name("node.loc.att.icrf.v.col", &node.loc.att.icrf.v.col, "double[]");
5229  for(size_t i = 0; i < sizeof(node.loc.att.icrf.v.col)/sizeof(node.loc.att.icrf.v.col[0]); ++i) {
5230  string basename = "node.loc.att.icrf.v.col[" + std::to_string(i) + "]";
5231  add_name(basename, &node.loc.att.icrf.v.col[i], "double");
5232  }
5233  add_name("node.loc.att.icrf.a", &node.loc.att.icrf.a, "rvector");
5234  add_name("node.loc.att.icrf.a.col", &node.loc.att.icrf.a.col, "double[]");
5235  for(size_t i = 0; i < sizeof(node.loc.att.icrf.a.col)/sizeof(node.loc.att.icrf.a.col[0]); ++i) {
5236  string basename = "node.loc.att.icrf.a.col[" + std::to_string(i) + "]";
5237  add_name(basename, &node.loc.att.icrf.a.col[i], "double");
5238  }
5239  add_name("node.loc.att.icrf.pass", &node.loc.att.icrf.pass, "uint32_t");
5240  add_name("node.loc.att.extra", &node.loc.att.extra, "extraatt");
5241  add_name("node.loc.att.extra.utc", &node.loc.att.extra.utc, "double");
5242  add_name("node.loc.att.extra.j2b", &node.loc.att.extra.j2b, "rmatrix");
5243  add_name("node.loc.att.extra.j2b.row", &node.loc.att.extra.j2b.row, "rvector[]");
5244  for(size_t i = 0; i < sizeof(node.loc.att.extra.j2b.row)/sizeof(node.loc.att.extra.j2b.row[0]); ++i) {
5245  string basename = "node.loc.att.extra.j2b.row[" + std::to_string(i) + "]";
5246  add_name(basename, &node.loc.att.extra.j2b.row[i], "rvector");
5247  add_name(basename+".col", &node.loc.att.extra.j2b.row[i].col, "double[]");
5248  for(size_t j = 0; j < sizeof(node.loc.att.extra.j2b.row[i].col)/sizeof(node.loc.att.extra.j2b.row[i].col[0]); ++j) {
5249  string rebasename = basename + ".col[" + std::to_string(j) + "]";
5250  add_name(rebasename, &node.loc.att.extra.j2b.row[i].col[j], "double");
5251  }
5252  }
5253  add_name("node.loc.att.extra.b2j", &node.loc.att.extra.b2j, "rmatrix");
5254  add_name("node.loc.att.extra.b2j.row", &node.loc.att.extra.b2j.row, "rvector[]");
5255  for(size_t i = 0; i < sizeof(node.loc.att.extra.b2j.row)/sizeof(node.loc.att.extra.b2j.row[0]); ++i) {
5256  string basename = "node.loc.att.extra.b2j.row[" + std::to_string(i) + "]";
5257  add_name(basename, &node.loc.att.extra.b2j.row[i], "rvector");
5258  add_name(basename+".col", &node.loc.att.extra.b2j.row[i].col, "double[]");
5259  for(size_t j = 0; j < sizeof(node.loc.att.extra.b2j.row[i].col)/sizeof(node.loc.att.extra.b2j.row[i].col[0]); ++j) {
5260  string rebasename = basename + ".col[" + std::to_string(j) + "]";
5261  add_name(rebasename, &node.loc.att.extra.b2j.row[i].col[j], "double");
5262  }
5263  }
5264  add_name("node.phys", &node.phys, "physicsstruc");
5265  add_name("node.phys.dt", &node.phys.dt, "double");
5266  add_name("node.phys.dtj", &node.phys.dtj, "double");
5267  add_name("node.phys.utc", &node.phys.utc, "double");
5268  add_name("node.phys.mjdaccel", &node.phys.mjdaccel, "double");
5269  add_name("node.phys.mjddiff", &node.phys.mjddiff, "double");
5270  add_name("node.phys.hcap", &node.phys.hcap, "float");
5271  add_name("node.phys.mass", &node.phys.mass, "float");
5272  add_name("node.phys.temp", &node.phys.temp, "float");
5273  add_name("node.phys.heat", &node.phys.heat, "float");
5274  add_name("node.phys.area", &node.phys.area, "float");
5275  add_name("node.phys.battcap", &node.phys.battcap, "float");
5276  add_name("node.phys.battlev", &node.phys.battlev, "float");
5277  add_name("node.phys.powgen", &node.phys.powgen, "float");
5278  add_name("node.phys.powuse", &node.phys.powuse, "float");
5279  add_name("node.phys.mode", &node.phys.mode, "int32_t");
5280  add_name("node.phys.ftorque", &node.phys.ftorque, "Vector");
5281  add_name("node.phys.ftorque.x", &node.phys.ftorque.x, "double");
5282  add_name("node.phys.ftorque.y", &node.phys.ftorque.y, "double");
5283  add_name("node.phys.ftorque.z", &node.phys.ftorque.z, "double");
5284  add_name("node.phys.ftorque.w", &node.phys.ftorque.w, "double");
5285  add_name("node.phys.atorque", &node.phys.atorque, "Vector");
5286  add_name("node.phys.atorque.x", &node.phys.atorque.x, "double");
5287  add_name("node.phys.atorque.y", &node.phys.atorque.y, "double");
5288  add_name("node.phys.atorque.z", &node.phys.atorque.z, "double");
5289  add_name("node.phys.atorque.w", &node.phys.atorque.w, "double");
5290  add_name("node.phys.rtorque", &node.phys.rtorque, "Vector");
5291  add_name("node.phys.rtorque.x", &node.phys.rtorque.x, "double");
5292  add_name("node.phys.rtorque.y", &node.phys.rtorque.y, "double");
5293  add_name("node.phys.rtorque.z", &node.phys.rtorque.z, "double");
5294  add_name("node.phys.rtorque.w", &node.phys.rtorque.w, "double");
5295  add_name("node.phys.gtorque", &node.phys.gtorque, "Vector");
5296  add_name("node.phys.gtorque.x", &node.phys.gtorque.x, "double");
5297  add_name("node.phys.gtorque.y", &node.phys.gtorque.y, "double");
5298  add_name("node.phys.gtorque.z", &node.phys.gtorque.z, "double");
5299  add_name("node.phys.gtorque.w", &node.phys.gtorque.w, "double");
5300  add_name("node.phys.htorque", &node.phys.htorque, "Vector");
5301  add_name("node.phys.htorque.x", &node.phys.htorque.x, "double");
5302  add_name("node.phys.htorque.y", &node.phys.htorque.y, "double");
5303  add_name("node.phys.htorque.z", &node.phys.htorque.z, "double");
5304  add_name("node.phys.htorque.w", &node.phys.htorque.w, "double");
5305  add_name("node.phys.hmomentum", &node.phys.hmomentum, "Vector");
5306  add_name("node.phys.hmomentum.x", &node.phys.hmomentum.x, "double");
5307  add_name("node.phys.hmomentum.y", &node.phys.hmomentum.y, "double");
5308  add_name("node.phys.hmomentum.z", &node.phys.hmomentum.z, "double");
5309  add_name("node.phys.hmomentum.w", &node.phys.hmomentum.w, "double");
5310  add_name("node.phys.ctorque", &node.phys.ctorque, "Vector");
5311  add_name("node.phys.ctorque.x", &node.phys.ctorque.x, "double");
5312  add_name("node.phys.ctorque.y", &node.phys.ctorque.y, "double");
5313  add_name("node.phys.ctorque.z", &node.phys.ctorque.z, "double");
5314  add_name("node.phys.ctorque.w", &node.phys.ctorque.w, "double");
5315  add_name("node.phys.fdrag", &node.phys.fdrag, "Vector");
5316  add_name("node.phys.fdrag.x", &node.phys.fdrag.x, "double");
5317  add_name("node.phys.fdrag.y", &node.phys.fdrag.y, "double");
5318  add_name("node.phys.fdrag.z", &node.phys.fdrag.z, "double");
5319  add_name("node.phys.fdrag.w", &node.phys.fdrag.w, "double");
5320  add_name("node.phys.adrag", &node.phys.adrag, "Vector");
5321  add_name("node.phys.adrag.x", &node.phys.adrag.x, "double");
5322  add_name("node.phys.adrag.y", &node.phys.adrag.y, "double");
5323  add_name("node.phys.adrag.z", &node.phys.adrag.z, "double");
5324  add_name("node.phys.adrag.w", &node.phys.adrag.w, "double");
5325  add_name("node.phys.rdrag", &node.phys.rdrag, "Vector");
5326  add_name("node.phys.rdrag.x", &node.phys.rdrag.x, "double");
5327  add_name("node.phys.rdrag.y", &node.phys.rdrag.y, "double");
5328  add_name("node.phys.rdrag.z", &node.phys.rdrag.z, "double");
5329  add_name("node.phys.rdrag.w", &node.phys.rdrag.w, "double");
5330  add_name("node.phys.thrust", &node.phys.thrust, "Vector");
5331  add_name("node.phys.thrust.x", &node.phys.thrust.x, "double");
5332  add_name("node.phys.thrust.y", &node.phys.thrust.y, "double");
5333  add_name("node.phys.thrust.z", &node.phys.thrust.z, "double");
5334  add_name("node.phys.thrust.w", &node.phys.thrust.w, "double");
5335  add_name("node.phys.moi", &node.phys.moi, "Vector");
5336  add_name("node.phys.moi.x", &node.phys.moi.x, "double");
5337  add_name("node.phys.moi.y", &node.phys.moi.y, "double");
5338  add_name("node.phys.moi.z", &node.phys.moi.z, "double");
5339  add_name("node.phys.moi.w", &node.phys.moi.w, "double");
5340  add_name("node.phys.com", &node.phys.com, "Vector");
5341  add_name("node.phys.com.x", &node.phys.com.x, "double");
5342  add_name("node.phys.com.y", &node.phys.com.y, "double");
5343  add_name("node.phys.com.z", &node.phys.com.z, "double");
5344  add_name("node.phys.com.w", &node.phys.com.w, "double");
5345  add_name("node.phys.vertices", &node.phys.vertices, "vector<Vector>");
5346  for(size_t i = 0; i < node.phys.vertices.capacity(); ++i) {
5347  string basename = "node.phys.vertices[" + std::to_string(i) + "]";
5348  add_name(basename, &node.phys.vertices[i], "Vector");
5349  add_name(basename+".x", &node.phys.vertices[i].x, "double");
5350  add_name(basename+".y", &node.phys.vertices[i].y, "double");
5351  add_name(basename+".z", &node.phys.vertices[i].z, "double");
5352  add_name(basename+".w", &node.phys.vertices[i].w, "double");
5353  }
5354  add_name("node.phys.triangles", &node.phys.triangles, "vector<trianglestruc>");
5355  for(size_t i = 0; i < node.phys.triangles.capacity(); ++i) {
5356  string basename = "node.phys.triangles[" + std::to_string(i) + "]";
5357  add_name(basename, &node.phys.triangles[i], "trianglestruc");
5358  add_name(basename+".external", &node.phys.triangles[i].external, "bool");
5359  add_name(basename+".com", &node.phys.triangles[i].com, "Vector");
5360  add_name(basename+".com.x", &node.phys.triangles[i].com.x, "double");
5361  add_name(basename+".com.y", &node.phys.triangles[i].com.y, "double");
5362  add_name(basename+".com.z", &node.phys.triangles[i].com.z, "double");
5363  add_name(basename+".com.w", &node.phys.triangles[i].com.w, "double");
5364  add_name(basename+".normal", &node.phys.triangles[i].normal, "Vector");
5365  add_name(basename+".normal.x", &node.phys.triangles[i].normal.x, "double");
5366  add_name(basename+".normal.y", &node.phys.triangles[i].normal.y, "double");
5367  add_name(basename+".normal.z", &node.phys.triangles[i].normal.z, "double");
5368  add_name(basename+".normal.w", &node.phys.triangles[i].normal.w, "double");
5369  add_name(basename+".shove", &node.phys.triangles[i].shove, "Vector");
5370  add_name(basename+".shove.x", &node.phys.triangles[i].shove.x, "double");
5371  add_name(basename+".shove.y", &node.phys.triangles[i].shove.y, "double");
5372  add_name(basename+".shove.z", &node.phys.triangles[i].shove.z, "double");
5373  add_name(basename+".shove.w", &node.phys.triangles[i].shove.w, "double");
5374  add_name(basename+".twist", &node.phys.triangles[i].twist, "Vector");
5375  add_name(basename+".twist.x", &node.phys.triangles[i].twist.x, "double");
5376  add_name(basename+".twist.y", &node.phys.triangles[i].twist.y, "double");
5377  add_name(basename+".twist.z", &node.phys.triangles[i].twist.z, "double");
5378  add_name(basename+".twist.w", &node.phys.triangles[i].twist.w, "double");
5379  add_name(basename+".pidx", &node.phys.triangles[i].pidx, "uint16_t");
5380  add_name(basename+".tidx", &node.phys.triangles[i].tidx, "uint16_t[]");
5381  for(size_t j = 0; j < sizeof(node.phys.triangles[i].tidx)/sizeof(node.phys.triangles[i].tidx[0]); ++j) {
5382  string rebasename = basename + ".tidx[" + std::to_string(j) + "]";
5383  add_name(rebasename, &node.phys.triangles[i].tidx[j], "uint16_t");
5384  }
5385  add_name(basename+".heat", &node.phys.triangles[i].heat, "float");
5386  add_name(basename+".hcap", &node.phys.triangles[i].hcap, "float");
5387  add_name(basename+".emi", &node.phys.triangles[i].emi, "float");
5388  add_name(basename+".abs", &node.phys.triangles[i].abs, "float");
5389  add_name(basename+".mass", &node.phys.triangles[i].mass, "float");
5390  add_name(basename+".temp", &node.phys.triangles[i].temp, "float");
5391  add_name(basename+".area", &node.phys.triangles[i].area, "float");
5392  add_name(basename+".perimeter", &node.phys.triangles[i].perimeter, "float");
5393  add_name(basename+".irradiation", &node.phys.triangles[i].irradiation, "float");
5394  add_name(basename+".pcell", &node.phys.triangles[i].pcell, "float");
5395  add_name(basename+".ecellbase", &node.phys.triangles[i].ecellbase, "float");
5396  add_name(basename+".ecellslope", &node.phys.triangles[i].ecellslope, "float");
5397  add_name(basename+".triangleindex", &node.phys.triangles[i].triangleindex, "vector<vector<uint16_t>>");
5398  for(size_t j = 0; j < node.phys.triangles[i].triangleindex.capacity(); ++j) {
5399  string rebasename = basename + ".triangleindex[" + std::to_string(j) + "]";
5400  add_name(rebasename, &node.phys.triangles[i].triangleindex[j], "vector<uint16_t>");
5401  for(size_t k = 0; k < node.phys.triangles[i].triangleindex[j].capacity(); ++k) {
5402  string rebasename2 = rebasename + "[" + std::to_string(k) + "]";
5403  add_name(rebasename2, &node.phys.triangles[i].triangleindex[j][k], "uint16_t");
5404  }
5405  }
5406  }
5407 
5408 
5409  // vector<vertexstruc> vertexs
5410  add_name("vertexs", &vertexs, "vector<vertexstruc>");
5411  for(size_t i = 0; i < vertexs.capacity(); ++i) {
5412  string basename = "vertexs[" + std::to_string(i) + "]";
5413  add_name(basename, &vertexs[i], "vertexstruc");
5414  add_name(basename+".x", &vertexs[i].x, "double");
5415  add_name(basename+".y", &vertexs[i].y, "double");
5416  add_name(basename+".z", &vertexs[i].z, "double");
5417  add_name(basename+".w", &vertexs[i].w, "double");
5418  }
5419 
5420  // vector<vertexstruc> normals
5421  add_name("normals", &normals, "vector<vertexstruc>");
5422  for(size_t i = 0; i < normals.capacity(); ++i) {
5423  string basename = "normals[" + std::to_string(i) + "]";
5424  add_name(basename, &normals[i], "vertexstruc");
5425  add_name(basename+".x", &normals[i].x, "double");
5426  add_name(basename+".y", &normals[i].y, "double");
5427  add_name(basename+".z", &normals[i].z, "double");
5428  add_name(basename+".w", &normals[i].w, "double");
5429  }
5430 
5431  // vector<facestruc> faces
5432  add_name("faces", &faces, "vector<facestruc>");
5433  for(size_t i = 0; i < faces.capacity(); ++i) {
5434  string basename = "faces[" + std::to_string(i) + "]";
5435  add_name(basename, &faces[i], "facestruc");
5436  add_name(basename+".vertex_cnt", &faces[i].vertex_cnt, "uint16_t");
5437  add_name(basename+".vertex_idx", &faces[i].vertex_idx, "vector<uint16_t>");
5438  for(size_t j = 0; j < faces[i].vertex_idx.capacity(); ++j) {
5439  string rebasename = basename + ".vertex_idx[" + std::to_string(j) + "]";
5440  add_name(rebasename, &faces[i].vertex_idx[j], "uint16_t");
5441  }
5442  add_name(basename+".com", &faces[i].com, "Vector");
5443  add_name(basename+".com.x", &faces[i].com.x, "double");
5444  add_name(basename+".com.y", &faces[i].com.y, "double");
5445  add_name(basename+".com.z", &faces[i].com.z, "double");
5446  add_name(basename+".com.w", &faces[i].com.w, "double");
5447  add_name(basename+".normal", &faces[i].normal, "Vector");
5448  add_name(basename+".normal.x", &faces[i].normal.x, "double");
5449  add_name(basename+".normal.y", &faces[i].normal.y, "double");
5450  add_name(basename+".normal.z", &faces[i].normal.z, "double");
5451  add_name(basename+".normal.w", &faces[i].normal.w, "double");
5452  add_name(basename+".area", &faces[i].area, "double");
5453  }
5454 
5455  // vector<piecestruc> pieces
5456  add_name("pieces", &pieces, "vector<piecestruc>");
5457  for(size_t i = 0; i < pieces.capacity(); ++i) {
5458  string basename = "pieces[" + std::to_string(i) + "]";
5459  add_name(basename, &pieces[i], "piecestruc");
5460  add_name(basename+".name", &pieces[i].name, "char[]");
5461  add_name(basename+".enabled", &pieces[i].enabled, "bool");
5462  add_name(basename+".cidx", &pieces[i].cidx, "uint16_t");
5463  add_name(basename+".density", &pieces[i].density, "float");
5464  add_name(basename+".mass", &pieces[i].mass, "float");
5465  add_name(basename+".emi", &pieces[i].emi, "float");
5466  add_name(basename+".abs", &pieces[i].abs, "float");
5467  add_name(basename+".hcap", &pieces[i].hcap, "float");
5468  add_name(basename+".hcon", &pieces[i].hcon, "float");
5469  add_name(basename+".dim", &pieces[i].dim, "float");
5470  add_name(basename+".area", &pieces[i].area, "float");
5471  add_name(basename+".volume", &pieces[i].volume, "float");
5472  add_name(basename+".face_cnt", &pieces[i].face_cnt, "uint16_t");
5473  add_name(basename+".face_idx", &pieces[i].face_idx, "vector<uint16_t>");
5474  for(size_t j = 0; j < pieces[i].face_idx.capacity(); ++j) {
5475  string rebasename = basename + ".face_idx[" + std::to_string(j) + "]";
5476  add_name(rebasename, &pieces[i].face_idx[j], "uint16_t");
5477  }
5478  add_name(basename+".com", &pieces[i].com, "Vector");
5479  add_name(basename+".com.x", &pieces[i].com.x, "double");
5480  add_name(basename+".com.y", &pieces[i].com.y, "double");
5481  add_name(basename+".com.z", &pieces[i].com.z, "double");
5482  add_name(basename+".com.w", &pieces[i].com.w, "double");
5483  add_name(basename+".shove", &pieces[i].shove, "Vector");
5484  add_name(basename+".shove.x", &pieces[i].shove.x, "double");
5485  add_name(basename+".shove.y", &pieces[i].shove.y, "double");
5486  add_name(basename+".shove.z", &pieces[i].shove.z, "double");
5487  add_name(basename+".shove.w", &pieces[i].shove.w, "double");
5488  add_name(basename+".twist", &pieces[i].twist, "Vector");
5489  add_name(basename+".twist.x", &pieces[i].twist.x, "double");
5490  add_name(basename+".twist.y", &pieces[i].twist.y, "double");
5491  add_name(basename+".twist.z", &pieces[i].twist.z, "double");
5492  add_name(basename+".twist.w", &pieces[i].twist.w, "double");
5493  add_name(basename+".heat", &pieces[i].heat, "float");
5494  add_name(basename+".temp", &pieces[i].temp, "float");
5495  add_name(basename+".insol", &pieces[i].insol, "float");
5496  add_name(basename+".material_density", &pieces[i].material_density, "float");
5497  add_name(basename+".material_ambient", &pieces[i].material_ambient, "Vector");
5498  add_name(basename+".material_ambient.x", &pieces[i].material_ambient.x, "double");
5499  add_name(basename+".material_ambient.y", &pieces[i].material_ambient.y, "double");
5500  add_name(basename+".material_ambient.z", &pieces[i].material_ambient.z, "double");
5501  add_name(basename+".material_ambient.w", &pieces[i].material_ambient.w, "double");
5502  add_name(basename+".material_diffuse", &pieces[i].material_diffuse, "Vector");
5503  add_name(basename+".material_diffuse.x", &pieces[i].material_diffuse.x, "double");
5504  add_name(basename+".material_diffuse.y", &pieces[i].material_diffuse.y, "double");
5505  add_name(basename+".material_diffuse.z", &pieces[i].material_diffuse.z, "double");
5506  add_name(basename+".material_diffuse.w", &pieces[i].material_diffuse.w, "double");
5507  add_name(basename+".material_specular", &pieces[i].material_specular, "Vector");
5508  add_name(basename+".material_specular.x", &pieces[i].material_specular.x, "double");
5509  add_name(basename+".material_specular.y", &pieces[i].material_specular.y, "double");
5510  add_name(basename+".material_specular.z", &pieces[i].material_specular.z, "double");
5511  add_name(basename+".material_specular.w", &pieces[i].material_specular.w, "double");
5512  }
5513 
5514  // wavefront obj
5515  add_name("obj", &obj, "wavefront");
5516  add_name("obj.Vg", &obj.Vg, "vector<Vector>");
5517  for(size_t i = 0; i < obj.Vg.capacity(); ++i) {
5518  string basename = "obj.Vg[" + std::to_string(i) + "]";
5519  add_name(basename, &obj.Vg[i], "Vector");
5520  add_name(basename+".x", &obj.Vg[i].x, "double");
5521  add_name(basename+".y", &obj.Vg[i].y, "double");
5522  add_name(basename+".z", &obj.Vg[i].z, "double");
5523  add_name(basename+".w", &obj.Vg[i].w, "double");
5524  }
5525  add_name("obj.Vt", &obj.Vt, "vector<Vector>");
5526  for(size_t i = 0; i < obj.Vt.capacity(); ++i) {
5527  string basename = "obj.Vt[" + std::to_string(i) + "]";
5528  add_name(basename, &obj.Vt[i], "Vector");
5529  add_name(basename+".x", &obj.Vt[i].x, "double");
5530  add_name(basename+".y", &obj.Vt[i].y, "double");
5531  add_name(basename+".z", &obj.Vt[i].z, "double");
5532  add_name(basename+".w", &obj.Vt[i].w, "double");
5533  }
5534  add_name("obj.Vn", &obj.Vn, "vector<Vector>");
5535  for(size_t i = 0; i < obj.Vn.capacity(); ++i) {
5536  string basename = "obj.Vn[" + std::to_string(i) + "]";
5537  add_name(basename, &obj.Vn[i], "Vector");
5538  add_name(basename+".x", &obj.Vn[i].x, "double");
5539  add_name(basename+".y", &obj.Vn[i].y, "double");
5540  add_name(basename+".z", &obj.Vn[i].z, "double");
5541  add_name(basename+".w", &obj.Vn[i].w, "double");
5542  }
5543  add_name("obj.Vp", &obj.Vp, "vector<Vector>");
5544  for(size_t i = 0; i < obj.Vp.capacity(); ++i) {
5545  string basename = "obj.Vp[" + std::to_string(i) + "]";
5546  add_name(basename, &obj.Vp[i], "Vector");
5547  add_name(basename+".x", &obj.Vp[i].x, "double");
5548  add_name(basename+".y", &obj.Vp[i].y, "double");
5549  add_name(basename+".z", &obj.Vp[i].z, "double");
5550  add_name(basename+".w", &obj.Vp[i].w, "double");
5551  }
5552  add_name("obj.Materials", &obj.Materials, "vector<material>");
5553  for(size_t i = 0; i < obj.Materials.capacity(); ++i) {
5554  string basename = "obj.Materials[" + std::to_string(i) + "]";
5555  add_name(basename, &obj.Materials[i], "material");
5556  add_name(basename+".name", &obj.Materials[i].name, "string");
5557  add_name(basename+".density", &obj.Materials[i].density, "float");
5558  add_name(basename+".ambient", &obj.Materials[i].ambient, "Vector");
5559  add_name(basename+".ambient.x", &obj.Materials[i].ambient.x, "double");
5560  add_name(basename+".ambient.y", &obj.Materials[i].ambient.y, "double");
5561  add_name(basename+".ambient.z", &obj.Materials[i].ambient.z, "double");
5562  add_name(basename+".ambient.w", &obj.Materials[i].ambient.w, "double");
5563  add_name(basename+".diffuse", &obj.Materials[i].diffuse, "Vector");
5564  add_name(basename+".diffuse.x", &obj.Materials[i].diffuse.x, "double");
5565  add_name(basename+".diffuse.y", &obj.Materials[i].diffuse.y, "double");
5566  add_name(basename+".diffuse.z", &obj.Materials[i].diffuse.z, "double");
5567  add_name(basename+".diffuse.w", &obj.Materials[i].diffuse.w, "double");
5568  add_name(basename+".specular", &obj.Materials[i].specular, "Vector");
5569  add_name(basename+".specular.x", &obj.Materials[i].specular.x, "double");
5570  add_name(basename+".specular.y", &obj.Materials[i].specular.y, "double");
5571  add_name(basename+".specular.z", &obj.Materials[i].specular.z, "double");
5572  add_name(basename+".specular.w", &obj.Materials[i].specular.w, "double");
5573  }
5574  add_name("obj.Points", &obj.Points, "vector<point>");
5575  for(size_t i = 0; i < obj.Points.capacity(); ++i) {
5576  string basename = "obj.Points[" + std::to_string(i) + "]";
5577  add_name(basename, &obj.Points[i], "point");
5578  add_name(basename+".groups", &obj.Points[i].groups, "vector<size_t>");
5579  for(size_t j = 0; j < obj.Points[i].groups.capacity(); ++j) {
5580  string rebasename = basename + ".groups[" + std::to_string(j) + "]";
5581  add_name(rebasename, &obj.Points[i].groups[j], "size_t");
5582  }
5583  add_name(basename+".vertex", &obj.Points[i].vertex, "size_t");
5584  }
5585  add_name("obj.Lines", &obj.Lines, "vector<line>");
5586  for(size_t i = 0; i < obj.Lines.capacity(); ++i) {
5587  string basename = "obj.Lines[" + std::to_string(i) + "]";
5588  add_name(basename, &obj.Lines[i], "line");
5589  add_name(basename+".groups", &obj.Lines[i].groups, "vector<size_t>");
5590  for(size_t j = 0; j < obj.Lines[i].groups.capacity(); ++j) {
5591  string rebasename = basename + ".groups[" + std::to_string(j) + "]";
5592  add_name(rebasename, &obj.Lines[i].groups[j], "size_t");
5593  }
5594  add_name(basename+".vertices", &obj.Lines[i].vertices, "vector<vertex>");
5595  for(size_t j = 0; j < obj.Lines[i].vertices.capacity(); ++j) {
5596  string rebasename = basename + ".vertices[" + std::to_string(j) + "]";
5597  add_name(rebasename, &obj.Lines[i].vertices[j], "vertex");
5598  add_name(rebasename+".v", &obj.Lines[i].vertices[j].v, "size_t");
5599  add_name(rebasename+".vt", &obj.Lines[i].vertices[j].vt, "size_t");
5600  add_name(rebasename+".vn", &obj.Lines[i].vertices[j].vn, "size_t");
5601  }
5602  add_name(basename+".centroid", &obj.Lines[i].centroid, "Vector");
5603  add_name(basename+".centroid.x", &obj.Lines[i].centroid.x, "double");
5604  add_name(basename+".centroid.y", &obj.Lines[i].centroid.y, "double");
5605  add_name(basename+".centroid.z", &obj.Lines[i].centroid.z, "double");
5606  add_name(basename+".centroid.w", &obj.Lines[i].centroid.w, "double");
5607  add_name(basename+".length", &obj.Lines[i].length, "double");
5608  }
5609  add_name("obj.Faces", &obj.Faces, "vector<face>");
5610  for(size_t i = 0; i < obj.Faces.capacity(); ++i) {
5611  string basename = "obj.Faces[" + std::to_string(i) + "]";
5612  add_name(basename, &obj.Faces[i], "face");
5613  add_name(basename+".groups", &obj.Faces[i].groups, "vector<size_t>");
5614  for(size_t j = 0; j < obj.Faces[i].groups.capacity(); ++j) {
5615  string rebasename = basename + ".groups[" + std::to_string(j) + "]";
5616  add_name(rebasename, &obj.Faces[i].groups[j], "size_t");
5617  }
5618  add_name(basename+".vertices", &obj.Faces[i].vertices, "vector<vertex>");
5619  for(size_t j = 0; j < obj.Faces[i].vertices.capacity(); ++j) {
5620  string rebasename = basename + ".vertices[" + std::to_string(j) + "]";
5621  add_name(rebasename, &obj.Faces[i].vertices[j], "vertex");
5622  add_name(rebasename+".v", &obj.Faces[i].vertices[j].v, "size_t");
5623  add_name(rebasename+".vt", &obj.Faces[i].vertices[j].vt, "size_t");
5624  add_name(rebasename+".vn", &obj.Faces[i].vertices[j].vn, "size_t");
5625  }
5626  add_name(basename+".com", &obj.Faces[i].com, "Vector");
5627  add_name(basename+".com.x", &obj.Faces[i].com.x, "double");
5628  add_name(basename+".com.y", &obj.Faces[i].com.y, "double");
5629  add_name(basename+".com.z", &obj.Faces[i].com.z, "double");
5630  add_name(basename+".com.w", &obj.Faces[i].com.w, "double");
5631  add_name(basename+".normal", &obj.Faces[i].normal, "Vector");
5632  add_name(basename+".normal.x", &obj.Faces[i].normal.x, "double");
5633  add_name(basename+".normal.y", &obj.Faces[i].normal.y, "double");
5634  add_name(basename+".normal.z", &obj.Faces[i].normal.z, "double");
5635  add_name(basename+".normal.w", &obj.Faces[i].normal.w, "double");
5636  add_name(basename+".area", &obj.Faces[i].area, "double");
5637  }
5638  add_name("obj.Groups", &obj.Groups, "vector<group>");
5639  for(size_t i = 0; i < obj.Groups.capacity(); ++i) {
5640  string basename = "obj.Groups[" + std::to_string(i) + "]";
5641  add_name(basename, &obj.Groups[i], "group");
5642  add_name(basename+".name", &obj.Groups[i].name, "string");
5643  add_name(basename+".materialidx", &obj.Groups[i].materialidx, "size_t");
5644  add_name(basename+".pointidx", &obj.Groups[i].pointidx, "vector<size_t>");
5645  for(size_t j = 0; j < obj.Groups[i].pointidx.capacity(); ++j) {
5646  string rebasename = basename + ".pointidx[" + std::to_string(j) + "]";
5647  add_name(rebasename, &obj.Groups[i].pointidx[j], "size_t");
5648  }
5649  add_name(basename+".lineidx", &obj.Groups[i].lineidx, "vector<size_t>");
5650  for(size_t j = 0; j < obj.Groups[i].lineidx.capacity(); ++j) {
5651  string rebasename = basename + ".lineidx[" + std::to_string(j) + "]";
5652  add_name(rebasename, &obj.Groups[i].lineidx[j], "size_t");
5653  }
5654  add_name(basename+".faceidx", &obj.Groups[i].faceidx, "vector<size_t>");
5655  for(size_t j = 0; j < obj.Groups[i].faceidx.capacity(); ++j) {
5656  string rebasename = basename + ".faceidx[" + std::to_string(j) + "]";
5657  add_name(rebasename, &obj.Groups[i].faceidx[j], "size_t");
5658  }
5659  add_name(basename+".com", &obj.Groups[i].com, "Vector");
5660  add_name(basename+".com.x", &obj.Groups[i].com.x, "double");
5661  add_name(basename+".com.y", &obj.Groups[i].com.y, "double");
5662  add_name(basename+".com.z", &obj.Groups[i].com.z, "double");
5663  add_name(basename+".com.w", &obj.Groups[i].com.w, "double");
5664  add_name(basename+".volume", &obj.Groups[i].volume, "double");
5665  }
5666 
5667  // vector<devicestruc> device
5668  add_name("device", &device, "vector<devicestruc>");
5669  for(size_t i = 0; i < device.capacity(); ++i) {
5670  string basename = "device[" + std::to_string(i) + "]";
5671  add_name(basename, &device[i], "devicestruc");
5672  add_name(basename+".all", &device[i].all, "allstruc");
5673  add_name(basename+".all.enabled", &device[i].all.enabled, "bool");
5674  add_name(basename+".all.type", &device[i].all.type, "uint16_t");
5675  add_name(basename+".all.model", &device[i].all.model, "uint16_t");
5676  add_name(basename+".all.flag", &device[i].all.flag, "uint32_t");
5677  add_name(basename+".all.addr", &device[i].all.addr, "uint16_t");
5678  add_name(basename+".all.cidx", &device[i].all.cidx, "uint16_t");
5679  add_name(basename+".all.didx", &device[i].all.didx, "uint16_t");
5680  add_name(basename+".all.pidx", &device[i].all.pidx, "uint16_t");
5681  add_name(basename+".all.bidx", &device[i].all.bidx, "uint16_t");
5682  add_name(basename+".all.portidx", &device[i].all.portidx, "uint16_t");
5683  add_name(basename+".all.namp", &device[i].all.namp, "float");
5684  add_name(basename+".all.nvolt", &device[i].all.nvolt, "float");
5685  add_name(basename+".all.amp", &device[i].all.amp, "float");
5686  add_name(basename+".all.volt", &device[i].all.volt, "float");
5687  add_name(basename+".all.power", &device[i].all.power, "float");
5688  add_name(basename+".all.energy", &device[i].all.energy, "float");
5689  add_name(basename+".all.drate", &device[i].all.drate, "float");
5690  add_name(basename+".all.temp", &device[i].all.temp, "float");
5691  add_name(basename+".all.utc", &device[i].all.utc, "double");
5692  add_name(basename+".ant", &device[i].ant, "antstruc");
5693  add_name(basename+".ant.align", &device[i].ant.align, "quaternion");
5694  add_name(basename+".ant.align.d", &device[i].ant.align.d, "cvector");
5695  add_name(basename+".ant.align.d.x", &device[i].ant.align.d.x, "double");
5696  add_name(basename+".ant.align.d.y", &device[i].ant.align.d.y, "double");
5697  add_name(basename+".ant.align.d.z", &device[i].ant.align.d.z, "double");
5698  add_name(basename+".ant.align.w", &device[i].ant.align.w, "double");
5699  add_name(basename+".ant.azim", &device[i].ant.azim, "float");
5700  add_name(basename+".ant.elev", &device[i].ant.elev, "float");
5701  add_name(basename+".ant.minelev", &device[i].ant.minelev, "float");
5702  add_name(basename+".ant.maxelev", &device[i].ant.maxelev, "float");
5703  add_name(basename+".ant.minazim", &device[i].ant.minazim, "float");
5704  add_name(basename+".ant.maxazim", &device[i].ant.maxazim, "float");
5705  add_name(basename+".ant.threshelev", &device[i].ant.threshelev, "float");
5706  add_name(basename+".batt", &device[i].batt, "battstruc");
5707  add_name(basename+".batt.capacity", &device[i].batt.capacity, "float");
5708  add_name(basename+".batt.efficiency", &device[i].batt.efficiency, "float");
5709  add_name(basename+".batt.charge", &device[i].batt.charge, "float");
5710  add_name(basename+".batt.r_in", &device[i].batt.r_in, "float");
5711  add_name(basename+".batt.r_out", &device[i].batt.r_out, "float");
5712  add_name(basename+".batt.percentage", &device[i].batt.percentage, "float");
5713  add_name(basename+".batt.time_remaining", &device[i].batt.time_remaining, "float");
5714  add_name(basename+".bcreg", &device[i].bcreg, "bcregstruc");
5715  add_name(basename+".bus", &device[i].bus, "busstruc");
5716  add_name(basename+".bus.wdt", &device[i].bus.wdt, "float");
5717  add_name(basename+".cam", &device[i].cam, "camstruc");
5718  add_name(basename+".cam.pwidth", &device[i].cam.pwidth, "uint16_t");
5719  add_name(basename+".cam.pheight", &device[i].cam.pheight, "uint16_t");
5720  add_name(basename+".cam.width", &device[i].cam.width, "float");
5721  add_name(basename+".cam.height", &device[i].cam.height, "float");
5722  add_name(basename+".cam.flength", &device[i].cam.flength, "float");
5723  add_name(basename+".cpu", &device[i].cpu, "cpustruc");
5724  add_name(basename+".cpu.uptime", &device[i].cpu.uptime, "uint32_t");
5725  add_name(basename+".cpu.load", &device[i].cpu.load, "float");
5726  add_name(basename+".cpu.maxload", &device[i].cpu.maxload, "float");
5727  add_name(basename+".cpu.maxgib", &device[i].cpu.maxgib, "float");
5728  add_name(basename+".cpu.gib", &device[i].cpu.gib, "float");
5729  add_name(basename+".cpu.boot_count", &device[i].cpu.boot_count, "uint32_t");
5730  add_name(basename+".disk", &device[i].disk, "diskstruc");
5731  add_name(basename+".disk.maxgib", &device[i].disk.maxgib, "float");
5732  add_name(basename+".disk.gib", &device[i].disk.gib, "float");
5733  add_name(basename+".disk.path", &device[i].disk.path, "char[]");
5734  add_name(basename+".gps", &device[i].gps, "gpsstruc");
5735  add_name(basename+".gps.dutc", &device[i].gps.dutc, "double");
5736  add_name(basename+".gps.geocs", &device[i].gps.geocs, "rvector");
5737  add_name(basename+".gps.geocs.col", &device[i].gps.geocs.col, "double[]");
5738  for(size_t j = 0; j < sizeof(device[i].gps.geocs.col)/sizeof(device[i].gps.geocs.col[0]); ++j) {
5739  string rebasename = basename + "gps.geocs.col[" + std::to_string(j) + "]";
5740  add_name(rebasename, &device[i].gps.geocs.col[j], "double");
5741  }
5742  add_name(basename+".gps.geocv", &device[i].gps.geocv, "rvector");
5743  add_name(basename+".gps.geocv.col", &device[i].gps.geocv.col, "double[]");
5744  for(size_t j = 0; j < sizeof(device[i].gps.geocv.col)/sizeof(device[i].gps.geocv.col[0]); ++j) {
5745  string rebasename = basename + "gps.geocv.col[" + std::to_string(j) + "]";
5746  add_name(rebasename, &device[i].gps.geocv.col[j], "double");
5747  }
5748  add_name(basename+".gps.dgeocs", &device[i].gps.dgeocs, "rvector");
5749  add_name(basename+".gps.dgeocs.col", &device[i].gps.dgeocs.col, "double[]");
5750  for(size_t j = 0; j < sizeof(device[i].gps.dgeocs.col)/sizeof(device[i].gps.dgeocs.col[0]); ++j) {
5751  string rebasename = basename + "gps.dgeocs.col[" + std::to_string(j) + "]";
5752  add_name(rebasename, &device[i].gps.dgeocs.col[j], "double");
5753  }
5754  add_name(basename+".gps.dgeocv", &device[i].gps.dgeocv, "rvector");
5755  add_name(basename+".gps.dgeocv.col", &device[i].gps.dgeocv.col, "double[]");
5756  for(size_t j = 0; j < sizeof(device[i].gps.dgeocv.col)/sizeof(device[i].gps.dgeocv.col[0]); ++j) {
5757  string rebasename = basename + "gps.dgeocv.col[" + std::to_string(j) + "]";
5758  add_name(rebasename, &device[i].gps.dgeocv.col[j], "double");
5759  }
5760  add_name(basename+".gps.geods", &device[i].gps.geods, "gvector");
5761  add_name(basename+".gps.geods.lat", &device[i].gps.geods.lat, "double");
5762  add_name(basename+".gps.geods.lon", &device[i].gps.geods.lon, "double");
5763  add_name(basename+".gps.geods.h", &device[i].gps.geods.h, "double");
5764  add_name(basename+".gps.geodv", &device[i].gps.geodv, "gvector");
5765  add_name(basename+".gps.geodv.lat", &device[i].gps.geodv.lat, "double");
5766  add_name(basename+".gps.geodv.lon", &device[i].gps.geodv.lon, "double");
5767  add_name(basename+".gps.geodv.h", &device[i].gps.geodv.h, "double");
5768  add_name(basename+".gps.dgeods", &device[i].gps.dgeods, "gvector");
5769  add_name(basename+".gps.dgeods.lat", &device[i].gps.dgeods.lat, "double");
5770  add_name(basename+".gps.dgeods.lon", &device[i].gps.dgeods.lon, "double");
5771  add_name(basename+".gps.dgeods.h", &device[i].gps.dgeods.h, "double");
5772  add_name(basename+".gps.dgeodv", &device[i].gps.dgeodv, "gvector");
5773  add_name(basename+".gps.dgeodv.lat", &device[i].gps.dgeodv.lat, "double");
5774  add_name(basename+".gps.dgeodv.lon", &device[i].gps.dgeodv.lon, "double");
5775  add_name(basename+".gps.dgeodv.h", &device[i].gps.dgeodv.h, "double");
5776  add_name(basename+".gps.heading", &device[i].gps.heading, "float");
5777  add_name(basename+".gps.sats_used", &device[i].gps.sats_used, "uint16_t");
5778  add_name(basename+".gps.sats_visible", &device[i].gps.sats_visible, "uint16_t");
5779  add_name(basename+".gps.time_status", &device[i].gps.time_status, "uint16_t");
5780  add_name(basename+".gps.position_type", &device[i].gps.position_type, "uint16_t");
5781  add_name(basename+".gps.solution_status", &device[i].gps.solution_status, "uint16_t");
5782  add_name(basename+".htr", &device[i].htr, "htrstruc");
5783  add_name(basename+".htr.state", &device[i].htr.state, "bool");
5784  add_name(basename+".htr.setvertex", &device[i].htr.setvertex, "float");
5785  add_name(basename+".imu", &device[i].imu, "imustruc");
5786  add_name(basename+".imu.align", &device[i].imu.align, "quaternion");
5787  add_name(basename+".imu.align.d", &device[i].imu.align.d, "cvector");
5788  add_name(basename+".imu.align.d.x", &device[i].imu.align.d.x, "double");
5789  add_name(basename+".imu.align.d.y", &device[i].imu.align.d.y, "double");
5790  add_name(basename+".imu.align.d.z", &device[i].imu.align.d.z, "double");
5791  add_name(basename+".imu.align.w", &device[i].imu.align.w, "double");
5792  add_name(basename+".imu.accel", &device[i].imu.accel, "rvector");
5793  add_name(basename+".imu.accel.col", &device[i].imu.accel.col, "double[]");
5794  for(size_t j = 0; j < sizeof(device[i].imu.accel.col)/sizeof(device[i].imu.accel.col[0]); ++j) {
5795  string rebasename = basename + "imu.accel.col[" + std::to_string(j) + "]";
5796  add_name(rebasename, &device[i].imu.accel.col[j], "double");
5797  }
5798  add_name(basename+".imu.theta", &device[i].imu.theta, "quaternion");
5799  add_name(basename+".imu.theta.d", &device[i].imu.theta.d, "cvector");
5800  add_name(basename+".imu.theta.d.x", &device[i].imu.theta.d.x, "double");
5801  add_name(basename+".imu.theta.d.y", &device[i].imu.theta.d.y, "double");
5802  add_name(basename+".imu.theta.d.z", &device[i].imu.theta.d.z, "double");
5803  add_name(basename+".imu.theta.w", &device[i].imu.theta.w, "double");
5804  add_name(basename+".imu.euler", &device[i].imu.euler, "avector");
5805  add_name(basename+".imu.euler.h", &device[i].imu.euler.h, "double");
5806  add_name(basename+".imu.euler.e", &device[i].imu.euler.e, "double");
5807  add_name(basename+".imu.euler.b", &device[i].imu.euler.b, "double");
5808  add_name(basename+".imu.omega", &device[i].imu.omega, "rvector");
5809  add_name(basename+".imu.omega.col", &device[i].imu.omega.col, "double[]");
5810  for(size_t j = 0; j < sizeof(device[i].imu.omega.col)/sizeof(device[i].imu.omega.col[0]); ++j) {
5811  string rebasename = basename + "imu.omega.col[" + std::to_string(j) + "]";
5812  add_name(rebasename, &device[i].imu.omega.col[j], "double");
5813  }
5814  add_name(basename+".imu.alpha", &device[i].imu.alpha, "rvector");
5815  add_name(basename+".imu.alpha.col", &device[i].imu.alpha.col, "double[]");
5816  for(size_t j = 0; j < sizeof(device[i].imu.alpha.col)/sizeof(device[i].imu.alpha.col[0]); ++j) {
5817  string rebasename = basename + "imu.alpha.col[" + std::to_string(j) + "]";
5818  add_name(rebasename, &device[i].imu.alpha.col[j], "double");
5819  }
5820  add_name(basename+".imu.mag", &device[i].imu.mag, "rvector");
5821  add_name(basename+".imu.mag.col", &device[i].imu.mag.col, "double[]");
5822  for(size_t j = 0; j < sizeof(device[i].imu.mag.col)/sizeof(device[i].imu.mag.col[0]); ++j) {
5823  string rebasename = basename + "imu.mag.col[" + std::to_string(j) + "]";
5824  add_name(rebasename, &device[i].imu.mag.col[j], "double");
5825  }
5826  add_name(basename+".imu.bdot", &device[i].imu.bdot, "rvector");
5827  add_name(basename+".imu.bdot.col", &device[i].imu.bdot.col, "double[]");
5828  for(size_t j = 0; j < sizeof(device[i].imu.bdot.col)/sizeof(device[i].imu.bdot.col[0]); ++j) {
5829  string rebasename = basename + "imu.bdot.col[" + std::to_string(j) + "]";
5830  add_name(rebasename, &device[i].imu.bdot.col[j], "double");
5831  }
5832  add_name(basename+".mcc", &device[i].mcc, "mccstruc");
5833  add_name(basename+".mcc.align", &device[i].mcc.align, "quaternion");
5834  add_name(basename+".mcc.align.d", &device[i].mcc.align.d, "cvector");
5835  add_name(basename+".mcc.align.d.x", &device[i].mcc.align.d.x, "double");
5836  add_name(basename+".mcc.align.d.y", &device[i].mcc.align.d.y, "double");
5837  add_name(basename+".mcc.align.d.z", &device[i].mcc.align.d.z, "double");
5838  add_name(basename+".mcc.align.w", &device[i].mcc.align.w, "double");
5839  add_name(basename+".mcc.q", &device[i].mcc.q, "quaternion");
5840  add_name(basename+".mcc.q.d", &device[i].mcc.q.d, "cvector");
5841  add_name(basename+".mcc.q.d.x", &device[i].mcc.q.d.x, "double");
5842  add_name(basename+".mcc.q.d.y", &device[i].mcc.q.d.y, "double");
5843  add_name(basename+".mcc.q.d.z", &device[i].mcc.q.d.z, "double");
5844  add_name(basename+".mcc.q.w", &device[i].mcc.q.w, "double");
5845  add_name(basename+".mcc.o", &device[i].mcc.o, "rvector");
5846  add_name(basename+".mcc.o.col", &device[i].mcc.o.col, "double[]");
5847  for(size_t j = 0; j < sizeof(device[i].mcc.o.col)/sizeof(device[i].mcc.o.col[0]); ++j) {
5848  string rebasename = basename + "mcc.o.col[" + std::to_string(j) + "]";
5849  add_name(rebasename, &device[i].mcc.o.col[j], "double");
5850  }
5851  add_name(basename+".mcc.a", &device[i].mcc.a, "rvector");
5852  add_name(basename+".mcc.a.col", &device[i].mcc.a.col, "double[]");
5853  for(size_t j = 0; j < sizeof(device[i].mcc.a.col)/sizeof(device[i].mcc.a.col[0]); ++j) {
5854  string rebasename = basename + "mcc.a.col[" + std::to_string(j) + "]";
5855  add_name(rebasename, &device[i].mcc.a.col[j], "double");
5856  }
5857  add_name(basename+".motr", &device[i].motr, "motrstruc");
5858  add_name(basename+".motr.max", &device[i].motr.max, "float");
5859  add_name(basename+".motr.rat", &device[i].motr.rat, "float");
5860  add_name(basename+".motr.spd", &device[i].motr.spd, "float");
5861  add_name(basename+".mtr", &device[i].mtr, "mtrstruc");
5862  add_name(basename+".mtr.align", &device[i].mtr.align, "quaternion");
5863  add_name(basename+".mtr.align.d", &device[i].mtr.align.d, "cvector");
5864  add_name(basename+".mtr.align.d.x", &device[i].mtr.align.d.x, "double");
5865  add_name(basename+".mtr.align.d.y", &device[i].mtr.align.d.y, "double");
5866  add_name(basename+".mtr.align.d.z", &device[i].mtr.align.d.z, "double");
5867  add_name(basename+".mtr.align.w", &device[i].mtr.align.w, "double");
5868  add_name(basename+".mtr.npoly", &device[i].mtr.npoly, "float[]");
5869  for(size_t j = 0; j < sizeof(device[i].mtr.npoly)/sizeof(device[i].mtr.npoly[0]); ++j) {
5870  string rebasename = basename + "mtr.npoly[" + std::to_string(j) + "]";
5871  add_name(rebasename, &device[i].mtr.npoly[j], "float");
5872  }
5873  add_name(basename+".mtr.ppoly", &device[i].mtr.ppoly, "float[]");
5874  for(size_t j = 0; j < sizeof(device[i].mtr.ppoly)/sizeof(device[i].mtr.ppoly[0]); ++j) {
5875  string rebasename = basename + "mtr.ppoly[" + std::to_string(j) + "]";
5876  add_name(rebasename, &device[i].mtr.ppoly[j], "float");
5877  }
5878  add_name(basename+".mtr.mxmom", &device[i].mtr.mxmom, "float");
5879  add_name(basename+".mtr.tc", &device[i].mtr.tc, "float");
5880  add_name(basename+".mtr.rmom", &device[i].mtr.rmom, "float");
5881  add_name(basename+".mtr.mom", &device[i].mtr.mom, "float");
5882  add_name(basename+".pload", &device[i].pload, "ploadstruc");
5883  add_name(basename+".pload.key_cnt", &device[i].pload.key_cnt, "uint16_t");
5884  add_name(basename+".pload.keyidx", &device[i].pload.keyidx, "uint16_t[]");
5885  for(size_t j = 0; j < sizeof(device[i].pload.keyidx)/sizeof(device[i].pload.keyidx[0]); ++j) {
5886  string rebasename = basename + "pload.keyidx[" + std::to_string(j) + "]";
5887  add_name(rebasename, &device[i].pload.keyidx[j], "uint16_t");
5888  }
5889  add_name(basename+".pload.keyval", &device[i].pload.keyval, "float[]");
5890  for(size_t j = 0; j < sizeof(device[i].pload.keyval)/sizeof(device[i].pload.keyval[0]); ++j) {
5891  string rebasename = basename + "pload.keyval[" + std::to_string(j) + "]";
5892  add_name(rebasename, &device[i].pload.keyval[j], "float");
5893  }
5894  add_name(basename+".prop", &device[i].prop, "propstruc");
5895  add_name(basename+".prop.cap", &device[i].prop.cap, "float");
5896  add_name(basename+".prop.lev", &device[i].prop.lev, "float");
5897  add_name(basename+".psen", &device[i].psen, "psenstruc");
5898  add_name(basename+".psen.press", &device[i].psen.press, "float");
5899  add_name(basename+".pvstrg", &device[i].pvstrg, "pvstrgstruc");
5900  add_name(basename+".pvstrg.bcidx", &device[i].pvstrg.bcidx, "uint16_t");
5901  add_name(basename+".pvstrg.effbase", &device[i].pvstrg.effbase, "float");
5902  add_name(basename+".pvstrg.effslope", &device[i].pvstrg.effslope, "float");
5903  add_name(basename+".pvstrg.maxpower", &device[i].pvstrg.maxpower, "float");
5904  add_name(basename+".pvstrg.power", &device[i].pvstrg.power, "float");
5905  add_name(basename+".rot", &device[i].rot, "rotstruc");
5906  add_name(basename+".rot.angle", &device[i].rot.angle, "float");
5907  add_name(basename+".rw", &device[i].rw, "rwstruc");
5908  add_name(basename+".rw.align", &device[i].rw.align, "quaternion");
5909  add_name(basename+".rw.align.d", &device[i].rw.align.d, "cvector");
5910  add_name(basename+".rw.align.d.x", &device[i].rw.align.d.x, "double");
5911  add_name(basename+".rw.align.d.y", &device[i].rw.align.d.y, "double");
5912  add_name(basename+".rw.align.d.z", &device[i].rw.align.d.z, "double");
5913  add_name(basename+".rw.align.w", &device[i].rw.align.w, "double");
5914  add_name(basename+".rw.mom", &device[i].rw.mom, "rvector");
5915  add_name(basename+".rw.mom.col", &device[i].rw.mom.col, "double[]");
5916  for(size_t j = 0; j < sizeof(device[i].rw.mom.col)/sizeof(device[i].rw.mom.col[0]); ++j) {
5917  string rebasename = basename + "rw.mom.col[" + std::to_string(j) + "]";
5918  add_name(rebasename, &device[i].rw.mom.col[j], "double");
5919  }
5920  add_name(basename+".rw.mxomg", &device[i].rw.mxomg, "float");
5921  add_name(basename+".rw.mxalp", &device[i].rw.mxalp, "float");
5922  add_name(basename+".rw.tc", &device[i].rw.tc, "float");
5923  add_name(basename+".rw.omg", &device[i].rw.omg, "float");
5924  add_name(basename+".rw.alp", &device[i].rw.alp, "float");
5925  add_name(basename+".rw.romg", &device[i].rw.romg, "float");
5926  add_name(basename+".rw.ralp", &device[i].rw.ralp, "float");
5927  add_name(basename+".rxr", &device[i].rxr, "rxrstruc");
5928  add_name(basename+".rxr.opmode", &device[i].rxr.opmode, "uint16_t");
5929  add_name(basename+".rxr.modulation", &device[i].rxr.modulation, "uint16_t");
5930  add_name(basename+".rxr.rssi", &device[i].rxr.rssi, "uint16_t");
5931  add_name(basename+".rxr.pktsize", &device[i].rxr.pktsize, "uint16_t");
5932  add_name(basename+".rxr.freq", &device[i].rxr.freq, "double");
5933  add_name(basename+".rxr.maxfreq", &device[i].rxr.maxfreq, "double");
5934  add_name(basename+".rxr.minfreq", &device[i].rxr.minfreq, "double");
5935  add_name(basename+".rxr.powerin", &device[i].rxr.powerin, "float");
5936  add_name(basename+".rxr.powerout", &device[i].rxr.powerout, "float");
5937  add_name(basename+".rxr.maxpower", &device[i].rxr.maxpower, "float");
5938  add_name(basename+".rxr.band", &device[i].rxr.band, "float");
5939  add_name(basename+".rxr.squelch_tone", &device[i].rxr.squelch_tone, "float");
5940  add_name(basename+".rxr.goodratio", &device[i].rxr.goodratio, "double");
5941  add_name(basename+".rxr.rxutc", &device[i].rxr.rxutc, "double");
5942  add_name(basename+".rxr.uptime", &device[i].rxr.uptime, "double");
5943  add_name(basename+".ssen", &device[i].ssen, "ssenstruc");
5944  add_name(basename+".ssen.align", &device[i].ssen.align, "quaternion");
5945  add_name(basename+".ssen.align.d", &device[i].ssen.align.d, "cvector");
5946  add_name(basename+".ssen.align.d.x", &device[i].ssen.align.d.x, "double");
5947  add_name(basename+".ssen.align.d.y", &device[i].ssen.align.d.y, "double");
5948  add_name(basename+".ssen.align.d.z", &device[i].ssen.align.d.z, "double");
5949  add_name(basename+".ssen.align.w", &device[i].ssen.align.w, "double");
5950  add_name(basename+".ssen.qva", &device[i].ssen.qva, "float");
5951  add_name(basename+".ssen.qvb", &device[i].ssen.qvb, "float");
5952  add_name(basename+".ssen.qvc", &device[i].ssen.qvc, "float");
5953  add_name(basename+".ssen.qvd", &device[i].ssen.qvd, "float");
5954  add_name(basename+".ssen.azimuth", &device[i].ssen.azimuth, "float");
5955  add_name(basename+".ssen.elevation", &device[i].ssen.elevation, "float");
5956  add_name(basename+".stt", &device[i].stt, "sttstruc");
5957  add_name(basename+".stt.align", &device[i].stt.align, "quaternion");
5958  add_name(basename+".stt.align.d", &device[i].stt.align.d, "cvector");
5959  add_name(basename+".stt.align.d.x", &device[i].stt.align.d.x, "double");
5960  add_name(basename+".stt.align.d.y", &device[i].stt.align.d.y, "double");
5961  add_name(basename+".stt.align.d.z", &device[i].stt.align.d.z, "double");
5962  add_name(basename+".stt.align.w", &device[i].stt.align.w, "double");
5963  add_name(basename+".stt.att", &device[i].stt.att, "quaternion");
5964  add_name(basename+".stt.att.d", &device[i].stt.att.d, "cvector");
5965  add_name(basename+".stt.att.d.x", &device[i].stt.att.d.x, "double");
5966  add_name(basename+".stt.att.d.y", &device[i].stt.att.d.y, "double");
5967  add_name(basename+".stt.att.d.z", &device[i].stt.att.d.z, "double");
5968  add_name(basename+".stt.att.w", &device[i].stt.att.w, "double");
5969  add_name(basename+".stt.omega", &device[i].stt.omega, "rvector");
5970  add_name(basename+".stt.omega.col", &device[i].stt.omega.col, "double[]");
5971  for(size_t j = 0; j < sizeof(device[i].stt.omega.col)/sizeof(device[i].stt.omega.col[0]); ++j) {
5972  string rebasename = basename + "stt.omega.col[" + std::to_string(j) + "]";
5973  add_name(rebasename, &device[i].stt.omega.col[j], "double");
5974  }
5975  add_name(basename+".stt.alpha", &device[i].stt.alpha, "rvector");
5976  add_name(basename+".stt.alpha.col", &device[i].stt.alpha.col, "double[]");
5977  for(size_t j = 0; j < sizeof(device[i].stt.alpha.col)/sizeof(device[i].stt.alpha.col[0]); ++j) {
5978  string rebasename = basename + "stt.alpha.col[" + std::to_string(j) + "]";
5979  add_name(rebasename, &device[i].stt.alpha.col[j], "double");
5980  }
5981  add_name(basename+".stt.retcode", &device[i].stt.retcode, "uint16_t");
5982  add_name(basename+".stt.status", &device[i].stt.status, "uint32_t");
5983  add_name(basename+".suchi", &device[i].suchi, "suchistruc");
5984  add_name(basename+".suchi.align", &device[i].suchi.align, "quaternion");
5985  add_name(basename+".suchi.align.d", &device[i].suchi.align.d, "cvector");
5986  add_name(basename+".suchi.align.d.x", &device[i].suchi.align.d.x, "double");
5987  add_name(basename+".suchi.align.d.y", &device[i].suchi.align.d.y, "double");
5988  add_name(basename+".suchi.align.d.z", &device[i].suchi.align.d.z, "double");
5989  add_name(basename+".suchi.align.w", &device[i].suchi.align.w, "double");
5990  add_name(basename+".suchi.press", &device[i].suchi.press, "float");
5991  add_name(basename+".suchi.temps", &device[i].suchi.temps, "float[]");
5992  for(size_t j = 0; j < sizeof(device[i].suchi.temps)/sizeof(device[i].suchi.temps[0]); ++j) {
5993  string rebasename = basename + "suchi.temps[" + std::to_string(j) + "]";
5994  add_name(rebasename, &device[i].suchi.temps[j], "float");
5995  }
5996  add_name(basename+".swch", &device[i].swch, "swchstruc");
5997  add_name(basename+".tcu", &device[i].tcu, "tcustruc");
5998  add_name(basename+".tcu.mcnt", &device[i].tcu.mcnt, "uint16_t");
5999  add_name(basename+".tcu.mcidx", &device[i].tcu.mcidx, "uint16_t[]");
6000  for(size_t j = 0; j < sizeof(device[i].tcu.mcidx)/sizeof(device[i].tcu.mcidx[0]); ++j) {
6001  string rebasename = basename + "tcu.mcidx[" + std::to_string(j) + "]";
6002  add_name(rebasename, &device[i].tcu.mcidx[j], "uint16_t");
6003  }
6004  add_name(basename+".tcv", &device[i].tcv, "tcvstruc");
6005  add_name(basename+".tcv.opmode", &device[i].tcv.opmode, "uint16_t");
6006  add_name(basename+".tcv.modulation", &device[i].tcv.modulation, "uint16_t");
6007  add_name(basename+".tcv.rssi", &device[i].tcv.rssi, "uint16_t");
6008  add_name(basename+".tcv.pktsize", &device[i].tcv.pktsize, "uint16_t");
6009  add_name(basename+".tcv.freq", &device[i].tcv.freq, "double");
6010  add_name(basename+".tcv.maxfreq", &device[i].tcv.maxfreq, "double");
6011  add_name(basename+".tcv.minfreq", &device[i].tcv.minfreq, "double");
6012  add_name(basename+".tcv.powerin", &device[i].tcv.powerin, "float");
6013  add_name(basename+".tcv.powerout", &device[i].tcv.powerout, "float");
6014  add_name(basename+".tcv.maxpower", &device[i].tcv.maxpower, "float");
6015  add_name(basename+".tcv.band", &device[i].tcv.band, "float");
6016  add_name(basename+".tcv.squelch_tone", &device[i].tcv.squelch_tone, "float");
6017  add_name(basename+".tcv.goodratio", &device[i].tcv.goodratio, "double");
6018  add_name(basename+".tcv.txutc", &device[i].tcv.txutc, "double");
6019  add_name(basename+".tcv.rxutc", &device[i].tcv.rxutc, "double");
6020  add_name(basename+".tcv.uptime", &device[i].tcv.uptime, "double");
6021  add_name(basename+".telem", &device[i].telem, "telemstruc");
6022  add_name(basename+".telem.vuint8", &device[i].telem.vuint8, "uint8_t");
6023  add_name(basename+".telem.vint8", &device[i].telem.vint8, "int8_t");
6024  add_name(basename+".telem.vuint16", &device[i].telem.vuint16, "uint16_t");
6025  add_name(basename+".telem.vint16", &device[i].telem.vint16, "int16_t");
6026  add_name(basename+".telem.vuint32", &device[i].telem.vuint32, "uint32_t");
6027  add_name(basename+".telem.vint32", &device[i].telem.vint32, "int32_t");
6028  add_name(basename+".telem.vfloat", &device[i].telem.vfloat, "float");
6029  add_name(basename+".telem.vdouble", &device[i].telem.vdouble, "double");
6030  add_name(basename+".telem.vstring", &device[i].telem.vstring, "char[]");
6031  add_name(basename+".thst", &device[i].thst, "thststruc");
6032  add_name(basename+".thst.align", &device[i].thst.align, "quaternion");
6033  add_name(basename+".thst.align.d", &device[i].thst.align.d, "cvector");
6034  add_name(basename+".thst.align.d.x", &device[i].thst.align.d.x, "double");
6035  add_name(basename+".thst.align.d.y", &device[i].thst.align.d.y, "double");
6036  add_name(basename+".thst.align.d.z", &device[i].thst.align.d.z, "double");
6037  add_name(basename+".thst.align.w", &device[i].thst.align.w, "double");
6038  add_name(basename+".thst.flw", &device[i].thst.flw, "float");
6039  add_name(basename+".thst.isp", &device[i].thst.isp, "float");
6040  add_name(basename+".tnc", &device[i].tnc, "tncstruc");
6041  add_name(basename+".tsen", &device[i].tsen, "tsenstruc");
6042  add_name(basename+".txr", &device[i].txr, "txrstruc");
6043  add_name(basename+".txr.opmode", &device[i].txr.opmode, "uint16_t");
6044  add_name(basename+".txr.modulation", &device[i].txr.modulation, "uint16_t");
6045  add_name(basename+".txr.rssi", &device[i].txr.rssi, "uint16_t");
6046  add_name(basename+".txr.pktsize", &device[i].txr.pktsize, "uint16_t");
6047  add_name(basename+".txr.freq", &device[i].txr.freq, "double");
6048  add_name(basename+".txr.maxfreq", &device[i].txr.maxfreq, "double");
6049  add_name(basename+".txr.minfreq", &device[i].txr.minfreq, "double");
6050  add_name(basename+".txr.powerin", &device[i].txr.powerin, "float");
6051  add_name(basename+".txr.powerout", &device[i].txr.powerout, "float");
6052  add_name(basename+".txr.maxpower", &device[i].txr.maxpower, "float");
6053  add_name(basename+".txr.band", &device[i].txr.band, "float");
6054  add_name(basename+".txr.squelch_tone", &device[i].txr.squelch_tone, "float");
6055  add_name(basename+".txr.goodratio", &device[i].txr.goodratio, "double");
6056  add_name(basename+".txr.txutc", &device[i].txr.txutc, "double");
6057  add_name(basename+".txr.uptime", &device[i].txr.uptime, "double");
6058  }
6059 
6060 
6061  // devspecstruc devspec
6062  add_name("devspec", &devspec, "devspecstruc");
6063  add_name("devspec.all_cnt", &devspec.all_cnt, "uint16_t");
6064  add_name("devspec.ant_cnt", &devspec.ant_cnt, "uint16_t");
6065  add_name("devspec.batt_cnt", &devspec.batt_cnt, "uint16_t");
6066  add_name("devspec.bus_cnt", &devspec.bus_cnt, "uint16_t");
6067  add_name("devspec.cam_cnt", &devspec.cam_cnt, "uint16_t");
6068  add_name("devspec.cpu_cnt", &devspec.cpu_cnt, "uint16_t");
6069  add_name("devspec.disk_cnt", &devspec.disk_cnt, "uint16_t");
6070  add_name("devspec.gps_cnt", &devspec.gps_cnt, "uint16_t");
6071  add_name("devspec.htr_cnt", &devspec.htr_cnt, "uint16_t");
6072  add_name("devspec.imu_cnt", &devspec.imu_cnt, "uint16_t");
6073  add_name("devspec.mcc_cnt", &devspec.mcc_cnt, "uint16_t");
6074  add_name("devspec.motr_cnt", &devspec.motr_cnt, "uint16_t");
6075  add_name("devspec.mtr_cnt", &devspec.mtr_cnt, "uint16_t");
6076  add_name("devspec.pload_cnt", &devspec.pload_cnt, "uint16_t");
6077  add_name("devspec.prop_cnt", &devspec.prop_cnt, "uint16_t");
6078  add_name("devspec.psen_cnt", &devspec.psen_cnt, "uint16_t");
6079  add_name("devspec.bcreg_cnt", &devspec.bcreg_cnt, "uint16_t");
6080  add_name("devspec.rot_cnt", &devspec.rot_cnt, "uint16_t");
6081  add_name("devspec.rw_cnt", &devspec.rw_cnt, "uint16_t");
6082  add_name("devspec.rxr_cnt", &devspec.rxr_cnt, "uint16_t");
6083  add_name("devspec.ssen_cnt", &devspec.ssen_cnt, "uint16_t");
6084  add_name("devspec.pvstrg_cnt", &devspec.pvstrg_cnt, "uint16_t");
6085  add_name("devspec.stt_cnt", &devspec.stt_cnt, "uint16_t");
6086  add_name("devspec.suchi_cnt", &devspec.suchi_cnt, "uint16_t");
6087  add_name("devspec.swch_cnt", &devspec.swch_cnt, "uint16_t");
6088  add_name("devspec.tcu_cnt", &devspec.tcu_cnt, "uint16_t");
6089  add_name("devspec.tcv_cnt", &devspec.tcv_cnt, "uint16_t");
6090  add_name("devspec.telem_cnt", &devspec.telem_cnt, "uint16_t");
6091  add_name("devspec.thst_cnt", &devspec.thst_cnt, "uint16_t");
6092  add_name("devspec.tsen_cnt", &devspec.tsen_cnt, "uint16_t");
6093  add_name("devspec.tnc_cnt", &devspec.tnc_cnt, "uint16_t");
6094  add_name("devspec.txr_cnt", &devspec.txr_cnt, "uint16_t");
6095 
6096 
6097  // vector<portstruc> port
6098  add_name("port", &port, "vector<portstruc>");
6099  for(size_t i = 0; i < port.capacity(); ++i) {
6100  string basename = "port[" + std::to_string(i) + "]";
6101  add_name(basename, &port[i], "portstruc");
6102  add_name(basename+".type", &port[i].type, "PORT_TYPE");
6103  add_name(basename+".name", &port[i].name, "char[]");
6104  }
6105 
6106  // vector<agentstruc> agent
6107  add_name("agent", &agent, "vector<agentstruc>");
6108  for(size_t i = 0; i < agent.capacity(); ++i) {
6109  string basename = "agent[" + std::to_string(i) + "]";
6110  add_name(basename, &agent[i], "agentstruc");
6111  add_name(basename+".client", &agent[i].client, "bool");
6112  add_name(basename+".sub", &agent[i].sub, "socket_channel");
6113  add_name(basename+".sub.type", &agent[i].sub.type, "NetworkType");
6114  add_name(basename+".sub.cudp", &agent[i].sub.cudp, "int32_t");
6115  add_name(basename+".server", &agent[i].server, "bool");
6116  add_name(basename+".ifcnt", &agent[i].ifcnt, "size_t");
6117  add_name(basename+".pub", &agent[i].pub, "socket_channel[]");
6118  for(size_t j = 0; j < sizeof(agent[i].pub)/sizeof(agent[i].pub[0]); ++j) {
6119  string rebasename = basename + ".pub[" + std::to_string(j) + "]";
6120  add_name(rebasename, &agent[i].pub[j], "socket_channel");
6121  add_name(rebasename+".type", &agent[i].pub[j].type, "NetworkType");
6122  add_name(rebasename+".cudp", &agent[i].pub[j].cudp, "int32_t");
6123  }
6124  add_name(basename+".req", &agent[i].req, "socket_channel");
6125  add_name(basename+".req.type", &agent[i].req.type, "NetworkType");
6126  add_name(basename+".req.cudp", &agent[i].req.cudp, "int32_t");
6127  add_name(basename+".pid", &agent[i].pid, "int32_t");
6128  add_name(basename+".aprd", &agent[i].aprd, "double");
6129  add_name(basename+".stateflag", &agent[i].stateflag, "uint16_t");
6130  add_name(basename+".reqs", &agent[i].reqs, "vector<agent_request_entry>");
6131  for(size_t j = 0; j < agent[i].reqs.capacity(); ++j) {
6132  string rebasename = basename + ".reqs[" + std::to_string(j) + "]";
6133  add_name(rebasename, &agent[i].reqs[j], "agent_request_entry");
6134  add_name(rebasename+".token", &agent[i].reqs[j].token, "string");
6135  add_name(rebasename+".function", &agent[i].reqs[j].function, "agent_request_function");
6136  add_name(rebasename+".synopsis", &agent[i].reqs[j].synopsis, "string");
6137  add_name(rebasename+".description", &agent[i].reqs[j].description, "string");
6138  }
6139  add_name(basename+".beat", &agent[i].beat, "beatstruc");
6140  add_name(basename+".beat.utc", &agent[i].beat.utc, "double");
6141  add_name(basename+".beat.node", &agent[i].beat.node, "char[]");
6142  add_name(basename+".beat.proc", &agent[i].beat.proc, "char[]");
6143  add_name(basename+".beat.ntype", &agent[i].beat.ntype, "NetworkType");
6144  add_name(basename+".beat.addr", &agent[i].beat.addr, "char[]");
6145  add_name(basename+".beat.port", &agent[i].beat.port, "uint16_t");
6146  add_name(basename+".beat.bsz", &agent[i].beat.bsz, "uint32_t");
6147  add_name(basename+".beat.bprd", &agent[i].beat.bprd, "double");
6148  add_name(basename+".beat.user", &agent[i].beat.user, "char[]");
6149  add_name(basename+".beat.cpu", &agent[i].beat.cpu, "float");
6150  add_name(basename+".beat.memory", &agent[i].beat.memory, "float");
6151  add_name(basename+".beat.jitter", &agent[i].beat.jitter, "double");
6152  add_name(basename+".beat.exists", &agent[i].beat.exists, "bool");
6153  }
6154 
6155  // vector<eventstruc> event
6156  add_name("event", &event, "vector<eventstruc>");
6157  for(size_t i = 0; i < event.capacity(); ++i) {
6158  string basename = "event[" + std::to_string(i) + "]";
6159  add_name(basename, &event[i], "eventstruc");
6160  add_name(basename+".utc", &event[i].utc, "double");
6161  add_name(basename+".utcexec", &event[i].utcexec, "double");
6162  add_name(basename+".node", &event[i].node, "char[]");
6163  add_name(basename+".name", &event[i].name, "char[]");
6164  add_name(basename+".user", &event[i].user, "char[]");
6165  add_name(basename+".flag", &event[i].flag, "uint32_t");
6166  add_name(basename+".type", &event[i].type, "uint32_t");
6167  add_name(basename+".value", &event[i].value, "double");
6168  add_name(basename+".dtime", &event[i].dtime, "double");
6169  add_name(basename+".ctime", &event[i].ctime, "double");
6170  add_name(basename+".denergy", &event[i].denergy, "float");
6171  add_name(basename+".cenergy", &event[i].cenergy, "float");
6172  add_name(basename+".dmass", &event[i].dmass, "float");
6173  add_name(basename+".cmass", &event[i].cmass, "float");
6174  add_name(basename+".dbytes", &event[i].dbytes, "float");
6175  add_name(basename+".cbytes", &event[i].cbytes, "float");
6176  add_name(basename+".handle", &event[i].handle, "jsonhandle");
6177  add_name(basename+".handle.hash", &event[i].handle.hash, "uint16_t");
6178  add_name(basename+".handle.index", &event[i].handle.index, "uint16_t");
6179  add_name(basename+".data", &event[i].data, "char[]");
6180  add_name(basename+".condition", &event[i].condition, "char[]");
6181  }
6182 
6183 
6184  // vector<targetstruc> target
6185  add_name("target", &target, "vector<targetstruc>");
6186  for(size_t i = 0; i < target.capacity(); ++i) {
6187  string basename = "target[" + std::to_string(i) + "]";
6188  add_name(basename, &target[i], "targetstruc");
6189  add_name(basename+".utc", &target[i].utc, "double");
6190  add_name(basename+".name", &target[i].name, "char[]");
6191  add_name(basename+".type", &target[i].type, "uint16_t");
6192  add_name(basename+".azfrom", &target[i].azfrom, "float");
6193  add_name(basename+".elfrom", &target[i].elfrom, "float");
6194  add_name(basename+".azto", &target[i].azto, "float");
6195  add_name(basename+".elto", &target[i].elto, "float");
6196  add_name(basename+".range", &target[i].range, "double");
6197  add_name(basename+".close", &target[i].close, "double");
6198  add_name(basename+".min", &target[i].min, "float");
6199  add_name(basename+".loc", &target[i].loc, "locstruc");
6200  add_name(basename+".loc.utc", &target[i].loc.utc, "double");
6201  add_name(basename+".loc.pos", &target[i].loc.pos, "posstruc");
6202  add_name(basename+".loc.pos.utc", &target[i].loc.pos.utc, "double");
6203  add_name(basename+".loc.pos.icrf", &target[i].loc.pos.icrf, "cartpos");
6204  add_name(basename+".loc.pos.icrf.utc", &target[i].loc.pos.icrf.utc, "double");
6205  add_name(basename+".loc.pos.icrf.s", &target[i].loc.pos.icrf.s, "rvector");
6206  add_name(basename+".loc.pos.icrf.s.col", &target[i].loc.pos.icrf.s.col, "double[]");
6207  for(size_t j = 0; j < sizeof(target[i].loc.pos.icrf.s.col)/sizeof(target[i].loc.pos.icrf.s.col[0]); ++j) {
6208  string rebasename = basename + "loc.pos.icrf.s.col[" + std::to_string(j) + "]";
6209  add_name(rebasename, &target[i].loc.pos.icrf.s.col[j], "double");
6210  }
6211  add_name(basename+".loc.pos.icrf.v", &target[i].loc.pos.icrf.v, "rvector");
6212  add_name(basename+".loc.pos.icrf.v.col", &target[i].loc.pos.icrf.v.col, "double[]");
6213  for(size_t j = 0; j < sizeof(target[i].loc.pos.icrf.v.col)/sizeof(target[i].loc.pos.icrf.v.col[0]); ++j) {
6214  string rebasename = basename + "loc.pos.icrf.v.col[" + std::to_string(j) + "]";
6215  add_name(rebasename, &target[i].loc.pos.icrf.v.col[j], "double");
6216  }
6217  add_name(basename+".loc.pos.icrf.a", &target[i].loc.pos.icrf.a, "rvector");
6218  add_name(basename+".loc.pos.icrf.a.col", &target[i].loc.pos.icrf.a.col, "double[]");
6219  for(size_t j = 0; j < sizeof(target[i].loc.pos.icrf.a.col)/sizeof(target[i].loc.pos.icrf.a.col[0]); ++j) {
6220  string rebasename = basename + "loc.pos.icrf.a.col[" + std::to_string(j) + "]";
6221  add_name(rebasename, &target[i].loc.pos.icrf.a.col[j], "double");
6222  }
6223  add_name(basename+".loc.pos.icrf.pass", &target[i].loc.pos.icrf.pass, "uint32_t");
6224  add_name(basename+".loc.pos.eci", &target[i].loc.pos.eci, "cartpos");
6225  add_name(basename+".loc.pos.eci.utc", &target[i].loc.pos.eci.utc, "double");
6226  add_name(basename+".loc.pos.eci.s", &target[i].loc.pos.eci.s, "rvector");
6227  add_name(basename+".loc.pos.eci.s.col", &target[i].loc.pos.eci.s.col, "double[]");
6228  for(size_t j = 0; j < sizeof(target[i].loc.pos.eci.s.col)/sizeof(target[i].loc.pos.eci.s.col[0]); ++j) {
6229  string rebasename = basename + "loc.pos.eci.s.col[" + std::to_string(j) + "]";
6230  add_name(rebasename, &target[i].loc.pos.eci.s.col[j], "double");
6231  }
6232  add_name(basename+".loc.pos.eci.v", &target[i].loc.pos.eci.v, "rvector");
6233  add_name(basename+".loc.pos.eci.v.col", &target[i].loc.pos.eci.v.col, "double[]");
6234  for(size_t j = 0; j < sizeof(target[i].loc.pos.eci.v.col)/sizeof(target[i].loc.pos.eci.v.col[0]); ++j) {
6235  string rebasename = basename + "loc.pos.eci.v.col[" + std::to_string(j) + "]";
6236  add_name(rebasename, &target[i].loc.pos.eci.v.col[j], "double");
6237  }
6238  add_name(basename+".loc.pos.eci.a", &target[i].loc.pos.eci.a, "rvector");
6239  add_name(basename+".loc.pos.eci.a.col", &target[i].loc.pos.eci.a.col, "double[]");
6240  for(size_t j = 0; j < sizeof(target[i].loc.pos.eci.a.col)/sizeof(target[i].loc.pos.eci.a.col[0]); ++j) {
6241  string rebasename = basename + "loc.pos.eci.a.col[" + std::to_string(j) + "]";
6242  add_name(rebasename, &target[i].loc.pos.eci.a.col[j], "double");
6243  }
6244  add_name(basename+".loc.pos.eci.pass", &target[i].loc.pos.eci.pass, "uint32_t");
6245  add_name(basename+".loc.pos.sci", &target[i].loc.pos.sci, "cartpos");
6246  add_name(basename+".loc.pos.sci.utc", &target[i].loc.pos.sci.utc, "double");
6247  add_name(basename+".loc.pos.sci.s", &target[i].loc.pos.sci.s, "rvector");
6248  add_name(basename+".loc.pos.sci.s.col", &target[i].loc.pos.sci.s.col, "double[]");
6249  for(size_t j = 0; j < sizeof(target[i].loc.pos.sci.s.col)/sizeof(target[i].loc.pos.sci.s.col[0]); ++j) {
6250  string rebasename = basename + "loc.pos.sci.s.col[" + std::to_string(j) + "]";
6251  add_name(rebasename, &target[i].loc.pos.sci.s.col[j], "double");
6252  }
6253  add_name(basename+".loc.pos.sci.v", &target[i].loc.pos.sci.v, "rvector");
6254  add_name(basename+".loc.pos.sci.v.col", &target[i].loc.pos.sci.v.col, "double[]");
6255  for(size_t j = 0; j < sizeof(target[i].loc.pos.sci.v.col)/sizeof(target[i].loc.pos.sci.v.col[0]); ++j) {
6256  string rebasename = basename + "loc.pos.sci.v.col[" + std::to_string(j) + "]";
6257  add_name(rebasename, &target[i].loc.pos.sci.v.col[j], "double");
6258  }
6259  add_name(basename+".loc.pos.sci.a", &target[i].loc.pos.sci.a, "rvector");
6260  add_name(basename+".loc.pos.sci.a.col", &target[i].loc.pos.sci.a.col, "double[]");
6261  for(size_t j = 0; j < sizeof(target[i].loc.pos.sci.a.col)/sizeof(target[i].loc.pos.sci.a.col[0]); ++j) {
6262  string rebasename = basename + "loc.pos.sci.a.col[" + std::to_string(j) + "]";
6263  add_name(rebasename, &target[i].loc.pos.sci.a.col[j], "double");
6264  }
6265  add_name(basename+".loc.pos.sci.pass", &target[i].loc.pos.sci.pass, "uint32_t");
6266  add_name(basename+".loc.pos.geoc", &target[i].loc.pos.geoc, "cartpos");
6267  add_name(basename+".loc.pos.geoc.utc", &target[i].loc.pos.geoc.utc, "double");
6268  add_name(basename+".loc.pos.geoc.s", &target[i].loc.pos.geoc.s, "rvector");
6269  add_name(basename+".loc.pos.geoc.s.col", &target[i].loc.pos.geoc.s.col, "double[]");
6270  for(size_t j = 0; j < sizeof(target[i].loc.pos.geoc.s.col)/sizeof(target[i].loc.pos.geoc.s.col[0]); ++j) {
6271  string rebasename = basename + "loc.pos.geoc.s.col[" + std::to_string(j) + "]";
6272  add_name(rebasename, &target[i].loc.pos.geoc.s.col[j], "double");
6273  }
6274  add_name(basename+".loc.pos.geoc.v", &target[i].loc.pos.geoc.v, "rvector");
6275  add_name(basename+".loc.pos.geoc.v.col", &target[i].loc.pos.geoc.v.col, "double[]");
6276  for(size_t j = 0; j < sizeof(target[i].loc.pos.geoc.v.col)/sizeof(target[i].loc.pos.geoc.v.col[0]); ++j) {
6277  string rebasename = basename + "loc.pos.geoc.v.col[" + std::to_string(j) + "]";
6278  add_name(rebasename, &target[i].loc.pos.geoc.v.col[j], "double");
6279  }
6280  add_name(basename+".loc.pos.geoc.a", &target[i].loc.pos.geoc.a, "rvector");
6281  add_name(basename+".loc.pos.geoc.a.col", &target[i].loc.pos.geoc.a.col, "double[]");
6282  for(size_t j = 0; j < sizeof(target[i].loc.pos.geoc.a.col)/sizeof(target[i].loc.pos.geoc.a.col[0]); ++j) {
6283  string rebasename = basename + "loc.pos.geoc.a.col[" + std::to_string(j) + "]";
6284  add_name(rebasename, &target[i].loc.pos.geoc.a.col[j], "double");
6285  }
6286  add_name(basename+".loc.pos.geoc.pass", &target[i].loc.pos.geoc.pass, "uint32_t");
6287  add_name(basename+".loc.pos.selc", &target[i].loc.pos.selc, "cartpos");
6288  add_name(basename+".loc.pos.selc.utc", &target[i].loc.pos.selc.utc, "double");
6289  add_name(basename+".loc.pos.selc.s", &target[i].loc.pos.selc.s, "rvector");
6290  add_name(basename+".loc.pos.selc.s.col", &target[i].loc.pos.selc.s.col, "double[]");
6291  for(size_t j = 0; j < sizeof(target[i].loc.pos.selc.s.col)/sizeof(target[i].loc.pos.selc.s.col[0]); ++j) {
6292  string rebasename = basename + "loc.pos.selc.s.col[" + std::to_string(j) + "]";
6293  add_name(rebasename, &target[i].loc.pos.selc.s.col[j], "double");
6294  }
6295  add_name(basename+".loc.pos.selc.v", &target[i].loc.pos.selc.v, "rvector");
6296  add_name(basename+".loc.pos.selc.v.col", &target[i].loc.pos.selc.v.col, "double[]");
6297  for(size_t j = 0; j < sizeof(target[i].loc.pos.selc.v.col)/sizeof(target[i].loc.pos.selc.v.col[0]); ++j) {
6298  string rebasename = basename + "loc.pos.selc.v.col[" + std::to_string(j) + "]";
6299  add_name(rebasename, &target[i].loc.pos.selc.v.col[j], "double");
6300  }
6301  add_name(basename+".loc.pos.selc.a", &target[i].loc.pos.selc.a, "rvector");
6302  add_name(basename+".loc.pos.selc.a.col", &target[i].loc.pos.selc.a.col, "double[]");
6303  for(size_t j = 0; j < sizeof(target[i].loc.pos.selc.a.col)/sizeof(target[i].loc.pos.selc.a.col[0]); ++j) {
6304  string rebasename = basename + "loc.pos.selc.a.col[" + std::to_string(j) + "]";
6305  add_name(rebasename, &target[i].loc.pos.selc.a.col[j], "double");
6306  }
6307  add_name(basename+".loc.pos.selc.pass", &target[i].loc.pos.selc.pass, "uint32_t");
6308  add_name(basename+".loc.pos.geod", &target[i].loc.pos.geod, "geoidpos");
6309  add_name(basename+".loc.pos.geod.utc", &target[i].loc.pos.geod.utc, "double");
6310  add_name(basename+".loc.pos.geod.s", &target[i].loc.pos.geod.s, "gvector");
6311  add_name(basename+".loc.pos.geod.s.lat", &target[i].loc.pos.geod.s.lat, "double");
6312  add_name(basename+".loc.pos.geod.s.lon", &target[i].loc.pos.geod.s.lon, "double");
6313  add_name(basename+".loc.pos.geod.s.h", &target[i].loc.pos.geod.s.h, "double");
6314  add_name(basename+".loc.pos.geod.v", &target[i].loc.pos.geod.v, "gvector");
6315  add_name(basename+".loc.pos.geod.v.lat", &target[i].loc.pos.geod.v.lat, "double");
6316  add_name(basename+".loc.pos.geod.v.lon", &target[i].loc.pos.geod.v.lon, "double");
6317  add_name(basename+".loc.pos.geod.v.h", &target[i].loc.pos.geod.v.h, "double");
6318  add_name(basename+".loc.pos.geod.a", &target[i].loc.pos.geod.a, "gvector");
6319  add_name(basename+".loc.pos.geod.a.lat", &target[i].loc.pos.geod.a.lat, "double");
6320  add_name(basename+".loc.pos.geod.a.lon", &target[i].loc.pos.geod.a.lon, "double");
6321  add_name(basename+".loc.pos.geod.a.h", &target[i].loc.pos.geod.a.h, "double");
6322  add_name(basename+".loc.pos.geod.pass", &target[i].loc.pos.geod.pass, "uint32_t");
6323  add_name(basename+".loc.pos.selg", &target[i].loc.pos.selg, "geoidpos");
6324  add_name(basename+".loc.pos.selg.utc", &target[i].loc.pos.selg.utc, "double");
6325  add_name(basename+".loc.pos.selg.s", &target[i].loc.pos.selg.s, "gvector");
6326  add_name(basename+".loc.pos.selg.s.lat", &target[i].loc.pos.selg.s.lat, "double");
6327  add_name(basename+".loc.pos.selg.s.lon", &target[i].loc.pos.selg.s.lon, "double");
6328  add_name(basename+".loc.pos.selg.s.h", &target[i].loc.pos.selg.s.h, "double");
6329  add_name(basename+".loc.pos.selg.v", &target[i].loc.pos.selg.v, "gvector");
6330  add_name(basename+".loc.pos.selg.v.lat", &target[i].loc.pos.selg.v.lat, "double");
6331  add_name(basename+".loc.pos.selg.v.lon", &target[i].loc.pos.selg.v.lon, "double");
6332  add_name(basename+".loc.pos.selg.v.h", &target[i].loc.pos.selg.v.h, "double");
6333  add_name(basename+".loc.pos.selg.a", &target[i].loc.pos.selg.a, "gvector");
6334  add_name(basename+".loc.pos.selg.a.lat", &target[i].loc.pos.selg.a.lat, "double");
6335  add_name(basename+".loc.pos.selg.a.lon", &target[i].loc.pos.selg.a.lon, "double");
6336  add_name(basename+".loc.pos.selg.a.h", &target[i].loc.pos.selg.a.h, "double");
6337  add_name(basename+".loc.pos.selg.pass", &target[i].loc.pos.selg.pass, "uint32_t");
6338  add_name(basename+".loc.pos.geos", &target[i].loc.pos.geos, "spherpos");
6339  add_name(basename+".loc.pos.geos.utc", &target[i].loc.pos.geos.utc, "double");
6340  add_name(basename+".loc.pos.geos.s", &target[i].loc.pos.geos.s, "svector");
6341  add_name(basename+".loc.pos.geos.s.phi", &target[i].loc.pos.geos.s.phi, "double");
6342  add_name(basename+".loc.pos.geos.s.lambda", &target[i].loc.pos.geos.s.lambda, "double");
6343  add_name(basename+".loc.pos.geos.s.r", &target[i].loc.pos.geos.s.r, "double");
6344  add_name(basename+".loc.pos.geos.v", &target[i].loc.pos.geos.v, "svector");
6345  add_name(basename+".loc.pos.geos.v.phi", &target[i].loc.pos.geos.v.phi, "double");
6346  add_name(basename+".loc.pos.geos.v.lambda", &target[i].loc.pos.geos.v.lambda, "double");
6347  add_name(basename+".loc.pos.geos.v.r", &target[i].loc.pos.geos.v.r, "double");
6348  add_name(basename+".loc.pos.geos.a", &target[i].loc.pos.geos.a, "svector");
6349  add_name(basename+".loc.pos.geos.a.phi", &target[i].loc.pos.geos.a.phi, "double");
6350  add_name(basename+".loc.pos.geos.a.lambda", &target[i].loc.pos.geos.a.lambda, "double");
6351  add_name(basename+".loc.pos.geos.a.r", &target[i].loc.pos.geos.a.r, "double");
6352  add_name(basename+".loc.pos.geos.pass", &target[i].loc.pos.geos.pass, "uint32_t");
6353  add_name(basename+".loc.pos.extra", &target[i].loc.pos.extra, "extrapos");
6354  add_name(basename+".loc.pos.extra.utc", &target[i].loc.pos.extra.utc, "double");
6355  add_name(basename+".loc.pos.extra.tt", &target[i].loc.pos.extra.tt, "double");
6356  add_name(basename+".loc.pos.extra.ut", &target[i].loc.pos.extra.ut, "double");
6357  add_name(basename+".loc.pos.extra.tdb", &target[i].loc.pos.extra.tdb, "double");
6358  add_name(basename+".loc.pos.extra.j2e", &target[i].loc.pos.extra.j2e, "rmatrix");
6359  add_name(basename+".loc.pos.extra.j2e.row", &target[i].loc.pos.extra.j2e.row, "rvector[]");
6360  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.j2e.row)/sizeof(target[i].loc.pos.extra.j2e.row[0]); ++j) {
6361  string rebasename = basename + "loc.pos.extra.j2e.row[" + std::to_string(j) + "]";
6362  add_name(rebasename, &target[i].loc.pos.extra.j2e.row[j], "rvector");
6363  add_name(rebasename+".col", &target[i].loc.pos.extra.j2e.row[j].col, "double[]");
6364  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.j2e.row[j].col)/sizeof(target[i].loc.pos.extra.j2e.row[j].col[0]); ++k) {
6365  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6366  add_name(rebasename2, &target[i].loc.pos.extra.j2e.row[j].col[k], "double");
6367  }
6368  }
6369  add_name(basename+".loc.pos.extra.dj2e", &target[i].loc.pos.extra.dj2e, "rmatrix");
6370  add_name(basename+".loc.pos.extra.dj2e.row", &target[i].loc.pos.extra.dj2e.row, "rvector[]");
6371  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.dj2e.row)/sizeof(target[i].loc.pos.extra.dj2e.row[0]); ++j) {
6372  string rebasename = basename + "loc.pos.extra.dj2e.row[" + std::to_string(j) + "]";
6373  add_name(rebasename, &target[i].loc.pos.extra.dj2e.row[j], "rvector");
6374  add_name(rebasename+".col", &target[i].loc.pos.extra.dj2e.row[j].col, "double[]");
6375  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.dj2e.row[j].col)/sizeof(target[i].loc.pos.extra.dj2e.row[j].col[0]); ++k) {
6376  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6377  add_name(rebasename2, &target[i].loc.pos.extra.dj2e.row[j].col[k], "double");
6378  }
6379  }
6380  add_name(basename+".loc.pos.extra.ddj2e", &target[i].loc.pos.extra.ddj2e, "rmatrix");
6381  add_name(basename+".loc.pos.extra.ddj2e.row", &target[i].loc.pos.extra.ddj2e.row, "rvector[]");
6382  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.ddj2e.row)/sizeof(target[i].loc.pos.extra.ddj2e.row[0]); ++j) {
6383  string rebasename = basename + "loc.pos.extra.ddj2e.row[" + std::to_string(j) + "]";
6384  add_name(rebasename, &target[i].loc.pos.extra.ddj2e.row[j], "rvector");
6385  add_name(rebasename+".col", &target[i].loc.pos.extra.ddj2e.row[j].col, "double[]");
6386  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.ddj2e.row[j].col)/sizeof(target[i].loc.pos.extra.ddj2e.row[j].col[0]); ++k) {
6387  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6388  add_name(rebasename2, &target[i].loc.pos.extra.ddj2e.row[j].col[k], "double");
6389  }
6390  }
6391  add_name(basename+".loc.pos.extra.e2j", &target[i].loc.pos.extra.e2j, "rmatrix");
6392  add_name(basename+".loc.pos.extra.e2j.row", &target[i].loc.pos.extra.e2j.row, "rvector[]");
6393  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.e2j.row)/sizeof(target[i].loc.pos.extra.e2j.row[0]); ++j) {
6394  string rebasename = basename + "loc.pos.extra.e2j.row[" + std::to_string(j) + "]";
6395  add_name(rebasename, &target[i].loc.pos.extra.e2j.row[j], "rvector");
6396  add_name(rebasename+".col", &target[i].loc.pos.extra.e2j.row[j].col, "double[]");
6397  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.e2j.row[j].col)/sizeof(target[i].loc.pos.extra.e2j.row[j].col[0]); ++k) {
6398  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6399  add_name(rebasename2, &target[i].loc.pos.extra.e2j.row[j].col[k], "double");
6400  }
6401  }
6402  add_name(basename+".loc.pos.extra.de2j", &target[i].loc.pos.extra.de2j, "rmatrix");
6403  add_name(basename+".loc.pos.extra.de2j.row", &target[i].loc.pos.extra.de2j.row, "rvector[]");
6404  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.de2j.row)/sizeof(target[i].loc.pos.extra.de2j.row[0]); ++j) {
6405  string rebasename = basename + "loc.pos.extra.de2j.row[" + std::to_string(j) + "]";
6406  add_name(rebasename, &target[i].loc.pos.extra.de2j.row[j], "rvector");
6407  add_name(rebasename+".col", &target[i].loc.pos.extra.de2j.row[j].col, "double[]");
6408  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.de2j.row[j].col)/sizeof(target[i].loc.pos.extra.de2j.row[j].col[0]); ++k) {
6409  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6410  add_name(rebasename2, &target[i].loc.pos.extra.de2j.row[j].col[k], "double");
6411  }
6412  }
6413  add_name(basename+".loc.pos.extra.dde2j", &target[i].loc.pos.extra.dde2j, "rmatrix");
6414  add_name(basename+".loc.pos.extra.dde2j.row", &target[i].loc.pos.extra.dde2j.row, "rvector[]");
6415  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.dde2j.row)/sizeof(target[i].loc.pos.extra.dde2j.row[0]); ++j) {
6416  string rebasename = basename + "loc.pos.extra.dde2j.row[" + std::to_string(j) + "]";
6417  add_name(rebasename, &target[i].loc.pos.extra.dde2j.row[j], "rvector");
6418  add_name(rebasename+".col", &target[i].loc.pos.extra.dde2j.row[j].col, "double[]");
6419  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.dde2j.row[j].col)/sizeof(target[i].loc.pos.extra.dde2j.row[j].col[0]); ++k) {
6420  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6421  add_name(rebasename2, &target[i].loc.pos.extra.dde2j.row[j].col[k], "double");
6422  }
6423  }
6424  add_name(basename+".loc.pos.extra.j2t", &target[i].loc.pos.extra.j2t, "rmatrix");
6425  add_name(basename+".loc.pos.extra.j2t.row", &target[i].loc.pos.extra.j2t.row, "rvector[]");
6426  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.j2t.row)/sizeof(target[i].loc.pos.extra.j2t.row[0]); ++j) {
6427  string rebasename = basename + "loc.pos.extra.j2t.row[" + std::to_string(j) + "]";
6428  add_name(rebasename, &target[i].loc.pos.extra.j2t.row[j], "rvector");
6429  add_name(rebasename+".col", &target[i].loc.pos.extra.j2t.row[j].col, "double[]");
6430  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.j2t.row[j].col)/sizeof(target[i].loc.pos.extra.j2t.row[j].col[0]); ++k) {
6431  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6432  add_name(rebasename2, &target[i].loc.pos.extra.j2t.row[j].col[k], "double");
6433  }
6434  }
6435  add_name(basename+".loc.pos.extra.j2s", &target[i].loc.pos.extra.j2s, "rmatrix");
6436  add_name(basename+".loc.pos.extra.j2s.row", &target[i].loc.pos.extra.j2s.row, "rvector[]");
6437  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.j2s.row)/sizeof(target[i].loc.pos.extra.j2s.row[0]); ++j) {
6438  string rebasename = basename + "loc.pos.extra.j2s.row[" + std::to_string(j) + "]";
6439  add_name(rebasename, &target[i].loc.pos.extra.j2s.row[j], "rvector");
6440  add_name(rebasename+".col", &target[i].loc.pos.extra.j2s.row[j].col, "double[]");
6441  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.j2s.row[j].col)/sizeof(target[i].loc.pos.extra.j2s.row[j].col[0]); ++k) {
6442  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6443  add_name(rebasename2, &target[i].loc.pos.extra.j2s.row[j].col[k], "double");
6444  }
6445  }
6446  add_name(basename+".loc.pos.extra.t2j", &target[i].loc.pos.extra.t2j, "rmatrix");
6447  add_name(basename+".loc.pos.extra.t2j.row", &target[i].loc.pos.extra.t2j.row, "rvector[]");
6448  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.t2j.row)/sizeof(target[i].loc.pos.extra.t2j.row[0]); ++j) {
6449  string rebasename = basename + "loc.pos.extra.t2j.row[" + std::to_string(j) + "]";
6450  add_name(rebasename, &target[i].loc.pos.extra.t2j.row[j], "rvector");
6451  add_name(rebasename+".col", &target[i].loc.pos.extra.t2j.row[j].col, "double[]");
6452  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.t2j.row[j].col)/sizeof(target[i].loc.pos.extra.t2j.row[j].col[0]); ++k) {
6453  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6454  add_name(rebasename2, &target[i].loc.pos.extra.t2j.row[j].col[k], "double");
6455  }
6456  }
6457  add_name(basename+".loc.pos.extra.s2j", &target[i].loc.pos.extra.s2j, "rmatrix");
6458  add_name(basename+".loc.pos.extra.s2j.row", &target[i].loc.pos.extra.s2j.row, "rvector[]");
6459  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.s2j.row)/sizeof(target[i].loc.pos.extra.s2j.row[0]); ++j) {
6460  string rebasename = basename + "loc.pos.extra.s2j.row[" + std::to_string(j) + "]";
6461  add_name(rebasename, &target[i].loc.pos.extra.s2j.row[j], "rvector");
6462  add_name(rebasename+".col", &target[i].loc.pos.extra.s2j.row[j].col, "double[]");
6463  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.s2j.row[j].col)/sizeof(target[i].loc.pos.extra.s2j.row[j].col[0]); ++k) {
6464  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6465  add_name(rebasename2, &target[i].loc.pos.extra.s2j.row[j].col[k], "double");
6466  }
6467  }
6468  add_name(basename+".loc.pos.extra.s2t", &target[i].loc.pos.extra.s2t, "rmatrix");
6469  add_name(basename+".loc.pos.extra.s2t.row", &target[i].loc.pos.extra.s2t.row, "rvector[]");
6470  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.s2t.row)/sizeof(target[i].loc.pos.extra.s2t.row[0]); ++j) {
6471  string rebasename = basename + "loc.pos.extra.s2t.row[" + std::to_string(j) + "]";
6472  add_name(rebasename, &target[i].loc.pos.extra.s2t.row[j], "rvector");
6473  add_name(rebasename+".col", &target[i].loc.pos.extra.s2t.row[j].col, "double[]");
6474  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.s2t.row[j].col)/sizeof(target[i].loc.pos.extra.s2t.row[j].col[0]); ++k) {
6475  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6476  add_name(rebasename2, &target[i].loc.pos.extra.s2t.row[j].col[k], "double");
6477  }
6478  }
6479  add_name(basename+".loc.pos.extra.ds2t", &target[i].loc.pos.extra.ds2t, "rmatrix");
6480  add_name(basename+".loc.pos.extra.ds2t.row", &target[i].loc.pos.extra.ds2t.row, "rvector[]");
6481  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.ds2t.row)/sizeof(target[i].loc.pos.extra.ds2t.row[0]); ++j) {
6482  string rebasename = basename + "loc.pos.extra.ds2t.row[" + std::to_string(j) + "]";
6483  add_name(rebasename, &target[i].loc.pos.extra.ds2t.row[j], "rvector");
6484  add_name(rebasename+".col", &target[i].loc.pos.extra.ds2t.row[j].col, "double[]");
6485  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.ds2t.row[j].col)/sizeof(target[i].loc.pos.extra.ds2t.row[j].col[0]); ++k) {
6486  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6487  add_name(rebasename2, &target[i].loc.pos.extra.ds2t.row[j].col[k], "double");
6488  }
6489  }
6490  add_name(basename+".loc.pos.extra.t2s", &target[i].loc.pos.extra.t2s, "rmatrix");
6491  add_name(basename+".loc.pos.extra.t2s.row", &target[i].loc.pos.extra.t2s.row, "rvector[]");
6492  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.t2s.row)/sizeof(target[i].loc.pos.extra.t2s.row[0]); ++j) {
6493  string rebasename = basename + "loc.pos.extra.t2s.row[" + std::to_string(j) + "]";
6494  add_name(rebasename, &target[i].loc.pos.extra.t2s.row[j], "rvector");
6495  add_name(rebasename+".col", &target[i].loc.pos.extra.t2s.row[j].col, "double[]");
6496  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.t2s.row[j].col)/sizeof(target[i].loc.pos.extra.t2s.row[j].col[0]); ++k) {
6497  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6498  add_name(rebasename2, &target[i].loc.pos.extra.t2s.row[j].col[k], "double");
6499  }
6500  }
6501  add_name(basename+".loc.pos.extra.dt2s", &target[i].loc.pos.extra.dt2s, "rmatrix");
6502  add_name(basename+".loc.pos.extra.dt2s.row", &target[i].loc.pos.extra.dt2s.row, "rvector[]");
6503  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.dt2s.row)/sizeof(target[i].loc.pos.extra.dt2s.row[0]); ++j) {
6504  string rebasename = basename + "loc.pos.extra.dt2s.row[" + std::to_string(j) + "]";
6505  add_name(rebasename, &target[i].loc.pos.extra.dt2s.row[j], "rvector");
6506  add_name(rebasename+".col", &target[i].loc.pos.extra.dt2s.row[j].col, "double[]");
6507  for(size_t k = 0; k < sizeof(target[i].loc.pos.extra.dt2s.row[j].col)/sizeof(target[i].loc.pos.extra.dt2s.row[j].col[0]); ++k) {
6508  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6509  add_name(rebasename2, &target[i].loc.pos.extra.dt2s.row[j].col[k], "double");
6510  }
6511  }
6512  add_name(basename+".loc.pos.extra.sun2earth", &target[i].loc.pos.extra.sun2earth, "cartpos");
6513  add_name(basename+".loc.pos.extra.sun2earth.utc", &target[i].loc.pos.extra.sun2earth.utc, "double");
6514  add_name(basename+".loc.pos.extra.sun2earth.s", &target[i].loc.pos.extra.sun2earth.s, "rvector");
6515  add_name(basename+".loc.pos.extra.sun2earth.s.col", &target[i].loc.pos.extra.sun2earth.s.col, "double[]");
6516  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.sun2earth.s.col)/sizeof(target[i].loc.pos.extra.sun2earth.s.col[0]); ++j) {
6517  string rebasename = basename + "loc.pos.extra.sun2earth.s.col[" + std::to_string(j) + "]";
6518  add_name(rebasename, &target[i].loc.pos.extra.sun2earth.s.col[j], "double");
6519  }
6520  add_name(basename+".loc.pos.extra.sun2earth.v", &target[i].loc.pos.extra.sun2earth.v, "rvector");
6521  add_name(basename+".loc.pos.extra.sun2earth.v.col", &target[i].loc.pos.extra.sun2earth.v.col, "double[]");
6522  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.sun2earth.v.col)/sizeof(target[i].loc.pos.extra.sun2earth.v.col[0]); ++j) {
6523  string rebasename = basename + "loc.pos.extra.sun2earth.v.col[" + std::to_string(j) + "]";
6524  add_name(rebasename, &target[i].loc.pos.extra.sun2earth.v.col[j], "double");
6525  }
6526  add_name(basename+".loc.pos.extra.sun2earth.a", &target[i].loc.pos.extra.sun2earth.a, "rvector");
6527  add_name(basename+".loc.pos.extra.sun2earth.a.col", &target[i].loc.pos.extra.sun2earth.a.col, "double[]");
6528  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.sun2earth.a.col)/sizeof(target[i].loc.pos.extra.sun2earth.a.col[0]); ++j) {
6529  string rebasename = basename + "loc.pos.extra.sun2earth.a.col[" + std::to_string(j) + "]";
6530  add_name(rebasename, &target[i].loc.pos.extra.sun2earth.a.col[j], "double");
6531  }
6532  add_name(basename+".loc.pos.extra.sun2earth.pass", &target[i].loc.pos.extra.sun2earth.pass, "uint32_t");
6533  add_name(basename+".loc.pos.extra.sun2moon", &target[i].loc.pos.extra.sun2moon, "cartpos");
6534  add_name(basename+".loc.pos.extra.sun2moon.utc", &target[i].loc.pos.extra.sun2moon.utc, "double");
6535  add_name(basename+".loc.pos.extra.sun2moon.s", &target[i].loc.pos.extra.sun2moon.s, "rvector");
6536  add_name(basename+".loc.pos.extra.sun2moon.s.col", &target[i].loc.pos.extra.sun2moon.s.col, "double[]");
6537  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.sun2moon.s.col)/sizeof(target[i].loc.pos.extra.sun2moon.s.col[0]); ++j) {
6538  string rebasename = basename + "loc.pos.extra.sun2moon.s.col[" + std::to_string(j) + "]";
6539  add_name(rebasename, &target[i].loc.pos.extra.sun2moon.s.col[j], "double");
6540  }
6541  add_name(basename+".loc.pos.extra.sun2moon.v", &target[i].loc.pos.extra.sun2moon.v, "rvector");
6542  add_name(basename+".loc.pos.extra.sun2moon.v.col", &target[i].loc.pos.extra.sun2moon.v.col, "double[]");
6543  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.sun2moon.v.col)/sizeof(target[i].loc.pos.extra.sun2moon.v.col[0]); ++j) {
6544  string rebasename = basename + "loc.pos.extra.sun2moon.v.col[" + std::to_string(j) + "]";
6545  add_name(rebasename, &target[i].loc.pos.extra.sun2moon.v.col[j], "double");
6546  }
6547  add_name(basename+".loc.pos.extra.sun2moon.a", &target[i].loc.pos.extra.sun2moon.a, "rvector");
6548  add_name(basename+".loc.pos.extra.sun2moon.a.col", &target[i].loc.pos.extra.sun2moon.a.col, "double[]");
6549  for(size_t j = 0; j < sizeof(target[i].loc.pos.extra.sun2moon.a.col)/sizeof(target[i].loc.pos.extra.sun2moon.a.col[0]); ++j) {
6550  string rebasename = basename + "loc.pos.extra.sun2moon.a.col[" + std::to_string(j) + "]";
6551  add_name(rebasename, &target[i].loc.pos.extra.sun2moon.a.col[j], "double");
6552  }
6553  add_name(basename+".loc.pos.extra.sun2moon.pass", &target[i].loc.pos.extra.sun2moon.pass, "uint32_t");
6554  add_name(basename+".loc.pos.extra.closest", &target[i].loc.pos.extra.closest, "uint16_t");
6555  add_name(basename+".loc.pos.earthsep", &target[i].loc.pos.earthsep, "float");
6556  add_name(basename+".loc.pos.moonsep", &target[i].loc.pos.moonsep, "float");
6557  add_name(basename+".loc.pos.sunsize", &target[i].loc.pos.sunsize, "float");
6558  add_name(basename+".loc.pos.sunradiance", &target[i].loc.pos.sunradiance, "float");
6559  add_name(basename+".loc.pos.bearth", &target[i].loc.pos.bearth, "rvector");
6560  add_name(basename+".loc.pos.bearth.col", &target[i].loc.pos.bearth.col, "double[]");
6561  for(size_t j = 0; j < sizeof(target[i].loc.pos.bearth.col)/sizeof(target[i].loc.pos.bearth.col[0]); ++j) {
6562  string rebasename = basename + "loc.pos.bearth.col[" + std::to_string(j) + "]";
6563  add_name(rebasename, &target[i].loc.pos.bearth.col[j], "double");
6564  }
6565  add_name(basename+".loc.pos.orbit", &target[i].loc.pos.orbit, "double");
6566  add_name(basename+".loc.att", &target[i].loc.att, "attstruc");
6567  add_name(basename+".loc.att.utc", &target[i].loc.att.utc, "double");
6568  add_name(basename+".loc.att.topo", &target[i].loc.att.topo, "qatt");
6569  add_name(basename+".loc.att.topo.utc", &target[i].loc.att.topo.utc, "double");
6570  add_name(basename+".loc.att.topo.s", &target[i].loc.att.topo.s, "quaternion");
6571  add_name(basename+".loc.att.topo.s.d", &target[i].loc.att.topo.s.d, "cvector");
6572  add_name(basename+".loc.att.topo.s.d.x", &target[i].loc.att.topo.s.d.x, "double");
6573  add_name(basename+".loc.att.topo.s.d.y", &target[i].loc.att.topo.s.d.y, "double");
6574  add_name(basename+".loc.att.topo.s.d.z", &target[i].loc.att.topo.s.d.z, "double");
6575  add_name(basename+".loc.att.topo.s.w", &target[i].loc.att.topo.s.w, "double");
6576  add_name(basename+".loc.att.topo.v", &target[i].loc.att.topo.v, "rvector");
6577  add_name(basename+".loc.att.topo.v.col", &target[i].loc.att.topo.v.col, "double[]");
6578  for(size_t j = 0; j < sizeof(target[i].loc.att.topo.v.col)/sizeof(target[i].loc.att.topo.v.col[0]); ++j) {
6579  string rebasename = basename + "loc.att.topo.v.col[" + std::to_string(j) + "]";
6580  add_name(rebasename, &target[i].loc.att.topo.v.col[j], "double");
6581  }
6582  add_name(basename+".loc.att.topo.a", &target[i].loc.att.topo.a, "rvector");
6583  add_name(basename+".loc.att.topo.a.col", &target[i].loc.att.topo.a.col, "double[]");
6584  for(size_t j = 0; j < sizeof(target[i].loc.att.topo.a.col)/sizeof(target[i].loc.att.topo.a.col[0]); ++j) {
6585  string rebasename = basename + "loc.att.topo.a.col[" + std::to_string(j) + "]";
6586  add_name(rebasename, &target[i].loc.att.topo.a.col[j], "double");
6587  }
6588  add_name(basename+".loc.att.topo.pass", &target[i].loc.att.topo.pass, "uint32_t");
6589  add_name(basename+".loc.att.lvlh", &target[i].loc.att.lvlh, "qatt");
6590  add_name(basename+".loc.att.lvlh.utc", &target[i].loc.att.lvlh.utc, "double");
6591  add_name(basename+".loc.att.lvlh.s", &target[i].loc.att.lvlh.s, "quaternion");
6592  add_name(basename+".loc.att.lvlh.s.d", &target[i].loc.att.lvlh.s.d, "cvector");
6593  add_name(basename+".loc.att.lvlh.s.d.x", &target[i].loc.att.lvlh.s.d.x, "double");
6594  add_name(basename+".loc.att.lvlh.s.d.y", &target[i].loc.att.lvlh.s.d.y, "double");
6595  add_name(basename+".loc.att.lvlh.s.d.z", &target[i].loc.att.lvlh.s.d.z, "double");
6596  add_name(basename+".loc.att.lvlh.s.w", &target[i].loc.att.lvlh.s.w, "double");
6597  add_name(basename+".loc.att.lvlh.v", &target[i].loc.att.lvlh.v, "rvector");
6598  add_name(basename+".loc.att.lvlh.v.col", &target[i].loc.att.lvlh.v.col, "double[]");
6599  for(size_t j = 0; j < sizeof(target[i].loc.att.lvlh.v.col)/sizeof(target[i].loc.att.lvlh.v.col[0]); ++j) {
6600  string rebasename = basename + "loc.att.lvlh.v.col[" + std::to_string(j) + "]";
6601  add_name(rebasename, &target[i].loc.att.lvlh.v.col[j], "double");
6602  }
6603  add_name(basename+".loc.att.lvlh.a", &target[i].loc.att.lvlh.a, "rvector");
6604  add_name(basename+".loc.att.lvlh.a.col", &target[i].loc.att.lvlh.a.col, "double[]");
6605  for(size_t j = 0; j < sizeof(target[i].loc.att.lvlh.a.col)/sizeof(target[i].loc.att.lvlh.a.col[0]); ++j) {
6606  string rebasename = basename + "loc.att.lvlh.a.col[" + std::to_string(j) + "]";
6607  add_name(rebasename, &target[i].loc.att.lvlh.a.col[j], "double");
6608  }
6609  add_name(basename+".loc.att.lvlh.pass", &target[i].loc.att.lvlh.pass, "uint32_t");
6610  add_name(basename+".loc.att.geoc", &target[i].loc.att.geoc, "qatt");
6611  add_name(basename+".loc.att.geoc.utc", &target[i].loc.att.geoc.utc, "double");
6612  add_name(basename+".loc.att.geoc.s", &target[i].loc.att.geoc.s, "quaternion");
6613  add_name(basename+".loc.att.geoc.s.d", &target[i].loc.att.geoc.s.d, "cvector");
6614  add_name(basename+".loc.att.geoc.s.d.x", &target[i].loc.att.geoc.s.d.x, "double");
6615  add_name(basename+".loc.att.geoc.s.d.y", &target[i].loc.att.geoc.s.d.y, "double");
6616  add_name(basename+".loc.att.geoc.s.d.z", &target[i].loc.att.geoc.s.d.z, "double");
6617  add_name(basename+".loc.att.geoc.s.w", &target[i].loc.att.geoc.s.w, "double");
6618  add_name(basename+".loc.att.geoc.v", &target[i].loc.att.geoc.v, "rvector");
6619  add_name(basename+".loc.att.geoc.v.col", &target[i].loc.att.geoc.v.col, "double[]");
6620  for(size_t j = 0; j < sizeof(target[i].loc.att.geoc.v.col)/sizeof(target[i].loc.att.geoc.v.col[0]); ++j) {
6621  string rebasename = basename + "loc.att.geoc.v.col[" + std::to_string(j) + "]";
6622  add_name(rebasename, &target[i].loc.att.geoc.v.col[j], "double");
6623  }
6624  add_name(basename+".loc.att.geoc.a", &target[i].loc.att.geoc.a, "rvector");
6625  add_name(basename+".loc.att.geoc.a.col", &target[i].loc.att.geoc.a.col, "double[]");
6626  for(size_t j = 0; j < sizeof(target[i].loc.att.geoc.a.col)/sizeof(target[i].loc.att.geoc.a.col[0]); ++j) {
6627  string rebasename = basename + "loc.att.geoc.a.col[" + std::to_string(j) + "]";
6628  add_name(rebasename, &target[i].loc.att.geoc.a.col[j], "double");
6629  }
6630  add_name(basename+".loc.att.geoc.pass", &target[i].loc.att.geoc.pass, "uint32_t");
6631  add_name(basename+".loc.att.selc", &target[i].loc.att.selc, "qatt");
6632  add_name(basename+".loc.att.selc.utc", &target[i].loc.att.selc.utc, "double");
6633  add_name(basename+".loc.att.selc.s", &target[i].loc.att.selc.s, "quaternion");
6634  add_name(basename+".loc.att.selc.s.d", &target[i].loc.att.selc.s.d, "cvector");
6635  add_name(basename+".loc.att.selc.s.d.x", &target[i].loc.att.selc.s.d.x, "double");
6636  add_name(basename+".loc.att.selc.s.d.y", &target[i].loc.att.selc.s.d.y, "double");
6637  add_name(basename+".loc.att.selc.s.d.z", &target[i].loc.att.selc.s.d.z, "double");
6638  add_name(basename+".loc.att.selc.s.w", &target[i].loc.att.selc.s.w, "double");
6639  add_name(basename+".loc.att.selc.v", &target[i].loc.att.selc.v, "rvector");
6640  add_name(basename+".loc.att.selc.v.col", &target[i].loc.att.selc.v.col, "double[]");
6641  for(size_t j = 0; j < sizeof(target[i].loc.att.selc.v.col)/sizeof(target[i].loc.att.selc.v.col[0]); ++j) {
6642  string rebasename = basename + "loc.att.selc.v.col[" + std::to_string(j) + "]";
6643  add_name(rebasename, &target[i].loc.att.selc.v.col[j], "double");
6644  }
6645  add_name(basename+".loc.att.selc.a", &target[i].loc.att.selc.a, "rvector");
6646  add_name(basename+".loc.att.selc.a.col", &target[i].loc.att.selc.a.col, "double[]");
6647  for(size_t j = 0; j < sizeof(target[i].loc.att.selc.a.col)/sizeof(target[i].loc.att.selc.a.col[0]); ++j) {
6648  string rebasename = basename + "loc.att.selc.a.col[" + std::to_string(j) + "]";
6649  add_name(rebasename, &target[i].loc.att.selc.a.col[j], "double");
6650  }
6651  add_name(basename+".loc.att.selc.pass", &target[i].loc.att.selc.pass, "uint32_t");
6652  add_name(basename+".loc.att.icrf", &target[i].loc.att.icrf, "qatt");
6653  add_name(basename+".loc.att.icrf.utc", &target[i].loc.att.icrf.utc, "double");
6654  add_name(basename+".loc.att.icrf.s", &target[i].loc.att.icrf.s, "quaternion");
6655  add_name(basename+".loc.att.icrf.s.d", &target[i].loc.att.icrf.s.d, "cvector");
6656  add_name(basename+".loc.att.icrf.s.d.x", &target[i].loc.att.icrf.s.d.x, "double");
6657  add_name(basename+".loc.att.icrf.s.d.y", &target[i].loc.att.icrf.s.d.y, "double");
6658  add_name(basename+".loc.att.icrf.s.d.z", &target[i].loc.att.icrf.s.d.z, "double");
6659  add_name(basename+".loc.att.icrf.s.w", &target[i].loc.att.icrf.s.w, "double");
6660  add_name(basename+".loc.att.icrf.v", &target[i].loc.att.icrf.v, "rvector");
6661  add_name(basename+".loc.att.icrf.v.col", &target[i].loc.att.icrf.v.col, "double[]");
6662  for(size_t j = 0; j < sizeof(target[i].loc.att.icrf.v.col)/sizeof(target[i].loc.att.icrf.v.col[0]); ++j) {
6663  string rebasename = basename + "loc.att.icrf.v.col[" + std::to_string(j) + "]";
6664  add_name(rebasename, &target[i].loc.att.icrf.v.col[j], "double");
6665  }
6666  add_name(basename+".loc.att.icrf.a", &target[i].loc.att.icrf.a, "rvector");
6667  add_name(basename+".loc.att.icrf.a.col", &target[i].loc.att.icrf.a.col, "double[]");
6668  for(size_t j = 0; j < sizeof(target[i].loc.att.icrf.a.col)/sizeof(target[i].loc.att.icrf.a.col[0]); ++j) {
6669  string rebasename = basename + "loc.att.icrf.a.col[" + std::to_string(j) + "]";
6670  add_name(rebasename, &target[i].loc.att.icrf.a.col[j], "double");
6671  }
6672  add_name(basename+".loc.att.icrf.pass", &target[i].loc.att.icrf.pass, "uint32_t");
6673  add_name(basename+".loc.att.extra", &target[i].loc.att.extra, "extraatt");
6674  add_name(basename+".loc.att.extra.utc", &target[i].loc.att.extra.utc, "double");
6675  add_name(basename+".loc.att.extra.j2b", &target[i].loc.att.extra.j2b, "rmatrix");
6676  add_name(basename+".loc.att.extra.j2b.row", &target[i].loc.att.extra.j2b.row, "rvector[]");
6677  for(size_t j = 0; j < sizeof(target[i].loc.att.extra.j2b.row)/sizeof(target[i].loc.att.extra.j2b.row[0]); ++j) {
6678  string rebasename = basename + "loc.att.extra.j2b.row[" + std::to_string(j) + "]";
6679  add_name(rebasename, &target[i].loc.att.extra.j2b.row[j], "rvector");
6680  add_name(rebasename+".col", &target[i].loc.att.extra.j2b.row[j].col, "double[]");
6681  for(size_t k = 0; k < sizeof(target[i].loc.att.extra.j2b.row[j].col)/sizeof(target[i].loc.att.extra.j2b.row[j].col[0]); ++k) {
6682  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6683  add_name(rebasename2, &target[i].loc.att.extra.j2b.row[j].col[k], "double");
6684  }
6685  }
6686  add_name(basename+".loc.att.extra.b2j", &target[i].loc.att.extra.b2j, "rmatrix");
6687  add_name(basename+".loc.att.extra.b2j.row", &target[i].loc.att.extra.b2j.row, "rvector[]");
6688  for(size_t j = 0; j < sizeof(target[i].loc.att.extra.b2j.row)/sizeof(target[i].loc.att.extra.b2j.row[0]); ++j) {
6689  string rebasename = basename + "loc.att.extra.b2j.row[" + std::to_string(j) + "]";
6690  add_name(rebasename, &target[i].loc.att.extra.b2j.row[j], "rvector");
6691  add_name(rebasename+".col", &target[i].loc.att.extra.b2j.row[j].col, "double[]");
6692  for(size_t k = 0; k < sizeof(target[i].loc.att.extra.b2j.row[j].col)/sizeof(target[i].loc.att.extra.b2j.row[j].col[0]); ++k) {
6693  string rebasename2 = rebasename + ".col[" + std::to_string(k) + "]";
6694  add_name(rebasename2, &target[i].loc.att.extra.b2j.row[j].col[k], "double");
6695  }
6696  }
6697  }
6698 
6699 
6700  // vector<userstruc> user
6701  add_name("user", &user, "vector<userstruc>");
6702  for(size_t i = 0; i < user.capacity(); ++i) {
6703  string basename = "user[" + std::to_string(i) + "]";
6704  add_name(basename, &user[i], "userstruc");
6705  add_name(basename+".name", &user[i].name, "string");
6706  add_name(basename+".node", &user[i].node, "string");
6707  add_name(basename+".tool", &user[i].tool, "string");
6708  add_name(basename+".cpu", &user[i].cpu, "string");
6709  }
6710 
6711  // vector<tlestruc> tle
6712  add_name("tle", &tle, "vector<tlestruc>");
6713  for(size_t i = 0; i < tle.capacity(); ++i) {
6714  string basename = "tle[" + std::to_string(i) + "]";
6715  add_name(basename, &tle[i], "tlestruc");
6716  add_name(basename+".utc", &tle[i].utc, "double");
6717  add_name(basename+".name", &tle[i].name, "char[]");
6718  add_name(basename+".snumber", &tle[i].snumber, "uint16_t");
6719  add_name(basename+".id", &tle[i].id, "char[]");
6720  add_name(basename+".bstar", &tle[i].bstar, "double");
6721  add_name(basename+".i", &tle[i].i, "double");
6722  add_name(basename+".raan", &tle[i].raan, "double");
6723  add_name(basename+".e", &tle[i].e, "double");
6724  add_name(basename+".ap", &tle[i].ap, "double");
6725  add_name(basename+".ma", &tle[i].ma, "double");
6726  add_name(basename+".mm", &tle[i].mm, "double");
6727  add_name(basename+".orbit", &tle[i].orbit, "uint32_t");
6728  }
6729 
6730  // jsonnode json
6731  add_name("json", &json, "jsonnode");
6732  add_name("json.name", &json.name, "string");
6733  add_name("json.node", &json.node, "string");
6734  add_name("json.state", &json.state, "string");
6735  add_name("json.utcstart", &json.utcstart, "string");
6736  add_name("json.vertexs", &json.vertexs, "string");
6737  add_name("json.faces", &json.faces, "string");
6738  add_name("json.pieces", &json.pieces, "string");
6739  add_name("json.devgen", &json.devgen, "string");
6740  add_name("json.devspec", &json.devspec, "string");
6741  add_name("json.ports", &json.ports, "string");
6742  add_name("json.targets", &json.targets, "string");
6743 
6744 
6745  }
rvector bearth
Earth magnetic vector in ITRS for this time and location.
Definition: convertdef.h:754
double y
Y value.
Definition: vector.h:114
uint16_t disk_cnt
Definition: jsondef.h:3868
double dens
Definition: jsondef.h:4269
Vector moi
Definition: jsondef.h:3448
float area
Definition: jsondef.h:3429
uint16_t target_cnt
Definition: jsondef.h:3575
Vector fdrag
Definition: jsondef.h:3444
vector< portstruc > port
Vector of all ports known to node.
Definition: jsondef.h:4244
double timestamp
Timestamp for last change to data.
Definition: jsondef.h:4202
svector s
Position vector.
Definition: convertdef.h:318
uint16_t agent_cnt
Definition: jsondef.h:3573
vector< group > Groups
Definition: objlib.h:328
uint16_t imu_cnt
Definition: jsondef.h:3871
vector< facestruc > faces
Vector of all faces in node.
Definition: jsondef.h:4229
int16_t powmode
Definition: jsondef.h:3580
vector< tlestruc > tle
Array of Two Line Elements.
Definition: jsondef.h:4259
uint16_t device_cnt
Definition: jsondef.h:3571
void add_name(const string &s, void *v, string t)
Adds a name, memory location, and datatype to Namespace 2.0.
Definition: jsondef.h:4611
uint16_t jmapped
Whether JSON map has been created.
Definition: jsondef.h:4205
qatt geoc
Definition: convertdef.h:828
Definition: eci2kep_test.cpp:33
double orbit
Decimal Orbit number.
Definition: convertdef.h:756
cartpos sun2earth
Definition: convertdef.h:605
Vector com
Definition: jsondef.h:3449
rmatrix j2s
Definition: convertdef.h:598
Definition: eci2kep_test.cpp:33
uint16_t mcc_cnt
Definition: jsondef.h:3872
double utc
Definition: convertdef.h:261
double lambda
E/W in radians.
Definition: vector.h:172
uint16_t suchi_cnt
Definition: jsondef.h:3885
y
Definition: inputfile.py:6
Vector gtorque
Definition: jsondef.h:3440
Vector adrag
Definition: jsondef.h:3445
vector< Vector > vertices
Definition: jsondef.h:3451
spherpos geos
Definition: convertdef.h:743
rvector a
Acceleration.
Definition: convertdef.h:167
double utc
UTC of Position.
Definition: convertdef.h:161
uint16_t tsen_cnt
Definition: jsondef.h:3891
vector< material > Materials
Definition: objlib.h:324
Vector thrust
Definition: jsondef.h:3447
cartpos selc
Definition: convertdef.h:740
float battcap
Definition: jsondef.h:3430
rvector a
2nd derivative: Alpha - acceleration
Definition: convertdef.h:483
double mass
Support for Simulation (just for testing and integration)
Definition: jsondef.h:4268
string devspec
Definition: jsondef.h:734
cvector d
Orientation.
Definition: vector.h:405
uint16_t swch_cnt
Definition: jsondef.h:3886
uint32_t pass
pass indicator: allows synchronization with other attitude and position values.
Definition: convertdef.h:170
double pitch
Definition: jsondef.h:4296
string faces
Definition: jsondef.h:731
rmatrix dt2s
Definition: convertdef.h:604
uint16_t normal_cnt
Definition: jsondef.h:3568
uint16_t motr_cnt
Definition: jsondef.h:3873
uint16_t ssen_cnt
Definition: jsondef.h:3882
vector< vertexstruc > vertexs
Vector of all vertexs in node.
Definition: jsondef.h:4223
double roll
Definition: jsondef.h:4297
uint16_t event_cnt
Definition: jsondef.h:3574
float battlev
Definition: jsondef.h:3431
double t_way
Definition: jsondef.h:4290
rmatrix ddj2e
Definition: convertdef.h:592
string node
Definition: jsondef.h:727
uint16_t bcreg_cnt
Definition: jsondef.h:3878
string to_string(char *value)
Definition: stringlib.cpp:220
rmatrix ds2t
Definition: convertdef.h:602
double y
Definition: vector.h:713
vector< Vector > Vt
Definition: objlib.h:320
double y_acc
Definition: jsondef.h:4286
uint16_t piece_cnt
Definition: jsondef.h:3570
float range
Definition: jsondef.h:3588
cartpos geoc
Definition: convertdef.h:739
Vector ftorque
Definition: jsondef.h:3437
char lastevent[40+1]
Last event.
Definition: jsondef.h:3558
float moonsep
Separation between sun/satellite and sun/limbofmoon vectors in radians.
Definition: convertdef.h:748
double utc
Master time for location, in Modified Julian Day.
Definition: convertdef.h:879
double utc
Overall Node time.
Definition: jsondef.h:3592
uint16_t tcv_cnt
Definition: jsondef.h:3888
double t_vel
Definition: jsondef.h:4278
double x
X value.
Definition: vector.h:112
float earthsep
Separation between sun/satellite and sun/limbofearth vectors in radians.
Definition: convertdef.h:746
double tt
Terrestrial Time.
Definition: convertdef.h:584
double utc
Coordinated Universal Time.
Definition: convertdef.h:582
double z_way
Definition: jsondef.h:4293
cartpos sun2moon
Definition: convertdef.h:606
double mjddiff
Offset factor for simulated time (simtime = mjdaccel * realtime + mjddiff)
Definition: jsondef.h:3422
vector< vector< unitstruc > > unit
JSON Unit Map matrix: first level is for unit type, second level is for all variants (starting with p...
Definition: jsondef.h:4214
uint16_t psen_cnt
Definition: jsondef.h:3877
uint16_t pload_cnt
Definition: jsondef.h:3875
float sunradiance
Watts per square meter per steradian.
Definition: convertdef.h:752
qatt lvlh
Definition: convertdef.h:827
uint16_t closest
Definition: convertdef.h:607
vector< vertexstruc > normals
Vector of all vertexs in node.
Definition: jsondef.h:4226
rmatrix t2s
Definition: convertdef.h:603
rvector v
1st derivative: Omega - angular velocity
Definition: convertdef.h:481
double mjdaccel
Acceleration factor for simulated time.
Definition: jsondef.h:3420
vector< point > Points
Definition: objlib.h:325
uint16_t flags
Definition: jsondef.h:3579
vector< devicestruc > device
Vector of all general (common) information for devices (components) in node.
Definition: jsondef.h:4238
nodestruc node
Structure for summary information in node.
Definition: jsondef.h:4220
rmatrix s2j
Definition: convertdef.h:600
uint16_t prop_cnt
Definition: jsondef.h:3876
float temp
Definition: jsondef.h:3426
double utc
Definition: convertdef.h:477
double z
Definition: vector.h:714
vector< Vector > Vg
Definition: objlib.h:319
uint16_t telem_cnt
Definition: jsondef.h:3889
uint16_t port_cnt
Definition: jsondef.h:3572
geoidpos selg
Definition: convertdef.h:742
rvector s
Location.
Definition: convertdef.h:163
vector< equationstruc > equation
Vector of Equations.
Definition: jsondef.h:4217
float hcap
Definition: jsondef.h:3424
uint16_t txr_cnt
Definition: jsondef.h:3893
double z_pos
Definition: jsondef.h:4275
rmatrix de2j
Definition: convertdef.h:595
vector< face > Faces
Definition: objlib.h:327
uint16_t tnc_cnt
Definition: jsondef.h:3892
attstruc att
attstruc for this time.
Definition: convertdef.h:883
double x_vel
Definition: jsondef.h:4279
uint16_t pvstrg_cnt
Definition: jsondef.h:3883
Vector htorque
Definition: jsondef.h:3441
double utcoffset
MJD Offset between system UT and simulated UT.
Definition: jsondef.h:3590
uint16_t gps_cnt
Definition: jsondef.h:3869
uint32_t downtime
Seconds Node will be down.
Definition: jsondef.h:3582
uint16_t user_cnt
Definition: jsondef.h:3576
string pieces
Definition: jsondef.h:732
double phi
N/S in radians.
Definition: vector.h:170
double tdb
Dynamical Barycentric Time.
Definition: convertdef.h:588
gvector a
Acceleration vector.
Definition: convertdef.h:267
uint16_t batt_cnt
Definition: jsondef.h:3864
qatt selc
Definition: convertdef.h:829
double t_pos
Definition: jsondef.h:4272
Vector rtorque
Definition: jsondef.h:3439
double utc
Definition: convertdef.h:735
char name[40+1]
Node Name.
Definition: jsondef.h:3556
uint16_t state
Operational state.
Definition: jsondef.h:3564
uint16_t bus_cnt
Definition: jsondef.h:3865
uint16_t all_cnt
Definition: jsondef.h:3862
double utcstart
Mission start time.
Definition: jsondef.h:3594
qatt icrf
Definition: convertdef.h:830
Vector rdrag
Definition: jsondef.h:3446
double lasteventutc
Last event UTC.
Definition: jsondef.h:3560
string name
Definition: cubesat2obj.cpp:6
double x_acc
Definition: jsondef.h:4285
double x
Definition: vector.h:712
uint16_t tle_cnt
Definition: jsondef.h:3577
locstruc loc
Location structure.
Definition: jsondef.h:3596
rmatrix dde2j
Definition: convertdef.h:596
string targets
Definition: jsondef.h:736
double h
Height in meters.
Definition: vector.h:229
Vector ctorque
Definition: jsondef.h:3443
vector< userstruc > user
Single entry vector for user information.
Definition: jsondef.h:4256
extrapos extra
Definition: convertdef.h:744
vector< Vector > Vn
Definition: objlib.h:321
Vector atorque
Definition: jsondef.h:3438
int32_t stateflag
Definition: agent_data-2-0.cpp:78
x
Definition: inputfile.py:6
Vector hmomentum
Definition: jsondef.h:3442
uint16_t vertex_cnt
Definition: jsondef.h:3567
uint16_t cpu_cnt
Definition: jsondef.h:3867
double x_pos
Definition: jsondef.h:4273
uint16_t rw_cnt
Definition: jsondef.h:3880
double t_acc
Definition: jsondef.h:4284
double lon
Longitude in radians.
Definition: vector.h:227
double w
Rotation.
Definition: vector.h:407
gige_handle * handle
Definition: kpc9612p_recv.cpp:33
double load
Definition: devicecpu.h:255
rmatrix t2j
Definition: convertdef.h:599
float elto
Definition: jsondef.h:3587
string utcstart
Definition: jsondef.h:729
float powuse
Definition: jsondef.h:3433
double y_way
Definition: jsondef.h:4292
cartpos sci
Definition: convertdef.h:738
jsonnode json
JSON descriptive information.
Definition: jsondef.h:4262
string ports
Definition: jsondef.h:735
double x_way
Definition: jsondef.h:4291
posstruc pos
posstruc for this time.
Definition: convertdef.h:881
float heat
Definition: jsondef.h:3427
uint32_t pass
pass indicator: allows synchronization with other attitude and position values.
Definition: convertdef.h:485
double z
Z value.
Definition: vector.h:116
gvector s
Position vector.
Definition: convertdef.h:263
rmatrix j2b
Transform from ICRF to Body frame.
Definition: convertdef.h:694
double lat
Latitude in radians.
Definition: vector.h:225
Definition: eci2kep_test.cpp:33
string name
Definition: jsondef.h:726
double w
Definition: jsondef.h:4338
qatt topo
Definition: convertdef.h:826
float mass
Definition: jsondef.h:3425
double y_pos
Definition: jsondef.h:4274
float sunsize
Radius of sun in radians.
Definition: convertdef.h:750
vector< agentstruc > agent
Single entry vector for agent information.
Definition: jsondef.h:4247
string state
Definition: jsondef.h:728
uint16_t ant_cnt
Definition: jsondef.h:3863
quaternion s
0th derivative: Quaternion
Definition: convertdef.h:479
DeviceCpu cpu
Definition: agent_example.cpp:58
uint16_t face_cnt
Definition: jsondef.h:3569
vector< line > Lines
Definition: objlib.h:326
vector< piecestruc > pieces
Vector of all pieces in node.
Definition: jsondef.h:4232
uint16_t rxr_cnt
Definition: jsondef.h:3881
double col[3]
Definition: vector.h:55
double dt
Time step in seconds.
Definition: jsondef.h:3414
svector v
Velocity vector.
Definition: convertdef.h:320
extraatt extra
Definition: convertdef.h:831
cartpos eci
Definition: convertdef.h:737
double utc
Definition: convertdef.h:316
uint16_t rot_cnt
Definition: jsondef.h:3879
rmatrix b2j
Transform from Body frame to ICRF.
Definition: convertdef.h:696
rmatrix dj2e
Definition: convertdef.h:591
vector< eventstruc > event
Single entry vector for event information.
Definition: jsondef.h:4250
uint16_t thst_cnt
Definition: jsondef.h:3890
float azfrom
Alt/Az/Range info.
Definition: jsondef.h:3584
geoidpos geod
Definition: convertdef.h:741
double r
Radius in meters.
Definition: vector.h:174
devspecstruc devspec
Structure for devices (components) special data in node, by type.
Definition: jsondef.h:4241
vector< Vector > Vp
Definition: objlib.h:322
uint32_t pass
pass indicator: allows synchronization with other attitude and position values.
Definition: convertdef.h:269
int32_t mode
Definition: jsondef.h:3436
float azto
Definition: jsondef.h:3586
rmatrix e2j
Transform from Geocentric to ICRF.
Definition: convertdef.h:594
uint16_t tcu_cnt
Definition: jsondef.h:3887
string devgen
Definition: jsondef.h:733
svector a
Acceleration vector.
Definition: convertdef.h:322
vector< targetstruc > target
Vector of all targets known to node.
Definition: jsondef.h:4253
uint32_t pass
pass indicator: allows synchronization with other attitude and position values.
Definition: convertdef.h:324
double utc
Coordinated Universal Time.
Definition: convertdef.h:692
uint16_t type
Node Type as listed in NODE_TYPE.
Definition: jsondef.h:3562
cartpos icrf
Definition: convertdef.h:736
uint16_t mtr_cnt
Definition: jsondef.h:3874
uint16_t cam_cnt
Definition: jsondef.h:3866
rmatrix s2t
Definition: convertdef.h:601
double utc
Simulated starting time in MJD.
Definition: jsondef.h:3418
wavefront obj
Wavefront obj structure.
Definition: jsondef.h:4235
double utc
Definition: convertdef.h:825
double y_vel
Definition: jsondef.h:4280
double ut
UT0.
Definition: convertdef.h:586
rmatrix j2t
Definition: convertdef.h:597
gvector v
Velocity vector.
Definition: convertdef.h:265
double z_acc
Definition: jsondef.h:4287
rvector row[3]
Definition: matrix.h:43
double dtj
Time step in Julian days.
Definition: jsondef.h:3416
double w
Definition: vector.h:715
double i
Definition: jsondef.h:4334
physicsstruc phys
Definition: jsondef.h:3597
double yaw
Definition: jsondef.h:4298
rmatrix j2e
Transform from ICRF to Geocentric.
Definition: convertdef.h:590
double e
Definition: jsondef.h:4322
float elfrom
Definition: jsondef.h:3585
vector< trianglestruc > triangles
Definition: jsondef.h:3452
uint16_t htr_cnt
Definition: jsondef.h:3870
float powgen
Definition: jsondef.h:3432
rvector v
Velocity.
Definition: convertdef.h:165
Definition: eci2kep_test.cpp:33
uint16_t stt_cnt
Definition: jsondef.h:3884
string vertexs
Definition: jsondef.h:730
double z_vel
Definition: jsondef.h:4281
string cosmosstruc::get_name ( void *  v)
inline

Gets the name associated with the provided memory address in Namespace 2.0.

Searches through Namespace 2.0 and returns the first name associated with the provided memory address.

Parameters
vvoid pointer to memory address of an entry within Namespace 2.0 to search for
Returns
string name of memory address associated with v. Returns empty string if address is not found.
6753  {
6754  name_map::const_iterator it = names.begin();
6755  while(it->second != v && it != names.end()) { it++; }
6756  if(it == names.end()) { cerr<<"address <"<<v<<"> not found!"<<endl; return ""; }
6757  return it->first;
6758  }
name_map names
Definition: jsondef.h:4499
double v
Definition: jsondef.h:4366
string cosmosstruc::get_type ( const string &  s) const
inline

Gets the data type associated with the provided name in Namespace 2.0.

Finds the data type associated with the provided name in Namespace 2.0.

Parameters
sstring representing name to search for
Returns
string representing the data type associated with the provided name. Returns empty string if name is not found.
6766  {
6767  type_map::const_iterator it = types.find(s);
6768  if(it == types.end()) { /*cerr<<"type for <"<<s<<"> not found!"<<endl;*/ return ""; }
6769  return it->second;
6770  }
type_map types
Definition: jsondef.h:4500
template<class T >
T* cosmosstruc::get_pointer ( const string &  s) const
inline

Gets the pointer to the memory address associated with the provided name in Namespace 2.0.

Searches through Namespace 2.0 and returns a pointer to the associated memory address casted into the data type given to the template.

Parameters
sstring representing name to search for
Returns
type casted pointer to associated memory address. Returns nullptr if name is not found.
6779  {
6780  name_map::const_iterator it = names.find(s);
6781  if(it == names.end()) { cerr<<"name <"<<s<<"> not found!"<<endl; return nullptr; }
6782  return (T*)(it->second);
6783  }
double T
Definition: jsondef.h:4356
name_map names
Definition: jsondef.h:4499
template<class T >
T cosmosstruc::get_value ( const string &  s) const
inline

Gets the value of the data associated with the provided name in Namespace 2.0.

Searches through Namespace 2.0 and returns the value of the dereferenced pointer to the associated memory address.

Parameters
sstring representing name to search for
Returns
value of the data pointed to by the pointer of the associated name. Returns a new instance of type T if name is not found.
6792  {
6793  // change to static null object?
6794  T dummy = T();
6795  name_map::const_iterator it = names.find(s);
6796  if(it == names.end()) { cerr<<"name <"<<s<<"> not found!"<<endl; return dummy; }
6797  return *get_pointer<T>(s);
6798  }
double T
Definition: jsondef.h:4356
name_map names
Definition: jsondef.h:4499
template<class T >
void cosmosstruc::set_value ( const string &  s,
const T value 
) const
inline

Sets the value of the data associated with the provided name in Namespace 2.0.

Searches through Namespace 2.0 and sets the value of the data pointed to by the pointer to the memory address associated with the provided name.

Parameters
sstring representing name to search for
valuenew value to set the data to
Returns
n/a
6808  {
6809  // maybe if not found should be inserted?? hmmm.... ask Eric
6810  name_map::const_iterator it = names.find(s);
6811  if(it == names.end()) { cerr<<"name <"<<s<<"> not found!"<<endl; return; }
6812  *get_pointer<T>(s) = value;
6813  }
name_map names
Definition: jsondef.h:4499
void cosmosstruc::set_json ( const string &  json)
inline

Sets the data in Namespace 2.0 with a JSON-formatted string.

Searches through Namespace 2.0 and sets the value of the appropriate data by parsing the provided JSON-formatted string. The name used to search Namespace 2.0 is the key of the first entry in the JSON-formatted string.

Parameters
jsonJSON formatted string to set the data to
Returns
n/a
6822  {
6823  cout<<"\tJSON received = <"<<json<<">"<<endl;
6824  string error;
6825  vector<json11::Json> vp = json11::Json::parse_multi(json,error);
6826  cout<<"\tJSON error = <"<<error<<">"<<endl;
6827  for(size_t i = 0; i < vp.size(); ++i) {
6828  json11::Json p = vp[i];
6829 
6830  string name(p.object_items().begin()->first);
6831  cout<<"\tJSON name = <"<<name<<">"<<endl;
6832  if(error.empty()) {
6833  if(!p[name].is_null()) {
6834  if(name_exists(name)) {
6835  string type = get_type(name);
6836  // base data type
6837  if(type == "string") {
6838  set_value<string>(name, p[name].string_value());
6839  } else if(type == "double") {
6840  set_value<double>(name, p[name].number_value());
6841  } else if (type == "float") {
6842  set_value<float>(name, p[name].number_value());
6843  } else if (type == "int") {
6844  set_value<int>(name, p[name].int_value());
6845  } else if (type == "bool") {
6846  set_value<bool>(name, p[name].bool_value());
6847  } else if (type == "uint32_t") {
6848  set_value<uint32_t>(name, p[name].int_value());
6849  } else if (type == "int32_t") {
6850  set_value<int32_t>(name, p[name].int_value());
6851  } else if (type == "uint16_t") {
6852  set_value<uint16_t>(name, p[name].int_value());
6853  } else if (type == "int16_t") {
6854  set_value<int16_t>(name, p[name].int_value());
6855  } else if (type == "uint8_t") {
6856  set_value<uint8_t>(name, p[name].int_value());
6857  } else if (type == "int8_t") {
6858  set_value<int8_t>(name, p[name].int_value());
6859  } else if (type == "size_t") {
6860  set_value<size_t>(name, p[name].int_value());
6861 
6862  // user-defined types
6863  } else if (type == "agent_request_entry") {
6864  //get_pointer<agent_request_entry>(name)->from_json(json);
6865  } else if (type == "agentstruc") {
6866  get_pointer<agentstruc>(name)->from_json(json);
6867  } else if (type == "attstruc") {
6868  get_pointer<attstruc>(name)->from_json(json);
6869  } else if (type == "beatstruc") {
6870  get_pointer<beatstruc>(name)->from_json(json);
6871  } else if (type == "cartpos") {
6872  get_pointer<cartpos>(name)->from_json(json);
6873  } else if (type == "cosmosstruc") {
6874  get_pointer<cosmosstruc>(name)->from_json(json);
6875  } else if (type == "cvector") {
6876  get_pointer<cvector>(name)->from_json(json);
6877  } else if (type == "devicestruc") {
6878  get_pointer<devicestruc>(name)->from_json(json);
6879  } else if (type == "devspecstruc") {
6880  get_pointer<devspecstruc>(name)->from_json(json);
6881  } else if (type == "equationstruc") {
6882  get_pointer<equationstruc>(name)->from_json(json);
6883  } else if (type == "eventstruc") {
6884  get_pointer<eventstruc>(name)->from_json(json);
6885  } else if (type == "extraatt") {
6886  get_pointer<extraatt>(name)->from_json(json);
6887  } else if (type == "extrapos") {
6888  get_pointer<extrapos>(name)->from_json(json);
6889  } else if (type == "face") {
6890  get_pointer<Cosmos::wavefront::face>(name)->from_json(json);
6891  } else if (type == "facestruc") {
6892  get_pointer<facestruc>(name)->from_json(json);
6893  } else if (type == "geoidpos") {
6894  get_pointer<geoidpos>(name)->from_json(json);
6895  } else if (type == "group") {
6896  get_pointer<Cosmos::wavefront::group>(name)->from_json(json);
6897  } else if (type == "gvector") {
6898  get_pointer<gvector>(name)->from_json(json);
6899  } else if (type == "jsonhandle") {
6900  get_pointer<jsonhandle>(name)->from_json(json);
6901  } else if (type == "jsonnode") {
6902  get_pointer<jsonnode>(name)->from_json(json);
6903  } else if (type == "line") {
6904  get_pointer<Cosmos::wavefront::line>(name)->from_json(json);
6905  } else if (type == "locstruc") {
6906  get_pointer<locstruc>(name)->from_json(json);
6907  } else if (type == "material") {
6908  get_pointer<Cosmos::wavefront::material>(name)->from_json(json);
6909  } else if (type == "NetworkType") {
6910  //get_pointer<NetworkType>(name)->from_json(json);
6911  } else if (type == "nodestruc") {
6912  get_pointer<nodestruc>(name)->from_json(json);
6913  } else if (type == "physicsstruc") {
6914  get_pointer<physicsstruc>(name)->from_json(json);
6915  } else if (type == "piecestruc") {
6916  get_pointer<piecestruc>(name)->from_json(json);
6917  } else if (type == "point") {
6918  get_pointer<Cosmos::wavefront::point>(name)->from_json(json);
6919  } else if (type == "portstruc") {
6920  get_pointer<portstruc>(name)->from_json(json);
6921  } else if (type == "PORT_TYPE") {
6922  set_value<PORT_TYPE>(name, static_cast<PORT_TYPE>(p[name].int_value()));
6923  } else if (type == "posstruc") {
6924  get_pointer<posstruc>(name)->from_json(json);
6925  } else if (type == "qatt") {
6926  get_pointer<qatt>(name)->from_json(json);
6927  } else if (type == "quaternion") {
6928  get_pointer<quaternion>(name)->from_json(json);
6929  } else if (type == "rmatrix") {
6930  get_pointer<rmatrix>(name)->from_json(json);
6931  } else if (type == "rvector") {
6932  get_pointer<rvector>(name)->from_json(json);
6933  } else if (type == "socket_channel") {
6934  //get_pointer<socket_channel>(name)->from_json(json);
6935  } else if (type == "spherpos") {
6936  get_pointer<spherpos>(name)->from_json(json);
6937  } else if (type == "svector") {
6938  get_pointer<svector>(name)->from_json(json);
6939  } else if (type == "targetstruc") {
6940  get_pointer<targetstruc>(name)->from_json(json);
6941  } else if (type == "tlestruc") {
6942  get_pointer<tlestruc>(name)->from_json(json);
6943  } else if (type == "trianglestruc") {
6944  get_pointer<trianglestruc>(name)->from_json(json);
6945  } else if (type == "unitstruc") {
6946  get_pointer<unitstruc>(name)->from_json(json);
6947  } else if (type == "userstruc") {
6948  get_pointer<userstruc>(name)->from_json(json);
6949  } else if (type == "Vector") {
6950  get_pointer<Vector>(name)->from_json(json);
6951  } else if (type == "vertexstruc") {
6952  get_pointer<vertexstruc>(name)->from_json(json);
6953  } else if (type == "wavefront") {
6954  get_pointer<wavefront>(name)->from_json(json);
6955 
6956  // vector of base types
6957  } else if (type == "vector<uint32_t>") {
6958  for(size_t i = 0; i < get_pointer<vector<uint32_t>>(name)->size(); ++i) {
6959  if(!p[name][i].is_null()) {
6960  get_pointer<vector<uint32_t>>(name)->at(i) = p[name][i].int_value();
6961  }
6962  }
6963  } else if (type == "vector<vector<uint32_t>>") {
6964  for(size_t i = 0; i < get_pointer<vector<vector<uint32_t>>>(name)->size(); ++i) {
6965  for(size_t j = 0; j < get_pointer<vector<vector<uint32_t>>>(name)->at(i).size(); ++j) {
6966  if(!p[name][i][j].is_null()) {
6967  get_pointer<vector<vector<uint32_t>>>(name)->at(i).at(j) = p[name][i][j].int_value();
6968  }
6969  }
6970  }
6971  } else if (type == "vector<int32_t>") {
6972  for(size_t i = 0; i < get_pointer<vector<int32_t>>(name)->size(); ++i) {
6973  if(!p[name][i].is_null()) {
6974  get_pointer<vector<int32_t>>(name)->at(i) = p[name][i].int_value();
6975  }
6976  }
6977  } else if (type == "vector<vector<int32_t>>") {
6978  for(size_t i = 0; i < get_pointer<vector<vector<int32_t>>>(name)->size(); ++i) {
6979  for(size_t j = 0; j < get_pointer<vector<vector<int32_t>>>(name)->at(i).size(); ++j) {
6980  if(!p[name][i][j].is_null()) {
6981  get_pointer<vector<vector<int32_t>>>(name)->at(i).at(j) = p[name][i][j].int_value();
6982  }
6983  }
6984  }
6985  } else if (type == "vector<uint16_t>") {
6986  for(size_t i = 0; i < get_pointer<vector<uint16_t>>(name)->size(); ++i) {
6987  if(!p[name][i].is_null()) {
6988  get_pointer<vector<uint16_t>>(name)->at(i) = p[name][i].int_value();
6989  }
6990  }
6991  } else if (type == "vector<vector<uint16_t>>") {
6992  for(size_t i = 0; i < get_pointer<vector<vector<uint16_t>>>(name)->size(); ++i) {
6993  for(size_t j = 0; j < get_pointer<vector<vector<uint16_t>>>(name)->at(i).size(); ++j) {
6994  if(!p[name][i][j].is_null()) {
6995  get_pointer<vector<vector<uint16_t>>>(name)->at(i).at(j) = p[name][i][j].int_value();
6996  }
6997  }
6998  }
6999  } else if (type == "vector<int16_t>") {
7000  for(size_t i = 0; i < get_pointer<vector<int16_t>>(name)->size(); ++i) {
7001  if(!p[name][i].is_null()) {
7002  get_pointer<vector<int16_t>>(name)->at(i) = p[name][i].int_value();
7003  }
7004  }
7005  } else if (type == "vector<vector<int16_t>>") {
7006  for(size_t i = 0; i < get_pointer<vector<vector<int16_t>>>(name)->size(); ++i) {
7007  for(size_t j = 0; j < get_pointer<vector<vector<int16_t>>>(name)->at(i).size(); ++j) {
7008  if(!p[name][i][j].is_null()) {
7009  get_pointer<vector<vector<int16_t>>>(name)->at(i).at(j) = p[name][i][j].int_value();
7010  }
7011  }
7012  }
7013  } else if (type == "vector<uint8_t>") {
7014  for(size_t i = 0; i < get_pointer<vector<uint8_t>>(name)->size(); ++i) {
7015  if(!p[name][i].is_null()) {
7016  get_pointer<vector<uint8_t>>(name)->at(i) = p[name][i].int_value();
7017  }
7018  }
7019  } else if (type == "vector<vector<uint8_t>>") {
7020  for(size_t i = 0; i < get_pointer<vector<vector<uint8_t>>>(name)->size(); ++i) {
7021  for(size_t j = 0; j < get_pointer<vector<vector<uint8_t>>>(name)->at(i).size(); ++j) {
7022  if(!p[name][i][j].is_null()) {
7023  get_pointer<vector<vector<uint8_t>>>(name)->at(i).at(j) = p[name][i][j].int_value();
7024  }
7025  }
7026  }
7027  } else if (type == "vector<int8_t>") {
7028  for(size_t i = 0; i < get_pointer<vector<int8_t>>(name)->size(); ++i) {
7029  if(!p[name][i].is_null()) {
7030  get_pointer<vector<int8_t>>(name)->at(i) = p[name][i].int_value();
7031  }
7032  }
7033  } else if (type == "vector<vector<int8_t>>") {
7034  for(size_t i = 0; i < get_pointer<vector<vector<int8_t>>>(name)->size(); ++i) {
7035  for(size_t j = 0; j < get_pointer<vector<vector<int8_t>>>(name)->at(i).size(); ++j) {
7036  if(!p[name][i][j].is_null()) {
7037  get_pointer<vector<vector<int8_t>>>(name)->at(i).at(j) = p[name][i][j].int_value();
7038  }
7039  }
7040  }
7041  } else if (type == "vector<int>") {
7042  for(size_t i = 0; i < get_pointer<vector<int>>(name)->size(); ++i) {
7043  if(!p[name][i].is_null()) {
7044  get_pointer<vector<int>>(name)->at(i) = p[name][i].int_value();
7045  }
7046  }
7047  } else if (type == "vector<vector<int>>") {
7048  for(size_t i = 0; i < get_pointer<vector<vector<int>>>(name)->size(); ++i) {
7049  for(size_t j = 0; j < get_pointer<vector<vector<int>>>(name)->at(i).size(); ++j) {
7050  if(!p[name][i][j].is_null()) {
7051  get_pointer<vector<vector<int>>>(name)->at(i).at(j) = p[name][i][j].int_value();
7052  }
7053  }
7054  }
7055  } else if (type == "vector<size_t>") {
7056  for(size_t i = 0; i < get_pointer<vector<size_t>>(name)->size(); ++i) {
7057  if(!p[name][i].is_null()) {
7058  get_pointer<vector<size_t>>(name)->at(i) = p[name][i].int_value();
7059  }
7060  }
7061  } else if (type == "vector<vector<size_t>>") {
7062  for(size_t i = 0; i < get_pointer<vector<vector<size_t>>>(name)->size(); ++i) {
7063  for(size_t j = 0; j < get_pointer<vector<vector<size_t>>>(name)->at(i).size(); ++j) {
7064  if(!p[name][i][j].is_null()) {
7065  get_pointer<vector<vector<size_t>>>(name)->at(i).at(j) = p[name][i][j].int_value();
7066  }
7067  }
7068  }
7069  } else if (type == "vector<bool>") {
7070  for(size_t i = 0; i < get_pointer<vector<bool>>(name)->size(); ++i) {
7071  if(!p[name][i].is_null()) {
7072  get_pointer<vector<bool>>(name)->at(i) = p[name][i].bool_value();
7073  }
7074  }
7075  } else if (type == "vector<vector<bool>>") {
7076  for(size_t i = 0; i < get_pointer<vector<vector<bool>>>(name)->size(); ++i) {
7077  for(size_t j = 0; j < get_pointer<vector<vector<bool>>>(name)->at(i).size(); ++j) {
7078  if(!p[name][i][j].is_null()) {
7079  get_pointer<vector<vector<bool>>>(name)->at(i).at(j) = p[name][i][j].bool_value();
7080  }
7081  }
7082  }
7083  } else if (type == "vector<string>") {
7084  for(size_t i = 0; i < get_pointer<vector<string>>(name)->size(); ++i) {
7085  if(!p[name][i].is_null()) {
7086  get_pointer<vector<string>>(name)->at(i) = p[name][i].string_value();
7087  }
7088  }
7089  } else if (type == "vector<vector<string>>") {
7090  for(size_t i = 0; i < get_pointer<vector<vector<string>>>(name)->size(); ++i) {
7091  for(size_t j = 0; j < get_pointer<vector<vector<string>>>(name)->at(i).size(); ++j) {
7092  if(!p[name][i][j].is_null()) {
7093  get_pointer<vector<vector<string>>>(name)->at(i).at(j) = p[name][i][j].string_value();
7094  }
7095  }
7096  }
7097  } else if (type == "vector<float>") {
7098  for(size_t i = 0; i < get_pointer<vector<float>>(name)->size(); ++i) {
7099  if(!p[name][i].is_null()) {
7100  get_pointer<vector<float>>(name)->at(i) = p[name][i].number_value();
7101  }
7102  }
7103  } else if (type == "vector<vector<float>>") {
7104  for(size_t i = 0; i < get_pointer<vector<vector<float>>>(name)->size(); ++i) {
7105  for(size_t j = 0; j < get_pointer<vector<vector<float>>>(name)->at(i).size(); ++j) {
7106  if(!p[name][i][j].is_null()) {
7107  get_pointer<vector<vector<float>>>(name)->at(i).at(j) = p[name][i][j].number_value();
7108  }
7109  }
7110  }
7111  } else if (type == "vector<double>") {
7112  for(size_t i = 0; i < get_pointer<vector<double>>(name)->size(); ++i) {
7113  if(!p[name][i].is_null()) {
7114  get_pointer<vector<double>>(name)->at(i) = p[name][i].number_value();
7115  }
7116  }
7117  } else if (type == "vector<vector<double>>") {
7118  for(size_t i = 0; i < get_pointer<vector<vector<double>>>(name)->size(); ++i) {
7119  for(size_t j = 0; j < get_pointer<vector<vector<double>>>(name)->at(i).size(); ++j) {
7120  if(!p[name][i][j].is_null()) {
7121  get_pointer<vector<vector<double>>>(name)->at(i).at(j) = p[name][i][j].number_value();
7122  }
7123  }
7124  }
7125 
7126  // vector of user-defined types
7127  //} else if (type == "vector<agent_request_entry>") {
7128  // for(size_t i = 0; i < get_pointer<vector<agent_request_entry>>(name)->size(); ++i) {
7129  // if(!p[name][i].is_null()) {
7130  // get_pointer<vector<agent_request_entry>>(name)->at(i).from_json(p[name][i].dump());
7131  // }
7132  // }
7133  } else if (type == "vector<agentstruc>") {
7134  for(size_t i = 0; i < get_pointer<vector<agentstruc>>(name)->size(); ++i) {
7135  if(!p[name][i].is_null()) {
7136  get_pointer<vector<agentstruc>>(name)->at(i).from_json(p[name][i].dump());
7137  }
7138  }
7139  } else if (type == "vector<devicestruc>") {
7140  for(size_t i = 0; i < get_pointer<vector<devicestruc>>(name)->size(); ++i) {
7141  if(!p[name][i].is_null()) {
7142  get_pointer<vector<devicestruc>>(name)->at(i).from_json(p[name][i].dump());
7143  }
7144  }
7145  } else if (type == "vector<equationstruc>") {
7146  for(size_t i = 0; i < get_pointer<vector<equationstruc>>(name)->size(); ++i) {
7147  if(!p[name][i].is_null()) {
7148  get_pointer<vector<equationstruc>>(name)->at(i).from_json(p[name][i].dump());
7149  }
7150  }
7151  } else if (type == "vector<eventstruc>") {
7152  for(size_t i = 0; i < get_pointer<vector<eventstruc>>(name)->size(); ++i) {
7153  if(!p[name][i].is_null()) {
7154  get_pointer<vector<eventstruc>>(name)->at(i).from_json(p[name][i].dump());
7155  }
7156  }
7157  } else if (type == "vector<face>") {
7158  for(size_t i = 0; i < get_pointer<vector<Cosmos::wavefront::face>>(name)->size(); ++i) {
7159  if(!p[name][i].is_null()) {
7160  get_pointer<vector<Cosmos::wavefront::face>>(name)->at(i).from_json(p[name][i].dump());
7161  }
7162  }
7163  } else if (type == "vector<facestruc>") {
7164  for(size_t i = 0; i < get_pointer<vector<facestruc>>(name)->size(); ++i) {
7165  if(!p[name][i].is_null()) {
7166  get_pointer<vector<facestruc>>(name)->at(i).from_json(p[name][i].dump());
7167  }
7168  }
7169  } else if (type == "vector<group>") {
7170  for(size_t i = 0; i < get_pointer<vector<Cosmos::wavefront::group>>(name)->size(); ++i) {
7171  if(!p[name][i].is_null()) {
7172  get_pointer<vector<Cosmos::wavefront::group>>(name)->at(i).from_json(p[name][i].dump());
7173  }
7174  }
7175  } else if (type == "vector<line>") {
7176  for(size_t i = 0; i < get_pointer<vector<Cosmos::wavefront::line>>(name)->size(); ++i) {
7177  if(!p[name][i].is_null()) {
7178  get_pointer<vector<Cosmos::wavefront::line>>(name)->at(i).from_json(p[name][i].dump());
7179  }
7180  }
7181  } else if (type == "vector<material>") {
7182  for(size_t i = 0; i < get_pointer<vector<Cosmos::wavefront::material>>(name)->size(); ++i) {
7183  if(!p[name][i].is_null()) {
7184  get_pointer<vector<Cosmos::wavefront::material>>(name)->at(i).from_json(p[name][i].dump());
7185  }
7186  }
7187  } else if (type == "vector<piecestruc>") {
7188  for(size_t i = 0; i < get_pointer<vector<piecestruc>>(name)->size(); ++i) {
7189  if(!p[name][i].is_null()) {
7190  get_pointer<vector<piecestruc>>(name)->at(i).from_json(p[name][i].dump());
7191  }
7192  }
7193  } else if (type == "vector<point>") {
7194  for(size_t i = 0; i < get_pointer<vector<Cosmos::wavefront::point>>(name)->size(); ++i) {
7195  if(!p[name][i].is_null()) {
7196  get_pointer<vector<Cosmos::wavefront::point>>(name)->at(i).from_json(p[name][i].dump());
7197  }
7198  }
7199  } else if (type == "vector<portstruc>") {
7200  for(size_t i = 0; i < get_pointer<vector<portstruc>>(name)->size(); ++i) {
7201  if(!p[name][i].is_null()) {
7202  get_pointer<vector<portstruc>>(name)->at(i).from_json(p[name][i].dump());
7203  }
7204  }
7205  } else if (type == "vector<targetstruc>") {
7206  for(size_t i = 0; i < get_pointer<vector<targetstruc>>(name)->size(); ++i) {
7207  if(!p[name][i].is_null()) {
7208  get_pointer<vector<targetstruc>>(name)->at(i).from_json(p[name][i].dump());
7209  }
7210  }
7211  } else if (type == "vector<tlestruc>") {
7212  for(size_t i = 0; i < get_pointer<vector<tlestruc>>(name)->size(); ++i) {
7213  if(!p[name][i].is_null()) {
7214  get_pointer<vector<tlestruc>>(name)->at(i).from_json(p[name][i].dump());
7215  }
7216  }
7217  } else if (type == "vector<trianglestruc>") {
7218  for(size_t i = 0; i < get_pointer<vector<trianglestruc>>(name)->size(); ++i) {
7219  if(!p[name][i].is_null()) {
7220  get_pointer<vector<trianglestruc>>(name)->at(i).from_json(p[name][i].dump());
7221  }
7222  }
7223  } else if (type == "vector<unitstruc>") {
7224  for(size_t i = 0; i < get_pointer<vector<unitstruc>>(name)->size(); ++i) {
7225  if(!p[name][i].is_null()) {
7226  get_pointer<vector<unitstruc>>(name)->at(i).from_json(p[name][i].dump());
7227  }
7228  }
7229  } else if (type == "vector<userstruc>") {
7230  for(size_t i = 0; i < get_pointer<vector<userstruc>>(name)->size(); ++i) {
7231  if(!p[name][i].is_null()) {
7232  get_pointer<vector<userstruc>>(name)->at(i).from_json(p[name][i].dump());
7233  }
7234  }
7235  } else if (type == "vector<Vector>") {
7236  for(size_t i = 0; i < get_pointer<vector<Vector>>(name)->size(); ++i) {
7237  if(!p[name][i].is_null()) {
7238  get_pointer<vector<Vector>>(name)->at(i).from_json(p[name][i].dump());
7239  }
7240  }
7241  } else if (type == "vector<unitstruc>") {
7242  for(size_t i = 0; i < get_pointer<vector<unitstruc>>(name)->size(); ++i) {
7243  if(!p[name][i].is_null()) {
7244  get_pointer<vector<unitstruc>>(name)->at(i).from_json(p[name][i].dump());
7245  }
7246  }
7247  } else if (type == "vector<vector<unitstruc>>") {
7248  for(size_t i = 0; i < get_pointer<vector<vector<unitstruc>>>(name)->size(); ++i) {
7249  for(size_t j = 0; j < get_pointer<vector<vector<unitstruc>>>(name)->at(i).size(); ++j) {
7250  if(!p[name][i][j].is_null()) {
7251  get_pointer<vector<vector<unitstruc>>>(name)->at(i).at(j).from_json(p[name][i][j].dump());
7252  }
7253  }
7254  }
7255  } else if (type == "vector<vertexstruc>") {
7256  for(size_t i = 0; i < get_pointer<vector<vertexstruc>>(name)->size(); ++i) {
7257  if(!p[name][i].is_null()) {
7258  get_pointer<vector<vertexstruc>>(name)->at(i).from_json(p[name][i].dump());
7259  }
7260  }
7261  } else {
7262  // I guess this block means the type is not supported!
7263  // could re-add templated version of set_json so user
7264  // can explicitly call for given unsupported datatype
7265  //get_pointer<T>(name)->from_json(json);
7266  return;
7267  }
7268  }
7269  }
7270  }
7271  }// end for loop
7272  }
string get_type(const string &s) const
Gets the data type associated with the provided name in Namespace 2.0.
Definition: jsondef.h:6766
Definition: json11.hpp:79
PORT_TYPE
Definition: jsondef.h:644
bool name_exists(const string &s)
Checks if provided name exists within Namespace 2.0.
Definition: jsondef.h:4508
static double * p
Definition: gauss_jackson_test.cpp:42
static void dump(NullStruct, string &out)
Definition: json11.cpp:53
const std::string & string_value() const
Definition: json11.cpp:283
bool bool_value() const
Definition: json11.cpp:282
string name
Definition: cubesat2obj.cpp:6
jsonnode json
JSON descriptive information.
Definition: jsondef.h:4262
static std::vector< Json > parse_multi(const std::string &in, std::string::size_type &parser_stop_pos, std::string &err, JsonParse strategy=JsonParse::STANDARD)
size_t size()
Returns the length of the map used to represent Namespace 2.0.
Definition: jsondef.h:4514
void from_json(const string &s)
Set class contents from JSON string.
Definition: jsondef.h:7635
double i
Definition: jsondef.h:4334
int int_value() const
Definition: json11.cpp:281
double number_value() const
Definition: json11.cpp:280
const object & object_items() const
Definition: json11.cpp:285
template<class T >
string cosmosstruc::get_json ( const string &  s)
inline

Gets a JSON-formatted string of the data associated with the provided name in Namespace 2.0.

Searches through Namespace 2.0 and gets the JSON-formatted string of the data pointed to by the pointer to the memory address associated with the provided name.

Parameters
sstring representing name to search for
Returns
JSON-formatted string of data. Returns empty string if name is not found.
7281  {
7282  if(name_exists(s)) {
7283  json11::Json json = json11::Json::object { { s, this->get_value<T>(s) } };
7284  return json.dump();
7285  } else {
7286  return "";
7287  }
7288  }
std::map< std::string, Json > object
Definition: json11.hpp:88
Definition: json11.hpp:79
bool name_exists(const string &s)
Checks if provided name exists within Namespace 2.0.
Definition: jsondef.h:4508
void dump(std::string &out) const
jsonnode json
JSON descriptive information.
Definition: jsondef.h:4262
string cosmosstruc::get_json ( const string &  s)
inline

Gets a JSON-formatted string of the data associated with the provided name in Namespace 2.0. (Non-template version)

Searches through Namespace 2.0 and gets the JSON-formatted string of the data pointed to by the pointer to the memory address associated with the provided name.

Parameters
sstring representing name to search for
Returns
JSON-formatted string of data. Returns empty string if name is not found.
7297  {
7298  if(name_exists(s)) {
7300  string type = get_type(s);
7301  // base data types
7302  if (type == "uint32_t") {
7303  json = json11::Json::object { { s, get_value<int>(s) } };
7304  } else if (type == "int32_t") {
7305  json = json11::Json::object { { s, get_value<int32_t>(s) } };
7306  } else if (type == "uint16_t") {
7307  json = json11::Json::object { { s, get_value<uint16_t>(s) } };
7308  } else if (type == "int16_t") {
7309  json = json11::Json::object { { s, get_value<int16_t>(s) } };
7310  } else if (type == "uint8_t") {
7311  json = json11::Json::object { { s, get_value<uint8_t>(s) } };
7312  } else if (type == "int8_t") {
7313  json = json11::Json::object { { s, get_value<int8_t>(s) } };
7314  } else if (type == "int") {
7315  json = json11::Json::object { { s, get_value<int>(s) } };
7316  } else if (type == "size_t") {
7317  json = json11::Json::object { { s, get_value<int>(s) } };
7318  } else if (type == "bool") {
7319  json = json11::Json::object { { s, get_value<bool>(s) } };
7320  } else if (type == "string") {
7321  json = json11::Json::object { { s, get_value<string>(s) } };
7322  } else if (type == "float") {
7323  json = json11::Json::object { { s, get_value<float>(s) } };
7324  } else if (type == "double") {
7325  json = json11::Json::object { { s, get_value<double>(s) } };
7326 
7327  // user-defined types
7328  } else if (type == "agent_request_entry") {
7329  // json = json11::Json::object { { s, get_value<agent_request_entry>(s) } };
7330  } else if (type == "agentstruc") {
7331  json = json11::Json::object { { s, get_value<agentstruc>(s) } };
7332  } else if (type == "attstruc") {
7333  json = json11::Json::object { { s, get_value<attstruc>(s) } };
7334  } else if (type == "beatstruc") {
7335  json = json11::Json::object { { s, get_value<beatstruc>(s) } };
7336  } else if (type == "cartpos") {
7337  json = json11::Json::object { { s, get_value<cartpos>(s) } };
7338  } else if (type == "cosmosstruc") {
7339  json = json11::Json::object { { s, get_value<cosmosstruc>(s) } };
7340  } else if (type == "cvector") {
7341  json = json11::Json::object { { s, get_value<cvector>(s) } };
7342  } else if (type == "devicestruc") {
7343  json = json11::Json::object { { s, get_value<devicestruc>(s) } };
7344  } else if (type == "devspecstruc") {
7345  json = json11::Json::object { { s, get_value<devspecstruc>(s) } };
7346  } else if (type == "equationstruc") {
7347  json = json11::Json::object { { s, get_value<equationstruc>(s) } };
7348  } else if (type == "eventstruc") {
7349  json = json11::Json::object { { s, get_value<eventstruc>(s) } };
7350  } else if (type == "extraatt") {
7351  json = json11::Json::object { { s, get_value<extraatt>(s) } };
7352  } else if (type == "extrapos") {
7353  json = json11::Json::object { { s, get_value<extrapos>(s) } };
7354  } else if (type == "face") {
7355  json = json11::Json::object { { s, get_value<Cosmos::wavefront::face>(s) } };
7356  } else if (type == "facestruc") {
7357  json = json11::Json::object { { s, get_value<facestruc>(s) } };
7358  } else if (type == "geoidpos") {
7359  json = json11::Json::object { { s, get_value<geoidpos>(s) } };
7360  } else if (type == "group") {
7361  json = json11::Json::object { { s, get_value<Cosmos::wavefront::group>(s) } };
7362  } else if (type == "gvector") {
7363  json = json11::Json::object { { s, get_value<gvector>(s) } };
7364  } else if (type == "line") {
7365  json = json11::Json::object { { s, get_value<Cosmos::wavefront::line>(s) } };
7366  } else if (type == "jsonhandle") {
7367  json = json11::Json::object { { s, get_value<jsonhandle>(s) } };
7368  } else if (type == "jsonnode") {
7369  json = json11::Json::object { { s, get_value<jsonnode>(s) } };
7370  } else if (type == "locstruc") {
7371  json = json11::Json::object { { s, get_value<locstruc>(s) } };
7372  } else if (type == "material") {
7373  json = json11::Json::object { { s, get_value<Cosmos::wavefront::material>(s) } };
7374  } else if (type == "NetworkType") {
7375  // json = json11::Json::object { { s, get_value<NetworkType>(s) } };
7376  } else if (type == "nodestruc") {
7377  json = json11::Json::object { { s, get_value<nodestruc>(s) } };
7378  } else if (type == "piecestruc") {
7379  json = json11::Json::object { { s, get_value<piecestruc>(s) } };
7380  } else if (type == "physicsstruc") {
7381  json = json11::Json::object { { s, get_value<physicsstruc>(s) } };
7382  } else if (type == "point") {
7383  json = json11::Json::object { { s, get_value<Cosmos::wavefront::point>(s) } };
7384  } else if (type == "portstruc") {
7385  json = json11::Json::object { { s, get_value<portstruc>(s) } };
7386  } else if (type == "PORT_TYPE") {
7387  json = json11::Json::object { { s, get_value<PORT_TYPE>(s) } };
7388  } else if (type == "posstruc") {
7389  json = json11::Json::object { { s, get_value<posstruc>(s) } };
7390  } else if (type == "qatt") {
7391  json = json11::Json::object { { s, get_value<qatt>(s) } };
7392  } else if (type == "quaternion") {
7393  json = json11::Json::object { { s, get_value<quaternion>(s) } };
7394  } else if (type == "rmatrix") {
7395  json = json11::Json::object { { s, get_value<rmatrix>(s) } };
7396  } else if (type == "rvector") {
7397  json = json11::Json::object { { s, get_value<rvector>(s) } };
7398  } else if (type == "rvector[]") {
7399  // json = json11::Json::object { { s, get_value<rvector[]>(s) } };
7400  } else if (type == "socket_channel") {
7401  // json = json11::Json::object { { s, get_value<socket_channel>(s) } };
7402  } else if (type == "socket_channel[]") {
7403  // json = json11::Json::object { { s, get_value<socket_channel[]>(s) } };
7404  } else if (type == "spherpos") {
7405  json = json11::Json::object { { s, get_value<spherpos>(s) } };
7406  } else if (type == "svector") {
7407  json = json11::Json::object { { s, get_value<svector>(s) } };
7408  } else if (type == "targetstruc") {
7409  json = json11::Json::object { { s, get_value<targetstruc>(s) } };
7410  } else if (type == "tlestruc") {
7411  json = json11::Json::object { { s, get_value<tlestruc>(s) } };
7412  } else if (type == "trianglestruc") {
7413  json = json11::Json::object { { s, get_value<trianglestruc>(s) } };
7414  } else if (type == "unitstruc") {
7415  json = json11::Json::object { { s, get_value<unitstruc>(s) } };
7416  } else if (type == "userstruc") {
7417  json = json11::Json::object { { s, get_value<userstruc>(s) } };
7418  } else if (type == "Vector") {
7419  json = json11::Json::object { { s, get_value<Vector>(s) } };
7420  } else if (type == "vertexstruc") {
7421  json = json11::Json::object { { s, get_value<vertexstruc>(s) } };
7422  } else if (type == "wavefront") {
7423  json = json11::Json::object { { s, get_value<wavefront>(s) } };
7424 
7425  // vector of primitives
7426  } else if (type == "vector<uint32_t>") {
7427  json = json11::Json::object { { s, get_value<vector<int>>(s) } };
7428  } else if (type == "vector<vector<uint32_t>>") {
7429  json = json11::Json::object { { s, get_value<vector<vector<int>>>(s) } };
7430  } else if (type == "vector<int32_t>") {
7431  json = json11::Json::object { { s, get_value<vector<int32_t>>(s) } };
7432  } else if (type == "vector<vector<int32_t>>") {
7433  json = json11::Json::object { { s, get_value<vector<vector<int32_t>>>(s) } };
7434  } else if (type == "vector<uint16_t>") {
7435  json = json11::Json::object { { s, get_value<vector<uint16_t>>(s) } };
7436  } else if (type == "vector<vector<uint16_t>>") {
7437  json = json11::Json::object { { s, get_value<vector<vector<uint16_t>>>(s) } };
7438  } else if (type == "vector<int16_t>") {
7439  json = json11::Json::object { { s, get_value<vector<int16_t>>(s) } };
7440  } else if (type == "vector<vector<int16_t>>") {
7441  json = json11::Json::object { { s, get_value<vector<vector<int16_t>>>(s) } };
7442  } else if (type == "vector<uint8_t>") {
7443  json = json11::Json::object { { s, get_value<vector<uint8_t>>(s) } };
7444  } else if (type == "vector<vector<uint8_t>>") {
7445  json = json11::Json::object { { s, get_value<vector<vector<uint8_t>>>(s) } };
7446  } else if (type == "vector<int8_t>") {
7447  json = json11::Json::object { { s, get_value<vector<int8_t>>(s) } };
7448  } else if (type == "vector<vector<int8_t>>") {
7449  json = json11::Json::object { { s, get_value<vector<vector<int8_t>>>(s) } };
7450  } else if (type == "vector<int>") {
7451  json = json11::Json::object { { s, get_value<vector<int>>(s) } };
7452  } else if (type == "vector<vector<int>>") {
7453  json = json11::Json::object { { s, get_value<vector<vector<int>>>(s) } };
7454  } else if (type == "vector<size_t>") {
7455  json = json11::Json::object { { s, get_value<vector<int>>(s) } };
7456  } else if (type == "vector<vector<size_t>>") {
7457  json = json11::Json::object { { s, get_value<vector<vector<int>>>(s) } };
7458  } else if (type == "vector<bool>") {
7459  json = json11::Json::object { { s, get_value<vector<bool>>(s) } };
7460  } else if (type == "vector<vector<bool>>") {
7461  json = json11::Json::object { { s, get_value<vector<vector<bool>>>(s) } };
7462  } else if (type == "vector<string>") {
7463  json = json11::Json::object { { s, get_value<vector<string>>(s) } };
7464  } else if (type == "vector<vector<string>>") {
7465  json = json11::Json::object { { s, get_value<vector<vector<string>>>(s) } };
7466  } else if (type == "vector<float>") {
7467  json = json11::Json::object { { s, get_value<vector<float>>(s) } };
7468  } else if (type == "vector<vector<float>>") {
7469  json = json11::Json::object { { s, get_value<vector<vector<float>>>(s) } };
7470  } else if (type == "vector<double>") {
7471  json = json11::Json::object { { s, get_value<vector<double>>(s) } };
7472  } else if (type == "vector<vector<double>>") {
7473  json = json11::Json::object { { s, get_value<vector<vector<double>>>(s) } };
7474 
7475  // vector of user-defined types
7476  } else if (type == "vector<agent_request_entry>") {
7477  // json = json11::Json::object { { s, get_value<vector<agent_request_entry>>(s) } };
7478  } else if (type == "vector<agentstruc>") {
7479  json = json11::Json::object { { s, get_value<vector<agentstruc>>(s) } };
7480  } else if (type == "vector<devicestruc>") {
7481  json = json11::Json::object { { s, get_value<vector<devicestruc>>(s) } };
7482  } else if (type == "vector<equationstruc>") {
7483  json = json11::Json::object { { s, get_value<vector<equationstruc>>(s) } };
7484  } else if (type == "vector<eventstruc>") {
7485  json = json11::Json::object { { s, get_value<vector<eventstruc>>(s) } };
7486  } else if (type == "vector<face>") {
7487  json = json11::Json::object { { s, get_value<vector<Cosmos::wavefront::face>>(s) } };
7488  } else if (type == "vector<facestruc>") {
7489  json = json11::Json::object { { s, get_value<vector<facestruc>>(s) } };
7490  } else if (type == "vector<group>") {
7491  json = json11::Json::object { { s, get_value<vector<Cosmos::wavefront::group>>(s) } };
7492  } else if (type == "vector<line>") {
7493  json = json11::Json::object { { s, get_value<vector<Cosmos::wavefront::line>>(s) } };
7494  } else if (type == "vector<material>") {
7495  json = json11::Json::object { { s, get_value<vector<Cosmos::wavefront::material>>(s) } };
7496  } else if (type == "vector<piecestruc>") {
7497  json = json11::Json::object { { s, get_value<vector<piecestruc>>(s) } };
7498  } else if (type == "vector<point>") {
7499  json = json11::Json::object { { s, get_value<vector<Cosmos::wavefront::point>>(s) } };
7500  } else if (type == "vector<portstruc>") {
7501  json = json11::Json::object { { s, get_value<vector<portstruc>>(s) } };
7502  } else if (type == "vector<targetstruc>") {
7503  json = json11::Json::object { { s, get_value<vector<targetstruc>>(s) } };
7504  } else if (type == "vector<tlestruc>") {
7505  json = json11::Json::object { { s, get_value<vector<tlestruc>>(s) } };
7506  } else if (type == "vector<trianglestruc>") {
7507  json = json11::Json::object { { s, get_value<vector<trianglestruc>>(s) } };
7508  } else if (type == "vector<unitstruc>") {
7509  json = json11::Json::object { { s, get_value<vector<unitstruc>>(s) } };
7510  } else if (type == "vector<userstruc>") {
7511  json = json11::Json::object { { s, get_value<vector<userstruc>>(s) } };
7512  } else if (type == "vector<Vector>") {
7513  json = json11::Json::object { { s, get_value<vector<Vector>>(s) } };
7514  } else if (type == "vector<vector<unitstruc>>") {
7515  json = json11::Json::object { { s, get_value<vector<vector<unitstruc>>>(s) } };
7516  } else if (type == "vector<vertexstruc>") {
7517  json = json11::Json::object { { s, get_value<vector<vertexstruc>>(s) } };
7518  }
7519  return json.dump();
7520  } else {
7521  return "";
7522  }
7523  }
string get_type(const string &s) const
Gets the data type associated with the provided name in Namespace 2.0.
Definition: jsondef.h:6766
std::map< std::string, Json > object
Definition: json11.hpp:88
Definition: json11.hpp:79
bool name_exists(const string &s)
Checks if provided name exists within Namespace 2.0.
Definition: jsondef.h:4508
void dump(std::string &out) const
jsonnode json
JSON descriptive information.
Definition: jsondef.h:4262
void cosmosstruc::replace ( std::string &  str,
const std::string &  from,
const std::string &  to 
)
inline

Replace every occurance of a substring within a string with another subtring.

Search through a string for every instance of a specified substring, then replace. For internal use.

Parameters
strstring to search through
fromsubstring to replace
tosubstring to be replaced with
Returns
n/a
7533  {
7534  if(from.empty()) return;
7535  size_t start_pos = 0;
7536  while((start_pos = str.find(from, start_pos)) != std::string::npos) {
7537  str.replace(start_pos, from.length(), to);
7538  start_pos += to.length();
7539  }
7540  return;
7541  }
const string & str
Definition: json11.cpp:360
void cosmosstruc::pretty_form ( string &  js)
inline

Pretty-fy text.

Takes an input JSON-formatted string and makes it more readable. For internal use.

Parameters
jsJSON-formatted string
Returns
n/a
7549  {
7550 
7551 // JIMNOTE: fix bug with splitting lines over array indices [#]
7552 
7553  replace(js, ", ", ",\n");
7554  replace(js, "[]", "E M P T Y V E C T O R");
7555  replace(js, "{}", "E M P T Y O B J E C T");
7556  replace(js, "{", "{\n");
7557  replace(js, "[", "[\n");
7558  replace(js, "}", "\n}");
7559  replace(js, "]", "\n]");
7560  replace(js, "E M P T Y O B J E C T", "{}");
7561  replace(js, "E M P T Y V E C T O R", "[]");
7562 
7563  // create vector[char position] = # of indents
7564  int indent = 0;
7565  vector<size_t> indents;
7566  for(size_t i = 0; i < js.size(); ++i) {
7567  if(js[i]=='['){ ++indent;}
7568  if(js[i]=='{'){ ++indent;}
7569  if(js[i]==']'){ --indent; indents[i-1]--;}
7570  if(js[i]=='}'){ --indent; indents[i-1]--;}
7571  indents.push_back(indent);
7572  }
7573 
7574  // find position of all '\n' characters
7575  vector<size_t> newlines;
7576  for(size_t i =0; i < js.size(); i++) if(js[i] == '\n') newlines.push_back(i);
7577 
7578  // insert the appropriate # of indents after the '\n' char
7579  for(size_t i = newlines.size(); i!=0; ) {
7580  --i;
7581  string indent_string;
7582  for(size_t j = 0; j < indents[newlines[i]]; ++j) indent_string += " ";
7583  js.insert(newlines[i]+1, indent_string);
7584  }
7585  return;
7586  }
void replace(std::string &str, const std::string &from, const std::string &to)
Replace every occurance of a substring within a string with another subtring.
Definition: jsondef.h:7533
double i
Definition: jsondef.h:4334
template<class T >
string cosmosstruc::get_json_pretty ( const string &  s)
inline
7589  {
7590  if(name_exists(s)) {
7591  json11::Json json = json11::Json::object { { s, this->get_value<T>(s) } };
7592  string pretty = json.dump();
7593  pretty_form(pretty);
7594  return pretty;
7595  } else {
7596  return "";
7597  }
7598  }
std::map< std::string, Json > object
Definition: json11.hpp:88
Definition: json11.hpp:79
bool name_exists(const string &s)
Checks if provided name exists within Namespace 2.0.
Definition: jsondef.h:4508
void dump(std::string &out) const
jsonnode json
JSON descriptive information.
Definition: jsondef.h:4262
void pretty_form(string &js)
Pretty-fy text.
Definition: jsondef.h:7549
json11::Json cosmosstruc::to_json ( ) const
inline

Convert class contents to a JSON object.

Returns a json11 JSON object of the COSMOS Data Structure (cosmosstruc)

Returns
A json11 JSON object containing every member variable within the COSMOS Data Structure (cosmosstruc)
7605  {
7606  return json11::Json::object {
7607  { "timestamp" , timestamp },
7608  { "jmapped" , jmapped },
7609  { "unit" , unit },
7610  { "equation" , equation },
7611  { "node" , node },
7612  { "vertexs" , vertexs },
7613  { "normals" , normals },
7614  { "faces" , faces },
7615  { "pieces" , pieces },
7616  { "obj" , obj },
7617  { "device" , device },
7618  { "devspec" , devspec },
7619  { "port" , port },
7620  { "agent" , agent },
7621  { "event" , event },
7622  { "target" , target },
7623  { "user" , user },
7624  { "tle" , tle },
7625  //{ "json" , json }
7626  };
7627  }
vector< portstruc > port
Vector of all ports known to node.
Definition: jsondef.h:4244
double timestamp
Timestamp for last change to data.
Definition: jsondef.h:4202
std::map< std::string, Json > object
Definition: json11.hpp:88
vector< facestruc > faces
Vector of all faces in node.
Definition: jsondef.h:4229
vector< tlestruc > tle
Array of Two Line Elements.
Definition: jsondef.h:4259
uint16_t jmapped
Whether JSON map has been created.
Definition: jsondef.h:4205
vector< vertexstruc > vertexs
Vector of all vertexs in node.
Definition: jsondef.h:4223
vector< vector< unitstruc > > unit
JSON Unit Map matrix: first level is for unit type, second level is for all variants (starting with p...
Definition: jsondef.h:4214
vector< vertexstruc > normals
Vector of all vertexs in node.
Definition: jsondef.h:4226
vector< devicestruc > device
Vector of all general (common) information for devices (components) in node.
Definition: jsondef.h:4238
nodestruc node
Structure for summary information in node.
Definition: jsondef.h:4220
vector< equationstruc > equation
Vector of Equations.
Definition: jsondef.h:4217
vector< userstruc > user
Single entry vector for user information.
Definition: jsondef.h:4256
vector< agentstruc > agent
Single entry vector for agent information.
Definition: jsondef.h:4247
vector< piecestruc > pieces
Vector of all pieces in node.
Definition: jsondef.h:4232
devspecstruc devspec
Structure for devices (components) special data in node, by type.
Definition: jsondef.h:4241
vector< targetstruc > target
Vector of all targets known to node.
Definition: jsondef.h:4253
wavefront obj
Wavefront obj structure.
Definition: jsondef.h:4235
void cosmosstruc::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
7635  {
7636  string error;
7637  json11::Json p = json11::Json::parse(s,error);
7638  if(error.empty()) {
7639  string obj(p.object_items().begin()->first); // NOTE: Should we rename this to something else? We already have a wavefront obj member var
7640  if (!p[obj]["timestamp"].is_null()) { timestamp = p[obj]["timestamp"].number_value(); }
7641  if (!p[obj]["jmapped"].is_null()) { jmapped = p[obj]["jmapped"].number_value(); }
7642  for (size_t i = 0; i < unit.size(); ++i) {
7643  for (size_t j = 0; j < unit[i].size(); ++j) {
7644  if (!p[obj]["unit"][i][j].is_null()) { unit[i][j].from_json(p[obj]["unit"][i][j].dump()); }
7645  }
7646  }
7647  for (size_t i = 0; i < equation.size(); ++i) {
7648  if (!p[obj]["equation"][i].is_null()) { equation[i].from_json(p[obj]["equation"][i].dump()); }
7649  }
7650  if (!p[obj]["node"].is_null()) { node.from_json(p[obj]["node"].dump()); }
7651  for (size_t i = 0; i < vertexs.size(); ++i) {
7652  if (!p[obj]["vertexs"][i].is_null()) { vertexs[i].from_json(p[obj]["vertexs"][i].dump()); }
7653  }
7654  for (size_t i = 0; i < normals.size(); ++i) {
7655  if (!p[obj]["normals"][i].is_null()) { normals[i].from_json(p[obj]["normals"][i].dump()); }
7656  }
7657  for (size_t i = 0; i < faces.size(); ++i) {
7658  if (!p[obj]["faces"][i].is_null()) { faces[i].from_json(p[obj]["faces"][i].dump()); }
7659  }
7660  if (!p["obj"].is_null()) { cosmosstruc::obj.from_json(p[obj]["obj"].dump()); }
7661  for (size_t i = 0; i < device.size(); ++i) {
7662  if (!p[obj]["device"][i].is_null()) { device[i].from_json(p[obj]["device"][i].dump()); }
7663  }
7664  if (!p[obj]["devspec"].is_null()) { devspec.from_json(p[obj]["devspec"].dump()); }
7665  for (size_t i = 0; i < port.size(); ++i) {
7666  if (!p[obj]["port"][i].is_null()) { port[i].from_json(p[obj]["port"][i].dump()); }
7667  }
7668  for (size_t i = 0; i < agent.size(); ++i) {
7669  if (!p[obj]["agent"][i].is_null()) { agent[i].from_json(p[obj]["agent"][i].dump()); }
7670  }
7671  for (size_t i = 0; i < event.size(); ++i) {
7672  if (!p[obj]["event"][i].is_null()) { event[i].from_json(p[obj]["event"][i].dump()); }
7673  }
7674  for (size_t i = 0; i < target.size(); ++i) {
7675  if (!p[obj]["target"][i].is_null()) { target[i].from_json(p[obj]["target"][i].dump()); }
7676  }
7677  for (size_t i = 0; i < user.size(); ++i) {
7678  if (!p[obj]["user"][i].is_null()) { user[i].from_json(p[obj]["user"][i].dump()); }
7679  }
7680  for (size_t i = 0; i < tle.size(); ++i) {
7681  if (!p[obj]["tle"][i].is_null()) { tle[i].from_json(p[obj]["tle"][i].dump()); }
7682  }
7683  //if(!p[obj]["json"].is_null()) json.from_json(p[obj]["json"].dump());
7684  } else {
7685  cerr<<"ERROR: <"<<error<<">"<<endl;
7686  }
7687  return;
7688  }
vector< portstruc > port
Vector of all ports known to node.
Definition: jsondef.h:4244
double timestamp
Timestamp for last change to data.
Definition: jsondef.h:4202
vector< facestruc > faces
Vector of all faces in node.
Definition: jsondef.h:4229
vector< tlestruc > tle
Array of Two Line Elements.
Definition: jsondef.h:4259
uint16_t jmapped
Whether JSON map has been created.
Definition: jsondef.h:4205
Definition: json11.hpp:79
vector< vertexstruc > vertexs
Vector of all vertexs in node.
Definition: jsondef.h:4223
vector< vector< unitstruc > > unit
JSON Unit Map matrix: first level is for unit type, second level is for all variants (starting with p...
Definition: jsondef.h:4214
vector< vertexstruc > normals
Vector of all vertexs in node.
Definition: jsondef.h:4226
vector< devicestruc > device
Vector of all general (common) information for devices (components) in node.
Definition: jsondef.h:4238
nodestruc node
Structure for summary information in node.
Definition: jsondef.h:4220
static double * p
Definition: gauss_jackson_test.cpp:42
vector< equationstruc > equation
Vector of Equations.
Definition: jsondef.h:4217
static Json parse(const std::string &in, std::string &err, JsonParse strategy=JsonParse::STANDARD)
static void dump(NullStruct, string &out)
Definition: json11.cpp:53
void from_json(const string &s)
Set class contents from JSON string.
Definition: jsondef.h:4006
void from_json(const string &js)
Set class contents from JSON string.
Definition: jsondef.h:3645
vector< userstruc > user
Single entry vector for user information.
Definition: jsondef.h:4256
void from_json(const string &s)
Set class contents from JSON string.
Definition: objlib.h:356
vector< agentstruc > agent
Single entry vector for agent information.
Definition: jsondef.h:4247
devspecstruc devspec
Structure for devices (components) special data in node, by type.
Definition: jsondef.h:4241
vector< targetstruc > target
Vector of all targets known to node.
Definition: jsondef.h:4253
wavefront obj
Wavefront obj structure.
Definition: jsondef.h:4235
double i
Definition: jsondef.h:4334
double number_value() const
Definition: json11.cpp:280
const object & object_items() const
Definition: json11.cpp:285
bool cosmosstruc::left_ass ( char  a)
inline

Checks if operator is left-associative.

For internal use.

Parameters
achar representing operator to check left-associativity for
Returns
Returns true if operator is left-associative. Returns false if not.
7696  {
7697  if(a == '+') return true;
7698  if(a == '-') return true;
7699  if(a == '*') return true;
7700  if(a == '/') return true;
7701  if(a == '^') return false;
7702 
7703  return false;
7704  }
double a
Definition: jsondef.h:4320
bool cosmosstruc::equal_ass ( char  a,
char  b 
)
inline

Checks if two operators have equal precedence.

For internal use.

Parameters
achar representing operator
bchar representing operator
Returns
Returns true if operators have equal precedence. Returns false if not.
7713  {
7714  if(a == '+' && b == '+') return true;
7715  if(a == '+' && b == '-') return true;
7716  if(a == '+' && b == '*') return false;
7717  if(a == '+' && b == '/') return false;
7718  if(a == '+' && b == '^') return false;
7719 
7720  if(a == '-' && b == '+') return true;
7721  if(a == '-' && b == '-') return true;
7722  if(a == '-' && b == '*') return false;
7723  if(a == '-' && b == '/') return false;
7724  if(a == '-' && b == '^') return false;
7725 
7726  if(a == '*' && b == '+') return false;
7727  if(a == '*' && b == '-') return false;
7728  if(a == '*' && b == '*') return true;
7729  if(a == '*' && b == '/') return true;
7730  if(a == '*' && b == '^') return false;
7731 
7732  if(a == '/' && b == '+') return false;
7733  if(a == '/' && b == '-') return false;
7734  if(a == '/' && b == '*') return true;
7735  if(a == '/' && b == '/') return true;
7736  if(a == '/' && b == '^') return false;
7737 
7738  if(a == '^' && b == '+') return false;
7739  if(a == '^' && b == '-') return false;
7740  if(a == '^' && b == '*') return false;
7741  if(a == '^' && b == '/') return false;
7742  if(a == '^' && b == '^') return true;
7743 
7744  return false;
7745  }
double b
Definition: jsondef.h:4327
double a
Definition: jsondef.h:4320
bool cosmosstruc::higher ( char  a,
char  b 
)
inline

Checks for higher operator precedence.

For internal use.

Parameters
achar representing operator
bchar representing operator
Returns
Returns true if operator a has higher precedence than operator b. Returns false if not.
7754  {
7755 
7756  if(a == '+' && b == '+') return false;
7757  if(a == '+' && b == '-') return false;
7758  if(a == '+' && b == '*') return false;
7759  if(a == '+' && b == '/') return false;
7760  if(a == '+' && b == '^') return false;
7761 
7762  if(a == '-' && b == '+') return false;
7763  if(a == '-' && b == '-') return false;
7764  if(a == '-' && b == '*') return false;
7765  if(a == '-' && b == '/') return false;
7766  if(a == '-' && b == '^') return false;
7767 
7768  if(a == '*' && b == '+') return true;
7769  if(a == '*' && b == '-') return true;
7770  if(a == '*' && b == '*') return false;
7771  if(a == '*' && b == '/') return false;
7772  if(a == '*' && b == '^') return false;
7773 
7774  if(a == '/' && b == '+') return true;
7775  if(a == '/' && b == '-') return true;
7776  if(a == '/' && b == '*') return false;
7777  if(a == '/' && b == '/') return false;
7778  if(a == '/' && b == '^') return false;
7779 
7780  if(a == '^' && b == '+') return true;
7781  if(a == '^' && b == '-') return true;
7782  if(a == '^' && b == '*') return true;
7783  if(a == '^' && b == '/') return true;
7784  if(a == '^' && b == '^') return false;
7785 
7786  return false;
7787  }
double b
Definition: jsondef.h:4327
double a
Definition: jsondef.h:4320
int cosmosstruc::apply_op ( stack< char > &  ops,
stack< double > &  answer 
)
inline

Applies an arithmetic operation between two values.

Two operands are popped from the answer stack, and one operator is popped from the ops stack. The result of the operation is pushed onto the answer stack. For internal use.

Parameters
opsstack of operators
answerstack of operands
Returns
Returns -1 if answer does not contain at least 2 operands. Returns 0 if operation was successfully applied.
7796  {
7797  if(answer.size()<2) return -1;
7798  double b = answer.top();
7799  answer.pop();
7800  double a = answer.top();
7801  answer.pop();
7802  switch(ops.top()) {
7803  case '+': answer.push(a+b);
7804  break;
7805  case '-': answer.push(a-b);
7806  break;
7807  case '*': answer.push(a*b);
7808  break;
7809  case '/': answer.push(a/b);
7810  break;
7811  case '^': answer.push(pow(a,b));
7812  break;
7813  }
7814  //cout<<" calculating "<<a<<" "<<ops.top()<<" "<<b<<" = "<<answer.top()<<endl;
7815  ops.pop();
7816  return 0;
7817  }
double b
Definition: jsondef.h:4327
double a
Definition: jsondef.h:4320
double cosmosstruc::equationator ( const string &  str)
inline

Evaluate the expression of a python?Matlab? equation.

Parses a python?Matlab? formatted string and evaluates the expression

Parameters
strstring representing a python?Matlab? formatted expression
Returns
Returns a double type result of the expression. Returns NaN if an error is encountered.
7825  {
7826  string eq(str);
7827 
7828  // START EQUATION PRE-PROCESSING
7829 
7830  // check if empty
7831  if(eq.empty()) return nan("");
7832 
7833  // check if double quotes are balanced
7834  int q_count = 0;
7835  for(std::string::const_iterator it = eq.begin(); it != eq.end(); ++it) {
7836  if(*it=='"') q_count++;
7837  }
7838  if(q_count%2==1) return nan("");
7839 
7840  // TODO: you should never have #( or )#... implied multiplication, but make explicit already!
7841 
7842  // trim leading whitespace
7843  const auto notwhite = eq.find_first_not_of(" \n\r\t\f\v");
7844  eq = eq.substr(notwhite);
7845 
7846  // replace "cosmos_variable_names" with values
7847  vector<string> replacements;
7848  for(size_t i = 0; i < eq.size(); ++i) {
7849  //cout<<"char = <"<<eq[i]<<">"<<endl;
7850  if(eq[i]=='"') {
7851  string name("");
7852  //cout<<"found opening quote"<<endl;
7853  while(eq[++i]!='"'&&i<eq.size()) { name.push_back(eq[i]); }
7854  //cout<<"name = "<<name<<endl;
7855  replacements.push_back(name);
7856  }
7857  }
7858 
7859  for(size_t i = 0; i < replacements.size(); ++i) {
7860  string replace_me = "\"" + replacements[i] + "\"";
7861  string type = get_type(replacements[i]);
7862  if(type=="double") {
7863  replace(eq, replace_me, to_string(get_value<double>(replacements[i])));
7864  } else if(type=="float") {
7865  replace(eq, replace_me, to_string(get_value<float>(replacements[i])));
7866  } else if(type=="size_t") {
7867  replace(eq, replace_me, to_string(get_value<size_t>(replacements[i])));
7868  } else if(type=="int") {
7869  replace(eq, replace_me, to_string(get_value<int>(replacements[i])));
7870  } else if(type=="uint16_t") {
7871  replace(eq, replace_me, to_string(get_value<uint16_t>(replacements[i])));
7872  } else if(type=="int16_t") {
7873  replace(eq, replace_me, to_string(get_value<int16_t>(replacements[i])));
7874  } else if(type=="uint32_t") {
7875  replace(eq, replace_me, to_string(get_value<uint32_t>(replacements[i])));
7876  } else if(type=="int32_t") {
7877  replace(eq, replace_me, to_string(get_value<int32_t>(replacements[i])));
7878  } else if(type=="uint8_t") {
7879  replace(eq, replace_me, to_string(get_value<uint8_t>(replacements[i])));
7880  } else if(type=="int8_t") {
7881  replace(eq, replace_me, to_string(get_value<int8_t>(replacements[i])));
7882  } else if(type=="bool") {
7883  replace(eq, replace_me, to_string(get_value<bool>(replacements[i])));
7884  } else {
7885  cout<<"type <"<<type<<"> for <"<<replacements[i]<<"> not supported"<<endl;
7886  return nan("");
7887  }
7888  }
7889 
7890  // replace {}[] with ()
7891  replace(eq, "{", "(");
7892  replace(eq, "[", "(");
7893  replace(eq, "}", ")");
7894  replace(eq, "]", ")");
7895 
7896  // replace ÷,– with /,-
7897  replace(eq, "÷", "/");
7898  replace(eq, "–", "-");
7899 
7900  // check if parenthesis are balanced
7901  int p_count = 0;
7902  for(std::string::const_iterator it = eq.begin(); it != eq.end(); ++it) {
7903  if(*it=='(') p_count++;
7904  if(*it==')') p_count--;
7905  if(p_count<0) return nan("");
7906  }
7907  if(p_count!=0) return nan("");
7908 
7909 
7910  // START EQUATION PROCESSING
7911 
7912  string output;
7913  stack<double> answer;
7914  stack<char> ops;
7915 
7916  //int count = 0;
7917  for(std::string::const_iterator it = eq.begin(); it != eq.end(); ++it) {
7918  // debug
7919  // cout<<"char #"<<count++<<" = '"<<*it<<"' :\n\t<"<<output<<">"<<endl;
7920  // cout<<"\t: operators = <";
7921  // for(stack<char> op = ops; !op.empty(); op.pop()) { cout<<op.top()<<" "; }
7922  // cout<<">"<<endl;
7923 
7924  // all letters should have been replaced by values
7925  if(isalpha(*it)) return nan("");
7926  // skip all whitespace
7927  if(isspace(*it)) continue;
7928  // if token is number
7929  if(isdigit(*it)||*it=='.') {
7930  bool negative = false;
7931  if(*(it-1)=='+'||*(it-1)=='-') {
7932  string::const_iterator iit = it-1;
7933  if(iit==eq.begin()) {
7934  if(*(it-1)=='-') negative = true;
7935  ops.pop();
7936  } else {
7937  while(iit--!=eq.begin()) {
7938  if(isspace(*iit)) continue;
7939  if(*iit=='('||*iit=='+'||*iit=='-'||*iit=='*'||*iit=='/'||*iit=='^') {
7940  if(*(it-1)=='-') negative = true;
7941  ops.pop();
7942  break;
7943  } else {
7944  break;
7945  }
7946  }
7947  if(iit==eq.begin() && (*iit==' '||*iit=='\t'||*iit=='\n')) {
7948  if(*(it-1)=='-') negative = true;
7949  ops.pop();
7950  }
7951  }
7952  }
7953  vector<int> integer, fraction;
7954  if(isdigit(*it)) {
7955  integer.push_back(*it-'0');
7956  } else {
7957  integer.push_back(0); --it;
7958  }
7959  while(isdigit(*(it+1))) { integer.push_back(*(++it)-'0'); }
7960  if(*(it+1)=='.') { ++it; while(isdigit(*(it+1))) { fraction.push_back(*(++it)-'0'); } }
7961  double numnum = 0.;
7962  for(size_t i = 0; i < integer.size(); ++i) { numnum += integer[i]*1.0 * pow(10, integer.size()-i-1); }
7963  for(size_t i = 0; i < fraction.size(); ++i) { numnum += fraction[i]*1.0 * pow(10.0, -(i+1.0)); }
7964  if(negative) numnum *= -1.;
7965  stringstream ss;
7966  ss<<setprecision(std::numeric_limits<double>::digits10)<<numnum;
7967  output += ss.str() + " ";
7968  answer.push(numnum);
7969  continue;
7970  }
7971  // if token is operator
7972  if(*it=='+'||*it=='-'||*it=='*'||*it=='/'||*it=='^') {
7973  if((*it=='+'||*it=='-')&&(isdigit(*(it+1))||*(it+1)=='.')) {
7974  if(it==eq.begin()) { ops.push(*it); continue; }
7975  string::const_iterator t = it-1;
7976  while(t!=eq.begin() && (*t==' '||*t=='\n'||*t=='\t')) --t;
7977  if(*t=='+'||*t=='-'||*t=='*'||*t=='/'||*t=='^') {
7978  // only gently pushed, will be popped when negative number found
7979  ops.push(*it);
7980  continue;
7981  }
7982  }
7983  while( !ops.empty() &&
7984  ( higher(ops.top(), *it) || (equal_ass(ops.top(), *it) && left_ass(*it)) ) &&
7985  ops.top()!='('
7986  ) { output += string(1,(*it)) + " "; if(apply_op(ops, answer)<0) return nan(""); }
7987  ops.push(*it);
7988  } else if(*it == '(') {
7989  ops.push(*it);
7990  } else if(*it == ')') {
7991  while(ops.top()!='(') {
7992  output += string(1,(*it)) + " ";
7993  if(apply_op(ops, answer)<0) return nan("");
7994  }
7995  if(ops.top()=='(') { if(ops.empty()) return nan(""); else ops.pop(); }
7996  }
7997  }
7998  while(!ops.empty()) { output += string(1,ops.top()) + " "; if(apply_op(ops, answer)<0) return nan(""); }
7999  return answer.top();
8000  }
string get_type(const string &s) const
Gets the data type associated with the provided name in Namespace 2.0.
Definition: jsondef.h:6766
int apply_op(stack< char > &ops, stack< double > &answer)
Applies an arithmetic operation between two values.
Definition: jsondef.h:7796
bool higher(char a, char b)
Checks for higher operator precedence.
Definition: jsondef.h:7754
string to_string(char *value)
Definition: stringlib.cpp:220
string output
Definition: agent-2-0.cpp:56
const string & str
Definition: json11.cpp:360
bool equal_ass(char a, char b)
Checks if two operators have equal precedence.
Definition: jsondef.h:7713
void replace(std::string &str, const std::string &from, const std::string &to)
Replace every occurance of a substring within a string with another subtring.
Definition: jsondef.h:7533
string name
Definition: cubesat2obj.cpp:6
bool left_ass(char a)
Checks if operator is left-associative.
Definition: jsondef.h:7696
double t
Definition: jsondef.h:4359
double i
Definition: jsondef.h:4334

Member Data Documentation

double cosmosstruc::timestamp = 0.

Timestamp for last change to data.

uint16_t cosmosstruc::jmapped = 0

Whether JSON map has been created.

vector<vector<jsonentry> > cosmosstruc::jmap

JSON Namespace Map matrix. first entry hash, second is items with that hash.

vector<vector<jsonequation> > cosmosstruc::emap

JSON Equation Map matrix.

vector<vector<unitstruc> > cosmosstruc::unit

JSON Unit Map matrix: first level is for unit type, second level is for all variants (starting with primary).

vector<equationstruc> cosmosstruc::equation

Vector of Equations.

nodestruc cosmosstruc::node

Structure for summary information in node.

vector<vertexstruc> cosmosstruc::vertexs

Vector of all vertexs in node.

vector<vertexstruc> cosmosstruc::normals

Vector of all vertexs in node.

vector<facestruc> cosmosstruc::faces

Vector of all faces in node.

vector<piecestruc> cosmosstruc::pieces

Vector of all pieces in node.

wavefront cosmosstruc::obj

Wavefront obj structure.

vector<devicestruc> cosmosstruc::device

Vector of all general (common) information for devices (components) in node.

devspecstruc cosmosstruc::devspec

Structure for devices (components) special data in node, by type.

vector<portstruc> cosmosstruc::port

Vector of all ports known to node.

vector<agentstruc> cosmosstruc::agent

Single entry vector for agent information.

vector<eventstruc> cosmosstruc::event

Single entry vector for event information.

vector<targetstruc> cosmosstruc::target

Vector of all targets known to node.

vector<userstruc> cosmosstruc::user

Single entry vector for user information.

vector<tlestruc> cosmosstruc::tle

Array of Two Line Elements.

jsonnode cosmosstruc::json

JSON descriptive information.

double cosmosstruc::mass = 1.0

Support for Simulation (just for testing and integration)

double cosmosstruc::dens = 1.0
double cosmosstruc::t_pos = 0.0
double cosmosstruc::x_pos = 0.0
double cosmosstruc::y_pos = 0.0
double cosmosstruc::z_pos = 0.0
double cosmosstruc::t_vel = 0.0
double cosmosstruc::x_vel = 0.0
double cosmosstruc::y_vel = 0.0
double cosmosstruc::z_vel = 0.0
double cosmosstruc::t_acc = 0.0
double cosmosstruc::x_acc = 0.0
double cosmosstruc::y_acc = 0.0
double cosmosstruc::z_acc = 0.0
double cosmosstruc::t_way = 0.0
double cosmosstruc::x_way = 0.0
double cosmosstruc::y_way = 0.0
double cosmosstruc::z_way = 0.0
double cosmosstruc::pitch = 0.0
double cosmosstruc::roll = 0.0
double cosmosstruc::yaw = 0.0
double cosmosstruc::a = 0.0
double cosmosstruc::e = 0.0
double cosmosstruc::b = a*sqrt(1.0 - pow(e,2.0))
double cosmosstruc::l = a*(1.0-pow(e,2.0))
double cosmosstruc::i = 0.0
double cosmosstruc::O = 0.0
double cosmosstruc::w = 0.0
double cosmosstruc::tau = 0.0
double cosmosstruc::G = 6.6743015e-11
double cosmosstruc::mass_of_Earth = 5.9722e24
double cosmosstruc::mu = G * mass_of_Earth
double cosmosstruc::n = pow( (mu / pow(a,3.0) ), (0.5) )
double cosmosstruc::T = ( 2.0 * M_PI ) / n
double cosmosstruc::t = 0.0
double cosmosstruc::M = fmod(n * (t - tau), 2*M_PI)
double cosmosstruc::v = M + (2.0*e-0.25*pow(e,3.0))*sin(M) + 1.25*pow(e,2.0)*sin(2.0*M) + (13.0/12.0)*pow(e,3.0)*sin(3.0*M)
double cosmosstruc::r = l / (1.0 + e*cos(v))
double cosmosstruc::P_pos_t = r * cos(v)
double cosmosstruc::Q_pos_t = r * sin(v)
double cosmosstruc::W_pos_t = 0.0
double cosmosstruc::P_vel_t = sqrt(mu/l) * -sin(v)
double cosmosstruc::Q_vel_t = sqrt(mu/l) * (e+cos(v))
double cosmosstruc::W_vel_t = 0.0
double cosmosstruc::R_0_0 = 0.0
double cosmosstruc::R_1_0 = 0.0
double cosmosstruc::R_2_0 = 0.0
double cosmosstruc::R_0_1 = 0.0
double cosmosstruc::R_1_1 = 0.0
double cosmosstruc::R_2_1 = 0.0
double cosmosstruc::R_0_2 = 0.0
double cosmosstruc::R_1_2 = 0.0
double cosmosstruc::R_2_2 = 0.0
double cosmosstruc::I_pos_t = 0.0
double cosmosstruc::J_pos_t = 0.0
double cosmosstruc::K_pos_t = 0.0
double cosmosstruc::I_vel_t = 0.0
double cosmosstruc::J_vel_t = 0.0
double cosmosstruc::K_vel_t = 0.0
name_map cosmosstruc::names
type_map cosmosstruc::types

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