px4-firmware/unittests/autodeclination_test.cpp

19 lines
417 B
C++
Raw Normal View History

#include <math.h>
#include <stdio.h>
2015-03-02 15:32:39 -04:00
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <drivers/drv_hrt.h>
2014-04-28 15:42:46 -03:00
#include <geo/geo.h>
#include <px4iofirmware/px4io.h>
#include <systemlib/err.h>
#include <systemlib/mixer/mixer.h>
#include "gtest/gtest.h"
2015-03-02 15:32:39 -04:00
TEST(AutoDeclinationTest, AutoDeclination)
{
ASSERT_NEAR(get_mag_declination(47.0, 8.0), 0.6, 0.5) << "declination differs more than 1 degree";
2014-05-03 07:40:11 -03:00
}