Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAV_CMD_NAV_LOITER_TIME: xtrack, improve definition #1402

Merged
merged 6 commits into from
Jun 24, 2020

Conversation

hamishwillee
Copy link
Collaborator

This follows from discussion of xtrack in #1383 (comment) (and the dev call).

@auturgy Does this capture what you meant? I hope to have diagrams in the guide too.

@sfuhrer This clarifies what the angles and "system yaw" mean. The confusion before was because the value defines either the xtrack path or the xtrack exit location, depending on value.

The Xtrack is the path that the vehicle will take/converge towards between the current and next waypoints. The center xpath is the path between the centers of the waypoints. So if you set 0 you're not saying where you'll exit the path, just that you'll converge towards the center.

If you set 1 you're defining the xpath to be from where the vehicle leaves the loiter to the center of the next waypoint.

Any other value is an exit location to the center xpath - it if 45, you're saying that the vehicle will leave the loiter when the angle from the loiter tangent to the center xpath is 45 degrees, and converge to the center xpath. This is actually useful :-). Make sense?

@sfuhrer
Copy link
Contributor

sfuhrer commented Jun 22, 2020

Any other value is an exit location to the center xpath - it if 45, you're saying that the vehicle will leave the loiter when the angle from the loiter tangent to the center xpath is 45 degrees, and converge to the center xpath. This is actually useful :-). Make sense?

Aha, I had thought that the manually entered value only refers to MC (=desired yaw after leaving the loiter). So how does this then now work for MC (as then you don't have any loiter circle)?

@hamishwillee
Copy link
Collaborator Author

@sfuhrer The xtrack explicitly only applies to forward moving vehicles "For forward-moving aircraft this sets xtrack path or exit location". So "not applicable".

This otherwise looks OK?

Copy link
Contributor

@sfuhrer sfuhrer left a comment

Choose a reason for hiding this comment

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

Yes, all good, thanks!

<param index="1" label="Heading Required" minValue="0" maxValue="1" increment="1">Heading Required (0 = False)</param>
<param index="2" label="Radius" units="m">Radius. If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.</param>
<description>Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint.</description>
<param index="1" label="Heading Required" minValue="0" maxValue="1" increment="1">Leave loiter circle only once heading towards the next waypoint (0 = False)</param>
Copy link
Collaborator Author

@hamishwillee hamishwillee Jun 23, 2020

Choose a reason for hiding this comment

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

MAV_CMD_NAV_LOITER_TO_ALT is inconsistent - all the other loiters have heading at 2, and radius at 3. Is it possible to change this for consistency? @auturgy @sfuhrer

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@magicrub @WickedShell @sfuhrer Would it be possible/manageable to change the MAV_CMD_NAV_LOITER_TO_ALT to move the param 1 and param 2 down one slot.
This would make the user of params consistent across all the loiter messages.

By no means critical of course, so this is an "estimate of impact".

Copy link
Contributor

Choose a reason for hiding this comment

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

I would also prefer to have it consistent, and feel like impact is acceptable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK. I'll merge this and create a separate dedicated PR for discussion.

<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" label="Xtrack Location">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="2" label="Heading Required" minValue="0" maxValue="1" increment="1">Leave loiter circle only once heading towards the next waypoint (0 = False)</param>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sfuhrer Note, added heading here as was missing. OK?

Copy link
Contributor

Choose a reason for hiding this comment

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

Guess that makes perfect sense, yes 👍

<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" label="Xtrack Location">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="2" label="Heading Required" minValue="0" maxValue="1" increment="1">Leave loiter circle only once heading towards the next waypoint (0 = False)</param>
Copy link
Contributor

Choose a reason for hiding this comment

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

Guess that makes perfect sense, yes 👍

@hamishwillee hamishwillee merged commit 4411c23 into master Jun 24, 2020
amilcarlucas pushed a commit to ArduPilot/mavlink that referenced this pull request Sep 22, 2020
amilcarlucas pushed a commit to amilcarlucas/mavlink that referenced this pull request Sep 25, 2020
amilcarlucas pushed a commit to amilcarlucas/mavlink that referenced this pull request Sep 29, 2020
amilcarlucas pushed a commit to amilcarlucas/mavlink that referenced this pull request Oct 5, 2020
amilcarlucas pushed a commit to amilcarlucas/mavlink that referenced this pull request Nov 18, 2020
@hamishwillee hamishwillee deleted the hamishwillee-xtrack branch October 14, 2021 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants