mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
wind_estimator always copy attitude and local position data
This commit is contained in:
@@ -174,13 +174,13 @@ WindEstimatorModule::Run()
|
|||||||
|
|
||||||
vehicle_attitude_s att{};
|
vehicle_attitude_s att{};
|
||||||
|
|
||||||
if (_vehicle_attitude_sub.update(&att)) {
|
if (_vehicle_attitude_sub.copy(&att)) {
|
||||||
att_valid = (time_now_usec - att.timestamp < 1_s) && (att.timestamp > 0);
|
att_valid = (time_now_usec - att.timestamp < 1_s) && (att.timestamp > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
vehicle_local_position_s lpos{};
|
vehicle_local_position_s lpos{};
|
||||||
|
|
||||||
if (_vehicle_local_position_sub.update(&lpos)) {
|
if (_vehicle_local_position_sub.copy(&lpos)) {
|
||||||
lpos_valid = (time_now_usec - lpos.timestamp < 1_s) && (lpos.timestamp > 0) && lpos.v_xy_valid;
|
lpos_valid = (time_now_usec - lpos.timestamp < 1_s) && (lpos.timestamp > 0) && lpos.v_xy_valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user