Page 1 of 1

Reference point state->z

Posted: Thu Sep 23, 2021 3:06 pm
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

Re: Reference point state->z

Posted: Mon Sep 27, 2021 6:58 am
by jonasdn
Hi Max!

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

Jonas

Re: Reference point state->z

Posted: Mon Sep 27, 2021 8:32 am
by Max_Kemmeren
Okay, so the state is in body frame of reference?

Re: Reference point state->z

Posted: Mon Sep 27, 2021 12:58 pm
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.