Skip to content

How to set the initial z-value? #1628

Answered by gemenerik
whY-note asked this question in Q&A
Discussion options

You must be logged in to vote

To achieve a more consistent initial z-value, you can try dynamically setting the barometer bias upon initialization. During startup, read the current barometer value and use it as a baseline or bias for altitude calculations. This way, each time the Crazyflie initializes, it will account for the ambient pressure and start with a z-value close to zero, minimizing discrepancies across power cycles.

Keep in mind that without any expansion decks, the Crazyflie will likely experience noticeable drift in both the X and Y axes due to the lack of external positioning references. Additionally, the barometer alone has limited precision on the Z-axis. For more accurate position tracking, you might …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@whY-note
Comment options

@gemenerik
Comment options

Answer selected by gemenerik
@whY-note
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants