PaulStoffregen / NXPMotionSense

NXP Motion Sensors for Teensy and Arduino
69 stars 51 forks source link

added faster baro reads #15

Open radiohound opened 1 year ago

radiohound commented 1 year ago

Added functions to allow for faster barometer reads, and set overSampleRate. Used some of Mjs513's https://github.com/PaulStoffregen/NXPMotionSense/pull/10 suggested changes, like setting local baro pressure, etc, plus added a few more. These changes let you to start an altitude calculation in your code with toggleOneShot() prior to calling readOneShotAlt() , which allows your code to do something else while waiting for altitude results. Since faster readings require less oversampling, a new kalman filter for altitude was added. In the Attitude_AltitudeData2 example, a circular buffer also helps filter the altitude readings. A few typo edits were made to NXPSensorRegisters.h. A rocket image for the .pde orientation view was added, which displays the altitude and attitude of your board.