From cc1d07fac049483aa40b7a52ab5e2f9dff335cd6 Mon Sep 17 00:00:00 2001 From: Ulrich Meine Date: Sat, 17 Jan 2026 13:07:48 +0100 Subject: [PATCH] True Wind Calculation: change wind angle range to [0..360] temporarily for proper display on pages --- lib/obp60task/OBPDataOperations.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/obp60task/OBPDataOperations.cpp b/lib/obp60task/OBPDataOperations.cpp index 1adb7f4..562b1f6 100644 --- a/lib/obp60task/OBPDataOperations.cpp +++ b/lib/obp60task/OBPDataOperations.cpp @@ -156,7 +156,7 @@ bool CalibrationData::calibrateInstance(GwApi::BoatValue* boatDataValue) if (format == "formatWind") { // instance is of type angle dataValue = (dataValue * slope) + offset; // dataValue = WindUtils::toPI(dataValue); - dataValue = WindUtils::to2PI(dataValue); // we should call for format of [-180..180], but pages cannot handle negative values yet + dataValue = WindUtils::to2PI(dataValue); // we should call for format of [-180..180], but pages cannot display negative values properly yet } else if (format == "formatCourse") { // instance is of type direction dataValue = (dataValue * slope) + offset; @@ -518,7 +518,8 @@ bool WindUtils::addWinds() twsBVal->valid = true; } if (!twaBVal->valid) { - twaBVal->value = twa; + //twaBVal->value = twa; + twaBVal->value = to2PI(twa); // convert to [0..360], because pages cannot display negative values properly yet twaBVal->valid = true; } if (!awdBVal->valid) {