Closed lyc11776611 closed 2 years ago
This library does not provide altitude, only the pressure.
I have implemented a hypsometric equation in the tick function to calculate altitude, not sure if that's what we want though. Hopefully the log() in the tickFunction is not too much of a stall for the system. The units are sorted out and output is in meter. Also, the contants hardcoded in the program will need some justification in higher altitude, which may involve more complex program (e.g. https://en.wikipedia.org/wiki/Barometric_formula, for different range of altitude there's different constants). Currently, based on the constant given in this website, the error from 10km to 71km ranges from ~1.5km to ~7km. Beneath 10km it should be more accurate.
Added barometer (MS5611) library and datalog functions.