vehicle_gps_position: add heading field

This commit is contained in:
Beat Küng
2018-07-16 09:54:19 +02:00
parent a8463a5226
commit 43c2970fb9
5 changed files with 11 additions and 0 deletions
+2
View File
@@ -2139,6 +2139,8 @@ MavlinkReceiver::handle_message_hil_gps(mavlink_message_t *msg)
hil_gps.fix_type = gps.fix_type;
hil_gps.satellites_used = gps.satellites_visible; //TODO: rename mavlink_hil_gps_t sats visible to used?
hil_gps.heading = NAN;
if (_gps_pub == nullptr) {
_gps_pub = orb_advertise(ORB_ID(vehicle_gps_position), &hil_gps);
+1
View File
@@ -178,6 +178,7 @@ GPSSIM::GPSSIM(const char *uart_path, bool fake_gps, bool enable_sat_info,
{
/* we need this potentially before it could be set in task_main */
g_dev = this;
_report_gps_pos.heading = NAN;
/* create satellite info data object if requested */
if (enable_sat_info) {
+2
View File
@@ -379,6 +379,8 @@ void UavcanGnssBridge::process_fixx(const uavcan::ReceivedDataStructure<FixType>
report.hdop = msg.pdop;
report.vdop = msg.pdop;
report.heading = NAN;
// Publish to a multi-topic
int32_t gps_orb_instance;
orb_publish_auto(ORB_ID(vehicle_gps_position), &_report_pub, &report, &gps_orb_instance,