mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 13:37:33 +08:00
follow_target: copy also velocity fields from uorb
This commit is contained in:
committed by
Daniel Agar
parent
2d6bc9b6e0
commit
5f19eeaaa5
@@ -118,7 +118,7 @@ void FollowTarget::on_active()
|
|||||||
_current_target_motion = target_motion;
|
_current_target_motion = target_motion;
|
||||||
}
|
}
|
||||||
|
|
||||||
_current_target_motion.timestamp = target_motion.timestamp;
|
_current_target_motion = target_motion;
|
||||||
_current_target_motion.lat = (_current_target_motion.lat * (double)_responsiveness) + target_motion.lat * (double)(
|
_current_target_motion.lat = (_current_target_motion.lat * (double)_responsiveness) + target_motion.lat * (double)(
|
||||||
1 - _responsiveness);
|
1 - _responsiveness);
|
||||||
_current_target_motion.lon = (_current_target_motion.lon * (double)_responsiveness) + target_motion.lon * (double)(
|
_current_target_motion.lon = (_current_target_motion.lon * (double)_responsiveness) + target_motion.lon * (double)(
|
||||||
|
|||||||
Reference in New Issue
Block a user