dune
dune copied to clipboard
Various fixes/enhancements to FollowReference/UAV
9d0a5e3 fixes what seems to be a typo (&& instead of ||)
f41de2d reorders signalError and a dispatch, as the message was never dispatched
The two other commits are more of a design question, I guess, but the current master code is ambigous:
- currently, we are waiting for a FollowReference message, and are not accepting any other messages.
- once the FollowReference is activated, the first DesiredPath is dispatched. But since we have not received any EstimatedState or Reference yet, lat/lon/height is zero.
There are two ways to fix this:
- always consume EstimatedState (9233527). Then, upon FollowReference activation, the current position is dispatched as lat/lon/height. This is in my eyes less than ideal, which is why I suggest
- always consume EstimatedState and Reference (9233527 and b59f972). Store Reference as it is received. Upon FollowReference activation, check if the previous Reference came from an authorized source. If it did; use it, if not; use EstimatedState.
Tested in flight