2015-01-02 17:44:28 -05:00
|
|
|
#include <math.h>
|
2014-04-28 20:29:45 +02:00
|
|
|
#include <stdio.h>
|
2015-03-02 14:32:39 -05:00
|
|
|
#include <stdlib.h>
|
2014-04-28 20:29:45 +02:00
|
|
|
#include <string.h>
|
2015-01-02 17:44:28 -05:00
|
|
|
#include <unistd.h>
|
|
|
|
|
|
2014-04-28 20:29:45 +02:00
|
|
|
#include <drivers/drv_hrt.h>
|
2014-04-28 20:42:46 +02:00
|
|
|
#include <geo/geo.h>
|
2015-01-02 17:44:28 -05:00
|
|
|
#include <px4iofirmware/px4io.h>
|
|
|
|
|
#include <systemlib/err.h>
|
|
|
|
|
#include <systemlib/mixer/mixer.h>
|
2014-04-28 20:29:45 +02:00
|
|
|
|
2015-01-02 17:44:28 -05:00
|
|
|
#include "gtest/gtest.h"
|
2014-12-20 18:51:31 +01:00
|
|
|
|
2015-03-02 14:32:39 -05:00
|
|
|
TEST(AutoDeclinationTest, AutoDeclination)
|
|
|
|
|
{
|
2015-01-02 17:44:28 -05:00
|
|
|
ASSERT_NEAR(get_mag_declination(47.0, 8.0), 0.6, 0.5) << "declination differs more than 1 degree";
|
2014-05-03 12:40:11 +02:00
|
|
|
}
|