pressure.c
uint16_t pressure_to_nn16(int32_t p)
{
    // Calculation according to Bosch data sheet, value/10 rounded
    // TODO most of this is constant
    return (uint16_t) roundf((((float) p) / pow((float)1 - ((float) ALTITUDE_SENSOR_LOCATION / (float) 44330), (float) 5.255)) / 10.f);
}
// NN is normal null, truncate a value like 102464 meaning 1024,64 to 10246 fitting into an uint16_t.
NN is normal null, truncate a value like 102464 meaning 1024,64 to 10246 fitting into an uint16_t.
NN is normal null truncate a value like 102464 meaning 1024 64 to 10246 fitting into an uint16_t .
uint16_t pressure_to_nn16(int32_t p)
{
    return (uint16_t) roundf((((float) p) / pow((float)1 - ((float) ALTITUDE_SENSOR_LOCATION / (float) 44330), (float) 5.255)) / 10.f);
}
uint16_t pressure_to_nn16 ( int32_t p ) { return ( uint16_t ) roundf ( ( ( ( float ) p ) / pow ( ( float ) 1 - ( ( float ) ALTITUDE_SENSOR_LOCATION / ( float ) 44330 ) , ( float ) 5.255 ) ) / 10.f ) ; }
NN is normal null, truncate a value like 102464 meaning 1024,64 to 10246 fitting into an uint16_t.
NN is normal null truncate a value like 102464 meaning 1024 64 to 10246 fitting into an uint16_t .
// Calculation according to Bosch data sheet, value/10 rounded // TODO most of this is constant