AP_Math: move location define to Location class

This commit is contained in:
Pierre Kancir 2019-04-12 10:35:30 +02:00 committed by Andrew Tridgell
parent 65b4ba0539
commit ff4587a33a
2 changed files with 6 additions and 7 deletions

View File

@ -114,4 +114,10 @@ public:
private:
static AP_Terrain *_terrain;
// scaling factor from 1e-7 degrees to meters at equator
// == 1.0e-7 * DEG_TO_RAD * RADIUS_OF_EARTH
static constexpr float LOCATION_SCALING_FACTOR = 0.011131884502145034f;
// inverse of LOCATION_SCALING_FACTOR
static constexpr float LOCATION_SCALING_FACTOR_INV = 89.83204953368922f;
};

View File

@ -4,13 +4,6 @@
#include "vector2.h"
#include "vector3.h"
#include <AP_Common/Location.h>
// scaling factor from 1e-7 degrees to meters at equator
// == 1.0e-7 * DEG_TO_RAD * RADIUS_OF_EARTH
#define LOCATION_SCALING_FACTOR 0.011131884502145034f
// inverse of LOCATION_SCALING_FACTOR
#define LOCATION_SCALING_FACTOR_INV 89.83204953368922f
/*
* LOCATION