High resolution barometer and altimeter using i2c mode

Dependents:   Q2_Stabi

Fork of ms5611 by Kevin Braun

Revision:
5:0d7b229474c6
Parent:
4:f7b0ad1b5751
Child:
6:41c370fa1f7b
diff -r f7b0ad1b5751 -r 0d7b229474c6 ms5611.h
--- a/ms5611.h	Mon May 13 22:27:13 2013 +0000
+++ b/ms5611.h	Fri May 17 16:16:16 2013 +0000
@@ -3,6 +3,14 @@
 
 #include "mbed.h"
 
+
+#define SEA_PRESS   1013.25                 //default sea level pressure level in mb
+#define KNOWNALT    327.0                   //default known altitude, 5200 Franklin Dr., 94588
+#define INHG        0.02952998751           //convert mb to in/Hg constant
+#define MB          33.8638815              //convert in/Hg to mb constant
+#define FTMETERS    0.3048                  //convert feet to meters
+
+
 /** Software routines to access the Measurement Specialties' MS5611-01BA03 
  *  Variometer Module using the I2C bus option.  The MS5611 is a 24 bit 
  *  temperature and pressure transducer for high accuracy Barometer and 
@@ -117,11 +125,23 @@
      */
     double getPressure();
     /** Calculate and returns altitude in feet
-     *    Returns float altitude
+     *    Returns float altitude in feet
      *
-     * @param float pressure (mB) at sea level
+     * @param float known pressure (mB) at sea level
      */
     float getAltitudeFT(float sea_pressure);
+    /** Calculate and returns sea level baro
+     *    Returns float seal level barometer in feet
+     *
+     * @param float known altitude in feet
+     */
+    float getSeaLevelBaroFT(float known_alt);
+    /** Calculate and returns sea level baro
+     *    Returns float seal level barometer in meters
+     *
+     * @param float known altitude in meters
+     */
+    float getSeaLevelBaroM(float known_alt);
     
 private:
     int m_i2c_start(bool readMode);