AP_Common: make Location(Vector3f) require ALTFRAME
This commit is contained in:
parent
cc46483e6c
commit
dce01fbb43
@ -26,6 +26,7 @@ void Location::zero(void)
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
// Construct location using position (NEU) from ekf_origin for the given altitude frame
|
||||
Location::Location(int32_t latitude, int32_t longitude, int32_t alt_in_cm, AltFrame frame)
|
||||
{
|
||||
zero();
|
||||
@ -34,10 +35,10 @@ Location::Location(int32_t latitude, int32_t longitude, int32_t alt_in_cm, AltFr
|
||||
set_alt_cm(alt_in_cm, frame);
|
||||
}
|
||||
|
||||
Location::Location(const Vector3f &ekf_offset_neu)
|
||||
Location::Location(const Vector3f &ekf_offset_neu, AltFrame frame)
|
||||
{
|
||||
// store alt and alt frame
|
||||
set_alt_cm(ekf_offset_neu.z, AltFrame::ABOVE_ORIGIN);
|
||||
set_alt_cm(ekf_offset_neu.z, frame);
|
||||
|
||||
// calculate lat, lon
|
||||
Location ekf_origin;
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
/// constructors
|
||||
Location();
|
||||
Location(int32_t latitude, int32_t longitude, int32_t alt_in_cm, AltFrame frame);
|
||||
Location(const Vector3f &ekf_offset_neu);
|
||||
Location(const Vector3f &ekf_offset_neu, AltFrame frame);
|
||||
|
||||
static void set_terrain(AP_Terrain* terrain) { _terrain = terrain; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user