mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 08:00:34 +08:00
geo: remove dependency on drv_hrt time driver
This commit is contained in:
committed by
Mathieu Bresciani
parent
f971c0e617
commit
fd04ece6d4
+2
-25
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user