mirror of
https://github.com/nasa/trick.git
synced 2025-06-23 01:08:52 +00:00
Output "--" if that was specified in the header file.
Used the mods field in the attributes to indicate of "--" was specified in the header file. We still save the units as "1" to keep it compatible with udunits. When outputting the variable in data recording or variable server we check to see if the mods field for "--" is set. We output "--" if the mods field is set. Also allowed "--" to persist in data products. refs #254
This commit is contained in:
@ -116,6 +116,9 @@ int Trick::VariableServerThread::var_units(std::string var_name, std::string uni
|
||||
if (!units_name.compare("xx")) {
|
||||
vars[ii]->ref->units = strdup(vars[ii]->ref->attr->units);
|
||||
}
|
||||
else if (!units_name.compare("--")) {
|
||||
vars[ii]->ref->units = strdup("1");
|
||||
}
|
||||
else {
|
||||
std::string new_units = map_trick_units_to_udunits(units_name) ;
|
||||
if ( units_name.compare(new_units) ) {
|
||||
|
Reference in New Issue
Block a user