albatross / Mbed 2 deprecated LAURUS_program_copy

Dependencies:   ConfigFile SDFileSystem mbed

Fork of LAURUS_program by hiroya taura

myConstants.h

Committer:
ojan
Date:
2015-06-11
Revision:
5:182f6356bce1
Parent:
3:5358a691a100
Child:
9:6d4578dcc1ed

File content as of revision 5:182f6356bce1:

#pragma once

/* Math Constants */
#define NEARLY_ZERO         0.000000001f
#define ZERO_TOLERANCE      0.000001f
#define RAD_TO_DEG          57.2957795f             // 180 / π
#define DEG_TO_RAD          0.0174532925f           // π / 180

/* Accelerometer */
#define ACC_LSB_TO_G        0.0000610351562f        // g/LSB (1/2^14
#define G_TO_MPSS           9.8f                    // (m/s^2)/g

/* Gyro Sensor */
//#define GYRO_LSB_TO_DEG     0.0304878048f           // deg/LSB (1/32.8
#define GYRO_LSB_TO_DEG     0.0152671755f           // deg/LSB (1/65.5
//#define GYRO_LSB_TO_DEG     0.00763358778f          // deg/LSB (1/131

/* Pressure Sensor */
#define PRES_LSB_TO_HPA     0.000244140625f         // hPa/LSB (1/4096

/* Geomagnetic Sensor */
#define MAG_LSB_TO_GAUSS    0.00092f                // Gauss/LSB
#define MAG_MAGNITUDE       0.46f                   // Magnitude of GeoMagnetism (Gauss)
#define MAG_SIN             -0.754709580f           // Sin-Value of Inclination

/* ADC */
#define ADC_LSB_TO_V        0.000050354f            // 3.3(V)/65535(LSB)