37 bool valid_input_data =
true;
50 valid_input_data =
false;
55 valid_input_data =
false;
60 valid_input_data =
false;
65 valid_input_data =
false;
81 float data_min = ((longitude_deg - min_lon) /
SAMPLING_RES) * (data_se - data_sw) + data_sw;
82 float data_max = ((longitude_deg - min_lon) /
SAMPLING_RES) * (data_ne - data_nw) + data_nw;
84 intensity_gauss = ((latitude_deg - min_lat) /
SAMPLING_RES) * (data_max - data_min) + data_min;
95 data_min = ((longitude_deg - min_lon) /
SAMPLING_RES) * (data_se - data_sw) + data_sw;
96 data_max = ((longitude_deg - min_lon) /
SAMPLING_RES) * (data_ne - data_nw) + data_nw;
98 declination_deg = ((latitude_deg - min_lat) /
SAMPLING_RES) * (data_max - data_min) + data_min;
109 data_min = ((longitude_deg - min_lon) /
SAMPLING_RES) * (data_se - data_sw) + data_sw;
110 data_max = ((longitude_deg - min_lon) /
SAMPLING_RES) * (data_ne - data_nw) + data_nw;
112 inclination_deg = ((latitude_deg - min_lat) /
SAMPLING_RES) * (data_max - data_min) + data_min;
114 return valid_input_data;
123 float declination_deg=0, inclination_deg=0, intensity_gauss=0;
125 get_mag_field_ef(latitude_deg, longitude_deg, intensity_gauss, declination_deg, inclination_deg);
127 return declination_deg;
static const float inclination_table[19][37]
static const float SAMPLING_MAX_LAT
static const float SAMPLING_MAX_LON
static const float SAMPLING_MIN_LAT
static const float SAMPLING_RES
static const float intensity_table[19][37]
Common definitions and utility routines for the ArduPilot libraries.
static float get_declination(float latitude_deg, float longitude_deg)
static bool get_mag_field_ef(float latitude_deg, float longitude_deg, float &intensity_gauss, float &declination_deg, float &inclination_deg)
static const float SAMPLING_MIN_LON
static const float declination_table[19][37]