geo: remove dependency on drv_hrt time driver

This commit is contained in:
Matthias Grob
2024-10-04 14:45:57 +02:00
committed by Mathieu Bresciani
parent f971c0e617
commit fd04ece6d4
9 changed files with 13 additions and 34 deletions
+2 -25
View File
@@ -48,8 +48,6 @@
#include <stdbool.h>
#include <stdint.h>
#include <drivers/drv_hrt.h>
#include <lib/mathlib/mathlib.h>
#include <lib/matrix/matrix/math.hpp>
@@ -171,15 +169,7 @@ public:
/**
* @brief Construct and initialize a new Map Projection object
*/
MapProjection(double lat_0, double lon_0)
{
initReference(lat_0, lon_0);
}
/**
* @brief Construct and initialize a new Map Projection object
*/
MapProjection(double lat_0, double lon_0, uint64_t timestamp)
MapProjection(double lat_0, double lon_0, uint64_t timestamp = 0)
{
initReference(lat_0, lon_0, timestamp);
}
@@ -192,20 +182,7 @@ public:
* @param lat in degrees (47.1234567°, not 471234567°)
* @param lon in degrees (8.1234567°, not 81234567°)
*/
void initReference(double lat_0, double lon_0, uint64_t timestamp);
/**
* Initialize the map transformation
*
* with reference coordinates on the geographic coordinate system
* where the azimuthal equidistant plane's origin is located
* @param lat in degrees (47.1234567°, not 471234567°)
* @param lon in degrees (8.1234567°, not 81234567°)
*/
inline void initReference(double lat_0, double lon_0)
{
initReference(lat_0, lon_0, hrt_absolute_time());
}
void initReference(double lat_0, double lon_0, uint64_t timestamp = 0);
/**
* @return true, if the map reference has been initialized before