|
|
@ -26,6 +26,7 @@ void Location::zero(void) |
|
|
|
memset(this, 0, sizeof(*this)); |
|
|
|
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) |
|
|
|
Location::Location(int32_t latitude, int32_t longitude, int32_t alt_in_cm, AltFrame frame) |
|
|
|
{ |
|
|
|
{ |
|
|
|
zero(); |
|
|
|
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); |
|
|
|
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
|
|
|
|
// 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
|
|
|
|
// calculate lat, lon
|
|
|
|
Location ekf_origin; |
|
|
|
Location ekf_origin; |
|
|
|