27 # define debug(fmt, args ...) do {printf("%s:%d: " fmt "\n", __FUNCTION__, __LINE__, ## args); } while(0) 29 # define debug(fmt, args ...) 89 return powf(
MAX(temp -
Tzero, 0), exponent);
120 for (uint16_t i=0; i<
learn_i; i++) {
144 if (test_err >= current_err) {
150 test_err < current_err) {
152 debug(
"CAL: %.2f\n", test_exponent);
177 debug(
"learn reset\n");
const float min_learn_temp_range
bool get_soft_armed() const
const float exp_limit_min
void calculate_calibration()
void learn_calibration(void)
#define AP_PARAM_FLAG_ENABLE
float get_temperature(void) const
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
void apply_calibration(void)
#define AP_GROUPINFO(name, idx, clazz, element, def)
#define debug(fmt, args ...)
void set_pressure_correction(uint8_t instance, float p_correction)
static auto MAX(const A &one, const B &two) -> decltype(one > two ? one :two)
#define AP_GROUPINFO_FLAGS(name, idx, clazz, element, def, flags)
bool is_zero(const T fVal1)
const float exp_limit_max
float get_pressure(void) const
std::enable_if< std::is_integral< typename std::common_type< Arithmetic1, Arithmetic2 >::type >::value,bool >::type is_equal(const Arithmetic1 v_1, const Arithmetic2 v_2)
static const struct AP_Param::GroupInfo var_info[]
float calculate_p_range(float baro_factor) const
float calculate_correction(float temp, float exponent) const
void setup_learning(void)
AP_InertialSensor & ins()