diff --git a/conf/flight_plans/standard.xml b/conf/flight_plans/standard.xml
deleted file mode 100644
index ffa5e8dbda..0000000000
--- a/conf/flight_plans/standard.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
-
-#include "subsystems/navigation/nav_line.h"
-#include "datalink.h"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/messages.xml b/conf/messages.xml
index 25b9a4b52d..7cd24d7d60 100644
--- a/conf/messages.xml
+++ b/conf/messages.xml
@@ -574,6 +574,8 @@
+
+
diff --git a/conf/wavecard.xml b/conf/wavecard.xml
deleted file mode 100644
index 431efd5638..0000000000
--- a/conf/wavecard.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0x40, "REQ_WRITE_RADIO_PARAM";
- 0x41, "RES_WRITE_RADIO_PARAM";
- 0x50, "REQ_READ_RADIO_PARAM";
- 0x51, "RES_READ_RADIO_PARAM";
- 0x60, "REQ_SELECT_CHANNEL";
- 0x61, "RES_SELECT_CHANNEL";
- 0x62, "REQ_READ_CHANNEL";
- 0x63, "RES_READ_CHANNEL";
- 0x64, "REQ_SELECT_PHYCONFIG";
- 0x65, "RES_SELECT_PHYCONFIG";
- 0x66, "REQ_READ_PHYCONFIG";
- 0x67, "RES_READ_PHYCONFIG";
- 0x68, "REQ_READ_REMOTE_RSSI";
- 0x69, "RES_READ_REMOTE_RSSI";
- 0x6A, "REQ_READ_LOCAL_RSSI";
- 0x6B, "RES_READ_LOCAL_RSSI";
- 0xA0, "REQ_FIRMWARE_VERSION";
- 0xA1, "RES_ FIRMWARE_VERSION";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/conf/waypoints.xml b/conf/waypoints.xml
deleted file mode 100644
index 011b9a8a9c..0000000000
--- a/conf/waypoints.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sw/airborne/modules/sensors/baro_bmp.c b/sw/airborne/modules/sensors/baro_bmp.c
index cb28db06c1..0aa51e660f 100644
--- a/sw/airborne/modules/sensors/baro_bmp.c
+++ b/sw/airborne/modules/sensors/baro_bmp.c
@@ -130,7 +130,7 @@ void baro_bmp_event( void ) {
/* get uncompensated pressure, oss=3 */
bmp_up = (bmp_trans.buf[0] << 11) |
(bmp_trans.buf[1] << 3) |
- bmp_trans.buf[2];
+ (bmp_trans.buf[2] >> 5);
/* start temp measurement */
bmp_trans.buf[0] = BMP085_CTRL_REG;
bmp_trans.buf[1] = BMP085_START_TEMP;
@@ -157,7 +157,7 @@ void baro_bmp_event( void ) {
if (bmp_b7 < 0x80000000)
bmp_p = (bmp_b7 * 2) / bmp_b4;
else
- bmp_p = (bmp_b7 * bmp_b4) * 2;
+ bmp_p = (bmp_b7 / bmp_b4) * 2;
bmp_x1 = (bmp_p / (1<<8)) * (bmp_p / (1<<8));
bmp_x1 = (bmp_x1 * 3038) / (1<<16);
bmp_x2 = (-7357 * bmp_p) / (1<<16);
@@ -166,7 +166,7 @@ void baro_bmp_event( void ) {
baro_bmp_temperature = bmp_t;
baro_bmp_pressure = bmp_p;
#ifdef SENSOR_SYNC_SEND
- DOWNLINK_SEND_BMP_STATUS(DefaultChannel, &bmp_p, &bmp_t);
+ DOWNLINK_SEND_BMP_STATUS(DefaultChannel, &bmp_up, &bmp_ut, &bmp_p, &bmp_t);
#endif
}
}
diff --git a/sw/airborne/subsystems/ahrs/ahrs_float_dcm.c b/sw/airborne/subsystems/ahrs/ahrs_float_dcm.c
index 5bc9ea9aa9..33f207b9d3 100644
--- a/sw/airborne/subsystems/ahrs/ahrs_float_dcm.c
+++ b/sw/airborne/subsystems/ahrs/ahrs_float_dcm.c
@@ -462,8 +462,8 @@ void Drift_correction(void)
// Here we will place a limit on the integrator so that the integrator cannot ever exceed half the saturation limit of the gyros
Integrator_magnitude = sqrt(Vector_Dot_Product(Omega_I,Omega_I));
- if (Integrator_magnitude > DegOfRad(300)) {
- Vector_Scale(Omega_I,Omega_I,0.5f*DegOfRad(300)/Integrator_magnitude);
+ if (Integrator_magnitude > RadOfDeg(300)) {
+ Vector_Scale(Omega_I,Omega_I,0.5f*RadOfDeg(300)/Integrator_magnitude);
}
diff --git a/sw/airborne/subsystems/gps.h b/sw/airborne/subsystems/gps.h
index c8121322b8..2d46b16c0d 100644
--- a/sw/airborne/subsystems/gps.h
+++ b/sw/airborne/subsystems/gps.h
@@ -79,6 +79,7 @@ struct GpsState {
uint8_t nb_channels; ///< Number of scanned satellites
struct SVinfo svinfos[GPS_NB_CHANNELS];
+ uint32_t last_fix_ticks; ///< cpu time in ticks at last valid fix
uint16_t last_fix_time; ///< cpu time in sec at last valid fix
uint16_t reset; ///< hotstart, warmstart, coldstart
};
diff --git a/sw/airborne/subsystems/gps/gps_mtk.h b/sw/airborne/subsystems/gps/gps_mtk.h
index eeffd03afd..c467778afa 100644
--- a/sw/airborne/subsystems/gps/gps_mtk.h
+++ b/sw/airborne/subsystems/gps/gps_mtk.h
@@ -87,6 +87,7 @@ extern bool_t gps_configuring;
if (gps_mtk.msg_class == MTK_DIY16_ID && \
gps_mtk.msg_id == MTK_DIY16_NAV_ID) { \
if (gps.fix == GPS_FIX_3D) { \
+ gps.last_fix_ticks = cpu_time_ticks; \
gps.last_fix_time = cpu_time_sec; \
} \
_sol_available_callback(); \
diff --git a/sw/airborne/subsystems/gps/gps_nmea.h b/sw/airborne/subsystems/gps/gps_nmea.h
index 3e330915ff..a1d4059a2c 100644
--- a/sw/airborne/subsystems/gps/gps_nmea.h
+++ b/sw/airborne/subsystems/gps/gps_nmea.h
@@ -69,6 +69,7 @@ extern struct GpsNmea gps_nmea;
nmea_parse_msg(); \
if (gps_nmea.pos_available) { \
if (gps.fix == GPS_FIX_3D) { \
+ gps.last_fix_ticks = cpu_time_ticks; \
gps.last_fix_time = cpu_time_sec; \
} \
_sol_available_callback(); \
diff --git a/sw/airborne/subsystems/gps/gps_skytraq.h b/sw/airborne/subsystems/gps/gps_skytraq.h
index fea8398af0..ed435db45d 100644
--- a/sw/airborne/subsystems/gps/gps_skytraq.h
+++ b/sw/airborne/subsystems/gps/gps_skytraq.h
@@ -96,6 +96,7 @@ extern struct GpsSkytraq gps_skytraq;
gps_skytraq_read_message(); \
if (gps_skytraq.msg_id == SKYTRAQ_ID_NAVIGATION_DATA) { \
if (gps.fix == GPS_FIX_3D) \
+ gps.last_fix_ticks = cpu_time_ticks; \
gps.last_fix_time = cpu_time_sec; \
_sol_available_callback(); \
} \
diff --git a/sw/airborne/subsystems/gps/gps_ubx.c b/sw/airborne/subsystems/gps/gps_ubx.c
index 6a8d3fd61c..2c09d4908a 100644
--- a/sw/airborne/subsystems/gps/gps_ubx.c
+++ b/sw/airborne/subsystems/gps/gps_ubx.c
@@ -93,6 +93,7 @@ void gps_impl_init(void) {
gps_status_config = 0;
gps_configuring = TRUE;
#endif
+ gps_ubx.have_velned = 0;
}
@@ -172,6 +173,7 @@ void gps_ubx_read_message(void) {
// First x 10 for loosing less resolution, then to radians, then multiply x 10 again
gps.course = (RadOfDeg(UBX_NAV_VELNED_Heading(gps_ubx.msg_buf)*10)) * 10;
gps.tow = UBX_NAV_VELNED_ITOW(gps_ubx.msg_buf);
+ gps_ubx.have_velned = 1;
}
else if (gps_ubx.msg_id == UBX_NAV_SVINFO_ID) {
gps.nb_channels = Min(UBX_NAV_SVINFO_NCH(gps_ubx.msg_buf), GPS_NB_CHANNELS);
diff --git a/sw/airborne/subsystems/gps/gps_ubx.h b/sw/airborne/subsystems/gps/gps_ubx.h
index 46b8b9567b..14e84e4411 100644
--- a/sw/airborne/subsystems/gps/gps_ubx.h
+++ b/sw/airborne/subsystems/gps/gps_ubx.h
@@ -51,6 +51,7 @@ struct GpsUbx {
uint8_t status_flags;
uint8_t sol_flags;
+ uint8_t have_velned;
};
extern struct GpsUbx gps_ubx;
@@ -89,8 +90,10 @@ extern bool_t gps_configuring;
GpsParseOrConfigure(); \
if (gps_ubx.msg_class == UBX_NAV_ID && \
(gps_ubx.msg_id == UBX_NAV_VELNED_ID || \
- gps_ubx.msg_id == UBX_NAV_SOL_ID)) { \
+ (gps_ubx.msg_id == UBX_NAV_SOL_ID && \
+ gps_ubx.have_velned == 0))) { \
if (gps.fix == GPS_FIX_3D) { \
+ gps.last_fix_ticks = cpu_time_ticks; \
gps.last_fix_time = cpu_time_sec; \
} \
_sol_available_callback(); \
diff --git a/sw/tools/calibration/calibrate.py b/sw/tools/calibration/calibrate.py
index 66579ad30f..3d19454108 100755
--- a/sw/tools/calibration/calibrate.py
+++ b/sw/tools/calibration/calibrate.py
@@ -22,7 +22,7 @@
#
-
+import sys
import os
from optparse import OptionParser
import scipy
@@ -50,6 +50,9 @@ def main():
else:
print args[0] + " not found"
sys.exit(1)
+ if options.sensor == "GYRO":
+ print "You can't calibate gyros with this!"
+ sys.exit(1)
ac_ids = calibration_utils.get_ids_in_log(filename)
# import code; code.interact(local=locals())
if options.ac_id == None and len(ac_ids) == 1: