Skip to content

common.xml: update description of xtrack-loc in MAV_CMD_NAV_LOITER_*#495

Open
peterbarker wants to merge 2 commits intoArduPilot:masterfrom
peterbarker:pr/xtrack-description
Open

common.xml: update description of xtrack-loc in MAV_CMD_NAV_LOITER_*#495
peterbarker wants to merge 2 commits intoArduPilot:masterfrom
peterbarker:pr/xtrack-description

Conversation

@peterbarker
Copy link
Copy Markdown

Synchronises us with mavlink/mavlink/master

I think this is just more words which say much the same thing, if a bit more precisely.

Comment thread message_definitions/v1.0/common.xml Outdated
<param index="2">Empty</param>
<param index="3" label="Radius" units="m">Radius around waypoint. If positive loiter clockwise, else counter-clockwise</param>
<param index="4">Forward moving aircraft this sets exit xtrack location: 0 for center of loiter wp, 1 for exit location. Else, this is desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).</param>
<param index="4" label="Xtrack Location">Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.</param>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is pretty bizarre, we better confirm someone really does this and wants to keep doing it!

Copy link
Copy Markdown

@hamishwillee hamishwillee Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definition has been there forever - the change just makes it clear what means. From Mission > loiter commands this allows callers to specify the angle (and hence how quickly the vehicle converges to the center xtrack).
FMI, why is it bizarre to grant some control over how you converge to the centre x-track?

PX4 does not use this - it tests the parameter against 0 (centre x-track) and treats anything else (>0) as the 1 value (implementation). Given the implementation, using this "feature" would be hard for PX4 to adopt safely.

In any case, if no one wants it or is using it then simplifying the specification is a good thing to do.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definition has been there forever - the change just makes it clear what means. From Mission > loiter commands this allows callers to specify the angle (and hence how quickly the vehicle converges to the center xtrack). FMI, why is it bizarre to grant some control over how you converge to the centre x-track?

This bizarre thing is adding the "any value other than 0 or 1 is the angle to leave the circle" bit. I have adjusted this patch set to remove that bit. A better implementation would probably have been, "if 2 then see param2 for the angle at which the vehicle should leave the circle" sort of thing.

PX4 does not use this - it tests the parameter against 0 (centre x-track) and treats anything else (>0) as the 1 value (implementation). Given the implementation, using this "feature" would be hard for PX4 to adopt safely.

In any case, if no one wants it or is using it then simplifying the specification is a good thing to do.

Simplified here!

Do you want me to PR the same change in mavlink/mavlink/master?

image

@peterbarker peterbarker force-pushed the pr/xtrack-description branch from 5991ec8 to 9c70b38 Compare April 9, 2026 01:59
@peterbarker peterbarker force-pushed the pr/xtrack-description branch from 9c70b38 to 7fcb5bb Compare April 9, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants