YAMSPy icon indicating copy to clipboard operation
YAMSPy copied to clipboard

Altitude reading

Open green-creeper opened this issue 1 year ago • 3 comments

Hi, I'm comparing altitude reading from MSP and one I see in OSD. In static position they match move when I move drone the altitude increases, but slowly climbing back to 0 so that when I put the quad down it becomes negative and starts increasing. Any ideas what's happening?

In MSP reference I see this: image

Maybe parsing is wrong and "vario" affects reading?

green-creeper avatar Feb 08 '24 18:02 green-creeper

So, this seems error in multiwii documentation. It looks like the altitude is in last 4 bytes instead of first 4.

I think this works

self.SENSOR_DATA['altitude'] = round((self.readbytes(data[6:], size=32, unsigned=False) / 100.0), 2)

green-creeper avatar Feb 08 '24 21:02 green-creeper

@yannbouteiller, have you noted this before?

ricardodeazambuja avatar Feb 12 '24 00:02 ricardodeazambuja

No but I encountered issues with altitude on several occasions, might be related.

yannbouteiller avatar Feb 12 '24 00:02 yannbouteiller