In run.c, AQ determine which altitude to use by gpshacc, is it proper ?
During flight, gps hacc may change, which means that rundata.altpos can change between alt_pos and UKF_ALTITUDE(USE_PRES_ALT).
Yet, there may be difference between them, this can cause a sudden drop or rise on flying.
It is not reasonable.
- Code: Select all
// determine which altitude estimate to use
if (gpsData.hAcc > 0.8f) {
runData.altPos = &ALT_POS;
runData.altVel = &ALT_VEL;
}
else {
runData.altPos = &UKF_ALTITUDE;
runData.altVel = &UKF_VELD;
}
Thanks