This is in reference to the MS5803-14BA.cpp and .h files on the OpenROV Github repository.
I've recently been fooling around the the Measurement Specialties MS5803 pressure sensor, like that used on the OpenROV IMU board. Along the way I hit some issues with the pressures jumping around on my sensor, which I traced back to my original library code using float variables when it should have been using 64-bit integers to do the temperature compensation.
The current OpenROV files for that sensor also use a bunch of float values that will generate rollovers and cause pressure values to deviate from the true values. I've since revamped my library for the MS5803-14BA (and the other MS5803 models) to do all of the calculations properly and avoid those jumps in the pressure value. The rollovers can lead to deviations in the 2-20mbar range over the normal range of operating temperatures, although the pressure maybe off as much as 100mbar if you manage to land exactly on one of the very narrow temperature ranges where the variable rollovers matter most.
If you want to see how the Arduino math problems manifest themselves, I have a blog post here: http://lukemiller.org/index.php/2014/04/arduino-code-for-ms5803-pressure-sensors/ describing how the two methods of carrying out the math (float vs. int64_t) compare. The attached figure shows the deviations.
My library for the MS5803-14BA is here: https://github.com/millerlp/MS5803_14, and there are separate repositories for the other pressure models. The library can't be seamlessly inserted into the existing OpenROV codebase as-is with the way the existing ROV code is arranged, but I hope you all find it helpful enough to use as a guide for your purposes.
648-FixedD1varyD2.png (14.9 KB)