geo: remove dependency on drv_hrt time driver

This commit is contained in:
Matthias Grob
2024-10-04 14:45:57 +02:00
committed by Mathieu Bresciani
parent f971c0e617
commit fd04ece6d4
9 changed files with 13 additions and 34 deletions
@@ -623,7 +623,7 @@ bool FlightTaskAuto::_evaluateGlobalReference()
}
// init projection
_reference_position.initReference(ref_lat, ref_lon);
_reference_position.initReference(ref_lat, ref_lon, _time_stamp_current);
// check if everything is still finite
return PX4_ISFINITE(_reference_altitude) && PX4_ISFINITE(ref_lat) && PX4_ISFINITE(ref_lon);
@@ -231,7 +231,8 @@ void TargetEstimator::measurement_update(follow_target_s follow_target)
// Decompose follow_target message into the individual measurements for position and velocity
const Vector3f vel_measured{follow_target.vx, follow_target.vy, follow_target.vz};
Vector3f pos_measured{NAN, NAN, -(follow_target.alt - _vehicle_local_position.ref_alt)};
_reference_position.initReference(_vehicle_local_position.ref_lat, _vehicle_local_position.ref_lon);
_reference_position.initReference(_vehicle_local_position.ref_lat, _vehicle_local_position.ref_lon,
hrt_absolute_time());
_reference_position.project(follow_target.lat, follow_target.lon, pos_measured(0), pos_measured(1));
// Initialize filter if necessary