mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 06:11:35 +08:00
Fix initialization of position variable
This commit is contained in:
@@ -2537,6 +2537,8 @@ void AttPosEKF::InitialiseFilter(float (&initvelNED)[3], double referenceLat, do
|
|||||||
|
|
||||||
// we are at reference altitude, so measurement must be zero
|
// we are at reference altitude, so measurement must be zero
|
||||||
hgtMea = 0.0f;
|
hgtMea = 0.0f;
|
||||||
|
posNE[0] = 0.0f;
|
||||||
|
posNE[1] = 0.0f;
|
||||||
|
|
||||||
// the baro offset must be this difference now
|
// the baro offset must be this difference now
|
||||||
baroHgtOffset = baroHgt - referenceHgt;
|
baroHgtOffset = baroHgt - referenceHgt;
|
||||||
|
|||||||
Reference in New Issue
Block a user