Skip to content

Commit

Permalink
Merge pull request #108 from thooge/master
Browse files Browse the repository at this point in the history
Implement formatter for XTE (cross track error)
  • Loading branch information
norbert-walter authored Nov 2, 2024
2 parents 644a0cd + 2fbe8c7 commit 717d660
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/obp60task/OBP60Formater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,19 @@ FormatedData formatValue(GwApi::BoatValue *value, CommonData &commondata){
}
}
//########################################################
else if (value->getFormat() == "formatXte"){
double xte = abs(value->value);
rawvalue = value->value;
if (xte >= 100) {
snprintf(buffer,bsize,"%3.0f",value->value);
} else if (xte >= 10) {
snprintf(buffer,bsize,"%3.1f",value->value);
} else {
snprintf(buffer,bsize,"%3.2f",value->value);
}
result.unit = "nm";
}
//########################################################
else if (value->getFormat() == "kelvinToC"){
double temp = 0;
if(usesimudata == false) {
Expand Down

0 comments on commit 717d660

Please sign in to comment.