Rev 1960 | Rev 1964 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1960 | Rev 1961 | ||
---|---|---|---|
Line 217... | Line 217... | ||
217 | extern volatile uint16_t gyroNoisePeak[2]; |
217 | extern volatile uint16_t gyroNoisePeak[2]; |
218 | extern volatile uint16_t accNoisePeak[2]; |
218 | extern volatile uint16_t accNoisePeak[2]; |
Line 219... | Line 219... | ||
219 | 219 | ||
220 | /* |
220 | /* |
221 | * Air pressure. |
221 | * Air pressure. |
222 | * The sensor has a sensitivity of 46 mV/kPa. |
222 | * The sensor has a sensitivity of 45 mV/kPa. |
223 | * An approximate p(h) formula is = p(h[m])[Pa] = p_0 - 11.95 * 10^-3 * h |
223 | * An approximate p(h) formula is = p(h[m])[Pa] = p_0 - 11.95 * 10^-3 * h |
224 | * That is: dV = 46 mV * 11.95 * 10^-3 dh = 0.5497 mV / m. |
224 | * That is: dV = 45 mV * 11.95 * 10^-3 dh = 0.53775 mV / m. |
225 | * That is, with 2 * 1.024 / 3 steps per mV: 0.037 steps / m |
225 | * That is, with 1.024 / 3 steps per mV: 0.183552 steps / m |
226 | */ |
226 | */ |
227 | #define AIRPRESSURE_SUMMATION_FACTOR 16 |
227 | #define AIRPRESSURE_SUMMATION_FACTOR 54 |
228 | #define AIRPRESSURE_FILTER 8 |
228 | #define AIRPRESSURE_FILTER 8 |
229 | // Minimum A/D value before a range change is performed. |
229 | // Minimum A/D value before a range change is performed. |
230 | #define MIN_RAWPRESSURE (200 * 2) |
230 | #define MIN_RAWPRESSURE (200 * 2) |
231 | // Maximum A/D value before a range change is performed. |
231 | // Maximum A/D value before a range change is performed. |
Line 259... | Line 259... | ||
259 | * Process the sensor data to update the exported variables. Must be called after each measurement cycle and before the data is used. |
259 | * Process the sensor data to update the exported variables. Must be called after each measurement cycle and before the data is used. |
260 | */ |
260 | */ |
261 | void analog_update(void); |
261 | void analog_update(void); |
Line 262... | Line 262... | ||
262 | 262 | ||
263 | /* |
263 | /* |
264 | * "Warm" calibration: Zero-offset gyros. |
264 | * Read gyro and acc.meter calibration from EEPROM. |
265 | */ |
265 | */ |
Line 266... | Line 266... | ||
266 | void analog_calibrate(void); |
266 | void analog_setNeutral(void); |
- | 267 | ||
- | 268 | /* |
|
- | 269 | * Zero-offset gyros and write the calibration data to EEPROM. |
|
- | 270 | */ |
|
- | 271 | void analog_calibrateGyros(void); |
|
267 | 272 | ||
268 | /* |
273 | /* |
269 | * "Cold" calibration: Zero-offset accelerometers and write the calibration data to EEPROM. |
274 | * Zero-offset accelerometers and write the calibration data to EEPROM. |
270 | */ |
275 | */ |