Reference point state->z

Firmware/software/electronics/mechanics
Post Reply
Max_Kemmeren
Member
Posts: 40
Joined: Wed Jan 20, 2021 4:03 pm

Reference point state->z

Post by Max_Kemmeren »

Hi,

I have a quick question about the height state z. I have a crazyflie with flowdeck. When i read out state->z I get the height of the crazyflie. My question is from where is this height measured? Is it from the ground upto the flowdeck, or upto the main board or maybe even the battery?

Can someone help me?

Greetings
Max
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: Reference point state->z

Post by jonasdn »

Hi Max!

It is the height to the VL53L1 time-of-flight sensor on the flowdeck, no magic!

Jonas
Max_Kemmeren
Member
Posts: 40
Joined: Wed Jan 20, 2021 4:03 pm

Re: Reference point state->z

Post by Max_Kemmeren »

Okay, so the state is in body frame of reference?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Reference point state->z

Post by kimberly »

Hi Max!

No, the z position is in global reference frame. Here in the code you can see that it is being compensated for the body's rotations.

Also some interesting documentation, see here for generated doc for the state-estimate log has a list of the state variables. It is good to know is that the kalman filter uses a different state internally (here the velocities are in body axis), but before it is copied to the generic state structure, everything in body coordinate system is rotated to world coordinates here in the code.
Post Reply