Closed gon1332 closed 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.
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.
@gon1332 glad I could help! 👍
Shouldn't the line: https://github.com/juangallostra/AltitudeEstimation/blob/32a398f8cfe01b1153941e64cab3a86d06e94e93/extras/main.py#L82
be written as:
baro = data[-1]
?