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

Position Hold wiki page #494

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

ctzsnooze
Copy link
Member

@ctzsnooze ctzsnooze commented Dec 8, 2024

First draft of a page for Altitude Hold and Position hold.
Needs work.

direct link: https://deploy-preview-494.dev.web.betaflight.com/docs/wiki/guides/current/Position-Hold-v4-6

Copy link

netlify bot commented Dec 8, 2024

Deploy Preview for origin-betaflight-com ready!

Name Link
🔨 Latest commit dabeb91
🔍 Latest deploy log https://app.netlify.com/sites/origin-betaflight-com/deploys/67620a82c9e07200086e24ba
😎 Deploy Preview https://deploy-preview-494.dev.web.betaflight.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

- Ideally, include a Magnetometer and verify that it is working properly
- Set the hover throttle value accurately
- Enable both Altitude Hold and Position Hold on the same Mode switch
- Hover the quad and test carefully; the aircraft will be in Angle mode and stick responses will be different from usual.
Copy link
Member

Choose a reason for hiding this comment

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

I've seen questions about how to tune angle-mode rates. is there a document and should it be linked here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably should have a document about Angle and Horizon modes, generally, where we could include tuning, rates and info about feedforward in Angle mode and how Horizon mode works. Angle mode is a lot different now than it was.

@nerdCopter
Copy link
Member

requesting 2 counts of centre to be spelled as center.


Altitude Hold can be installed and tested independently of Position Hold.

Altitude Hold is intended to keep the quad at a constant altitude, automatically adjusting the throttle as required. The throttle must either be set to zero, or put somewhere within a deadband either side of the normal hover point, for the altitude to be kept stable. The target altitude can be adjusted up or down by putting the throttle above, or below, the deadband.
Copy link
Contributor

Choose a reason for hiding this comment

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

'either be set to zero' - this is so counterintuitive

Copy link
Member Author

Choose a reason for hiding this comment

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

It's how the code currently works - and the guide should explain how it works.
Most pilots get accustomed to this behaviour fairly quickly.
It's definitely nice to be able to quickly jam throttle to zero and be sure the quad won't climb or fall. Otherwise if the throttle deadband is configured to be fairly narrow, and the pilot in a hurry to hold altitude, they can accidentally find the quad climbing or descending because throttle was accidentally outside deadband.
Being able to just jam throttle to zero and have it reliably still is actually very handy, and worth the inconsistency.


When active, if the throttle is kept within a deadband around the normal hover throttle stick position, the aircraft should maintain constant altitude.

If the pilot wants to adjust the altitude to a higher value, they should bring the throttle above the deadband zone, and vice versa. The aircraft responds by climbing at a velocity that is proportional to stick position. At full throttle, the aircraft will climb at a steady rate of only 5m/s. If throttle is below the deadband, the aircraft will descend at a steady rate.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
If the pilot wants to adjust the altitude to a higher value, they should bring the throttle above the deadband zone, and vice versa. The aircraft responds by climbing at a velocity that is proportional to stick position. At full throttle, the aircraft will climb at a steady rate of only 5m/s. If throttle is below the deadband, the aircraft will descend at a steady rate.
If the pilot wants to adjust the altitude to a higher value, they should bring the throttle above the deadband zone, and vice versa. The aircraft responds by climbing at a velocity that is proportional to stick position. At full throttle, the aircraft will climb at a steady rate defined in alt_hold_adjust_rate, which is 5m/s by default. If throttle is below the deadband, the aircraft will descend with same logic.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, updated

- A `POS HOLD FAIL` message will appear in the OSD if Position Hold is attempted but any of the above checks fail.
- if there is no Mag, and the GPS has not yet provided a workable heading because the aircraft has not been flown cleanly pitched forward for long enough, or not fast enough
- when there is a Mag, and it is needed because the GPS Heading is not available as a fallback (see above), or the Mag is 'not healthy', ie broken, or has never been calibrated.
- A `POS HOLD FAIL` message will appear in the OSD if Position Hold is attempted and any of the above checks fail.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- A `POS HOLD FAIL` message will appear in the OSD if Position Hold is attempted and any of the above checks fail.
- a `POS HOLD FAIL` message will appear in the OSD if Position Hold is attempted and any of the above checks fail.

Copy link
Member Author

Choose a reason for hiding this comment

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

See next commit for a workaround here.

Copy link
Member

@nerdCopter nerdCopter left a comment

Choose a reason for hiding this comment

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

  • approving for workflow. i see it is labeled draft 1.1 in the document itself.

@haslinghuis haslinghuis merged commit b432c7c into betaflight:master Dec 20, 2024
10 checks passed
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.

4 participants