Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MS5637 by
ms5637 Class Reference
Create ms5637 controller class. More...
#include <ms5637.h>
Public Member Functions | |
| ms5637 (PinName sda, PinName scl) | |
| Create a MS5637 object using the specified I2C object. | |
| void | cmd_reset () |
| Initialize the MS5637 and set up the coefficients First - reset the MS5637 Second - load coefficient values from the MS5637 PROM Third - calculate coefficient checksum This routine only needs to be run once at boot up. | |
| double | calcTemp () |
| Calculate and return compensated temperature Returns double temperature in degC. | |
| double | calcPressure () |
| Calculate and return compensated barometric pressure Returns double pressure in millibars. | |
| double | getPressure () |
| Return compensated barometric pressure Returns double pressure in millibars DOES NOT RE-CALCULATE FIRST!!! Saves time if you calcTemp(); first. | |
| float | getAltitudeFT (float sea_pressure) |
| Calculate and returns altitude in feet Returns float altitude in feet. | |
| float | getSeaLevelBaroFT (float known_alt) |
| Calculate and returns sea level baro Returns float seal level barometer in feet. | |
| float | getSeaLevelBaroM (float known_alt) |
| Calculate and returns sea level baro Returns float seal level barometer in meters. | |
Detailed Description
Create ms5637 controller class.
- Parameters:
-
ms5637 class
Definition at line 97 of file ms5637.h.
Constructor & Destructor Documentation
| ms5637 | ( | PinName | sda, |
| PinName | scl | ||
| ) |
Create a MS5637 object using the specified I2C object.
- Parameters:
-
constructor,- the I2C object to communicate with
Definition at line 30 of file ms5637.cpp.
Member Function Documentation
| double calcPressure | ( | ) |
Calculate and return compensated barometric pressure Returns double pressure in millibars.
calculate pressure
- Parameters:
-
NONE
- Returns:
- double barometric pressure millibar
Definition at line 305 of file ms5637.cpp.
| double calcTemp | ( | ) |
Calculate and return compensated temperature Returns double temperature in degC.
calculate temperature
- Parameters:
-
NONE
- Returns:
- double temperature degC
Definition at line 294 of file ms5637.cpp.
| void cmd_reset | ( | ) |
Initialize the MS5637 and set up the coefficients First - reset the MS5637 Second - load coefficient values from the MS5637 PROM Third - calculate coefficient checksum This routine only needs to be run once at boot up.
send reset sequence
- Parameters:
-
NONE
- Returns:
- none
Definition at line 117 of file ms5637.cpp.
| float getAltitudeFT | ( | float | sea_pressure ) |
Calculate and returns altitude in feet Returns float altitude in feet.
get altitude from known sea level barometer, @ no pre-pressure calculation
- Parameters:
-
float known pressure (mB) at sea level
float sea level barometer
- Returns:
- float altitude in feet
Definition at line 329 of file ms5637.cpp.
| double getPressure | ( | ) |
Return compensated barometric pressure Returns double pressure in millibars DOES NOT RE-CALCULATE FIRST!!! Saves time if you calcTemp(); first.
get pressure, no calculation
- Parameters:
-
NONE
- Returns:
- double barometric pressure millibar
Definition at line 316 of file ms5637.cpp.
| float getSeaLevelBaroFT | ( | float | known_alt ) |
Calculate and returns sea level baro Returns float seal level barometer in feet.
get sea level pressure from known altitude(ft), @ no pre-pressure calculation
- Parameters:
-
float known altitude in feet
float known altitude in feet
- Returns:
- float seal level barometer in mb
Definition at line 342 of file ms5637.cpp.
| float getSeaLevelBaroM | ( | float | known_alt ) |
Calculate and returns sea level baro Returns float seal level barometer in meters.
get sea level pressure from known altitude(m), @ no pre-pressure calculation
- Parameters:
-
float known altitude in meters
float known altitude in meters
- Returns:
- float seal level barometer in mb
Definition at line 355 of file ms5637.cpp.
Generated on Tue Jul 12 2022 21:47:37 by
1.7.2
