Skip to content
Snippets Groups Projects
Commit c6668cae authored by Roman's avatar Roman Committed by tumbili
Browse files

provide ekf2 with eas2tas factor

parent f5730dc7
No related branches found
No related tags found
No related merge requests found
......@@ -476,8 +476,9 @@ void Ekf2::task_main()
}
// read airspeed data if available
if (airspeed_updated) {
_ekf->setAirspeedData(airspeed.timestamp, &airspeed.true_airspeed_m_s); // Only TAS is now fed into the estimator
float eas2tas = airspeed.true_airspeed_m_s / airspeed.indicated_airspeed_m_s;
if (airspeed_updated && airspeed.true_airspeed_m_s > 7.0f) {
_ekf->setAirspeedData(airspeed.timestamp, &airspeed.true_airspeed_m_s, &eas2tas);
}
if (optical_flow_updated) {
......@@ -533,6 +534,7 @@ void Ekf2::task_main()
ctrl_state.q[2] = q(2);
ctrl_state.q[3] = q(3);
// Airspeed - take airspeed measurement directly here as no wind is estimated
if (PX4_ISFINITE(airspeed.indicated_airspeed_m_s) && hrt_absolute_time() - airspeed.timestamp < 1e6
&& airspeed.timestamp > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment