|  | COSMOS core
    1.0.2 (beta)
    Comprehensive Open-architecture Solution for Mission Operations Systems | 
JSON unit type entry. More...
#include <jsondef.h>
| Public Member Functions | |
| json11::Json | to_json () const | 
| Convert class contents to JSON object.  More... | |
| void | from_json (const string &s) | 
| Set class contents from JSON string.  More... | |
| Public Attributes | |
| string | name = "" | 
| JSON Unit Name.  More... | |
| uint16_t | type = JSON_UNIT_TYPE_IDENTITY | 
| JSON Unit conversion type.  More... | |
| float | p0 = 0.f | 
| 0th derivative term  More... | |
| float | p1 = 0.f | 
| 1th derivative term  More... | |
| float | p2 = 0.f | 
| 2th derivative term  More... | |
JSON unit type entry.
To be used in the cosmosstruc table of units. Each entry represents one specific variant of one type of unit. Each entry includes:
| 
 | inline | 
| 
 | 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()
| s | JSON-formatted string to set class contents to | 
| string unitstruc::name = "" | 
JSON Unit Name.
| uint16_t unitstruc::type = JSON_UNIT_TYPE_IDENTITY | 
JSON Unit conversion type.
| float unitstruc::p0 = 0.f | 
0th derivative term
| float unitstruc::p1 = 0.f | 
1th derivative term
| float unitstruc::p2 = 0.f | 
2th derivative term