added GPS_INT and GPS_LLA messages to fixedwing for debugging

This commit is contained in:
Felix Ruess
2012-03-16 03:41:28 +01:00
parent e0a333437e
commit fdacc93040
2 changed files with 41 additions and 2 deletions
+2 -2
View File
@@ -428,8 +428,8 @@
</message>
<message name="GPS_LLA" id="59">
<field name="lat" type="int32" unit="cm" alt_unit="m"/>
<field name="lon" type="int32" unit="cm" alt_unit="m"/>
<field name="lat" type="int32" alt_unit="deg" alt_unit_coef="0.0000057296"/>
<field name="lon" type="int32" alt_unit="deg" alt_unit_coef="0.0000057296"/>
<field name="alt" type="int32" unit="mm" alt_unit="m"/>
<field name="course" type="int16" unit="decideg" alt_unit="deg"/>
<field name="speed" type="uint16" unit="cm/s" alt_unit="m/s"/>
@@ -231,6 +231,45 @@ extern uint8_t telemetry_mode_Ap_DefaultChannel;
i++; \
}
#if USE_GPS
#define PERIODIC_SEND_GPS_INT(_trans, _dev) { \
DOWNLINK_SEND_GPS_INT( _trans, _dev, \
&gps.ecef_pos.x, \
&gps.ecef_pos.y, \
&gps.ecef_pos.z, \
&gps.lla_pos.lat, \
&gps.lla_pos.lon, \
&gps.lla_pos.alt, \
&gps.hmsl, \
&gps.ecef_vel.x, \
&gps.ecef_vel.y, \
&gps.ecef_vel.z, \
&gps.pacc, \
&gps.sacc, \
&gps.tow, \
&gps.pdop, \
&gps.num_sv, \
&gps.fix); \
}
#define PERIODIC_SEND_GPS_LLA(_trans, _dev) { \
int16_t climb = -gps.ned_vel.z; \
int16_t course = (DegOfRad(gps.course)/((int32_t)1e6)); \
DOWNLINK_SEND_GPS_LLA( _trans, _dev, \
&gps.lla_pos.lat, \
&gps.lla_pos.lon, \
&gps.lla_pos.alt, \
&gps.hmsl, \
&course, \
&gps.gspeed, \
&climb, \
&gps.week, \
&gps.tow, \
&gps.fix, \
&gps.fix); \
}
#endif
#if USE_BARO_MS5534A
//#include "baro_MS5534A.h"
#define PERIODIC_SEND_BARO_MS5534A(_trans, _dev) DOWNLINK_SEND_BARO_MS5534A(_trans, _dev, &baro_MS5534A_pressure, &baro_MS5534A_temp, &baro_MS5534A_z)