juangallostra / AltitudeEstimation

A two-step Kalman/Complementary filter for Estimation of Vertical Position using an IMU-Barometer sytem
MIT License
58 stars 20 forks source link

extras: Possible typo in sensor readings #16

Closed gon1332 closed 4 years ago

gon1332 commented 4 years ago

Shouldn't the line: https://github.com/juangallostra/AltitudeEstimation/blob/32a398f8cfe01b1153941e64cab3a86d06e94e93/extras/main.py#L82

be written as:

baro = data[-1]?

juangallostra commented 4 years ago

@gon1332 I haven't reviewed this code in a long time so I might be wrong, but if I am not mistaken the expected format for the data received via serial is: ax, ay, az, gx, gy, gz, pressure, timestamp. If this is correct then baro = data[-2] is indeed the correct way to retrieve barometric data. However, you can change it to match the data received bya serial.

gon1332 commented 4 years ago

Thanks a lot. Now this makes sense. I am planning to test your code with inputs not taken by Hackflight. Now I saw your README where you specify this.

juangallostra commented 4 years ago

@gon1332 glad I could help! 👍