From 54cc212d461828f474c5290308860fea4e793ad7 Mon Sep 17 00:00:00 2001 From: Stephan Brown Date: Thu, 2 Feb 2017 15:27:21 -0800 Subject: [PATCH] test_autodeclination: Add world endpoints to test. --- src/systemcmds/tests/test_autodeclination.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/systemcmds/tests/test_autodeclination.cpp b/src/systemcmds/tests/test_autodeclination.cpp index adffea2667..309cd7a858 100644 --- a/src/systemcmds/tests/test_autodeclination.cpp +++ b/src/systemcmds/tests/test_autodeclination.cpp @@ -23,7 +23,12 @@ private: bool AutoDeclinationTest::autodeclination_check() { - ut_assert("declination differs more than 1 degree", get_mag_declination(47.0, 8.0) - 1.6f < 0.5f); + ut_assert("declination differs more than 0.1 degrees", get_mag_declination(47.0, 8.0) - 1.6f < 0.1f); + // Test world endpoints + ut_assert("declination differs more than 0.1 degrees", get_mag_declination(-90.0, 180.0) - 47.0f < 0.1f); + ut_assert("declination differs more than 0.1 degrees", get_mag_declination(-90.0, -180.0) - 47.0f < 0.1f); + ut_assert("declination differs more than 0.1 degrees", get_mag_declination(90.0, -180.0) - 3.0f < 0.1f); + ut_assert("declination differs more than 0.1 degrees", get_mag_declination(90.0, 180.0) - 3.0f < 0.1f); return true; }