diff --git a/src/blackmisc/aviation/altitude.cpp b/src/blackmisc/aviation/altitude.cpp index e847eb26e..6e730fd62 100644 --- a/src/blackmisc/aviation/altitude.cpp +++ b/src/blackmisc/aviation/altitude.cpp @@ -342,8 +342,7 @@ namespace BlackMisc } if (!CMathUtils::epsilonZero(fmod(flInt, 5))) { - if (msgs) { msgs->push_back(CStatusMessage(this).validationError(u"FL needs to end with 0 or 5")); } - return false; + if (msgs) { msgs->push_back(CStatusMessage(this).validationWarning(u"FL should end with 0 or 5")); } } } } diff --git a/tests/blackmisc/aviation/testflightplan/testflightplan.cpp b/tests/blackmisc/aviation/testflightplan/testflightplan.cpp index fbb082efb..4b5c0c28c 100644 --- a/tests/blackmisc/aviation/testflightplan/testflightplan.cpp +++ b/tests/blackmisc/aviation/testflightplan/testflightplan.cpp @@ -72,6 +72,8 @@ namespace BlackMiscTest CAltitude a; a.parseFromFpAltitudeString("FL125"); QVERIFY2(a == CAltitude(12500, CAltitude::FlightLevel, CLengthUnit::ft()), "Wrong altitude FL125"); + a.parseFromFpAltitudeString("FL126"); + QVERIFY2(a == CAltitude(12600, CAltitude::FlightLevel, CLengthUnit::ft()), "Wrong altitude FL126"); a.parseFromFpAltitudeString("A122"); QVERIFY2(a == CAltitude(12200, CAltitude::MeanSeaLevel, CLengthUnit::ft()), "Wrong altitude A122"); a.parseFromFpAltitudeString("123ft"); @@ -87,8 +89,6 @@ namespace BlackMiscTest CAltitude faulty(a); faulty.makeNegative(); QVERIFY2(!faulty.isValidFpAltitude(), "Negative values not allowed"); - faulty.parseFromFpAltitudeString("FL111"); - QVERIFY2(!faulty.isValidFpAltitude(), "FL should end with 0/5"); // as string a = CAltitude(12500, CAltitude::FlightLevel, CLengthUnit::ft());