Commit Graph

207 Commits

Author SHA1 Message Date
Francisco Ferreira ba5ef18ef7 AP_GPS: correct blending check 2019-03-07 19:48:32 -07:00
Francisco Ferreira cb1ce70ae8 AP_GPS: fix out-of-bounds array access 2019-03-07 19:48:32 -07:00
Dr.-Ing. Amilcar do Carmo Lucas d7edd396bd AP_GPS: replace location_offset() and get_distance() function calls with Location object member function calls
This allows removing duplicated code
2019-02-28 11:44:09 +11:00
Tom Pittenger 5d66c3ed62 AP_GPS: unify singleton naming to _singleton and get_singleton() 2019-02-10 19:09:58 -07:00
Ben Kurtz 08092ea72b AP_GPS: fix typo in log message 2019-01-31 03:07:30 +00:00
Peter Barker 6fc76a32af GLOBAL: use AP::logger() and strip redundant Log_ from methods 2019-01-18 18:08:20 +11:00
Peter Barker b47733142f GLOBAL: rename DataFlash_Class to AP_Logger 2019-01-18 18:08:20 +11:00
Peter Barker 30980815a8 AP_GPS: adjust for Location_Class and Location unification 2019-01-16 11:45:29 +11:00
Peter Barker 30d5d6b578 AP_GPS: do not zero options after assigning from location
On the assumption that the assignment operator knows what it is doing,
and that we have no idea what fields are actually present in options
2019-01-16 11:45:29 +11:00
Randy Mackay c7287bb98f AP_GPS: add range to POS param description 2018-12-13 20:13:58 +09:00
Andrew Tridgell 3fe4b9c0f8 AP_GPS: make GPS packet timestamps more accurate
this reduces the effect of processing time and uart transmit time
2018-12-04 11:37:38 +11:00
Michael du Breuil d6944510da AP_GPS: Suppress clearing non-trival type warning 2018-10-30 16:17:03 -07:00
Siddharth Purohit ca54123b7d AP_GPS: move UAVCAN GPS related code to AP_GPS_UAVCAN backend 2018-08-29 22:54:59 +01:00
Dr.-Ing. Amilcar do Carmo Lucas 9c97f35b19 AP_GPS: Use GPS_AUTO_SWITCH parameter to choose exacly which GPS to use 2018-08-26 01:05:09 -07:00
Francisco Ferreira b29369eb82
AP_GPS: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:03 +01:00
Michael du Breuil 1a406dacfc AP_GPS: Ensure a lag value is always provided
The value may not be the optimal value for the driver, but we should
always try to provide a value for the caller
2018-08-07 09:55:26 +10:00
Peter Barker 5b41db5120 AP_GPS: use AP_RTC
set the system time from a GPS if we have a 3D fix or better
2018-06-15 08:01:22 +10:00
Eugene Shamaev 9985d4a937 AP_GPS: uniform naming 2018-06-09 22:46:48 -07:00
Eugene Shamaev 9f27a65f4b AP_GPS: helper func 2018-06-09 22:46:48 -07:00
Eugene Shamaev a805b3ce18 AP_GPS: reducing indenting by linearizing the logic 2018-06-09 22:46:48 -07:00
Francisco Ferreira 5fc7da0e83 AP_GPS: remove Qualcomm board support 2018-05-17 09:57:20 +10:00
Peter Barker 643e7e039a AP_GPS: log received data
Also log a set of flag values if a driver is deleted
2018-04-18 13:50:55 +09:00
Patrick José Pereira a255c47c33 AP_GPS: Do not restart driver if type is defined as MAV
Fix bluerobotics/ardusub#104

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-04-16 17:08:39 -07:00
Tom Pittenger 793f50808d AP_GPS: add param defaults for EMLID_EDGE for GPS_TYPE=9 2018-02-13 15:29:53 +11:00
Michael du Breuil 9e37e9ee82 AP_GPS: Remove unused blending function.
Thanks to ender-chen for noticing, closes #7510
2018-01-09 12:52:32 -08:00
Dr.-Ing. Amilcar Do Carmo Lucas 479d4be3fd AP_GPS: Add horizontal, vertical and speed accuracy to the GPS_RAW_INT message 2018-01-09 13:01:05 +11:00
Peter Barker 47f8ed7fab AP_GPS: set GPS_SAVE_CFG default to save GPS config as required 2017-11-29 00:58:43 -07:00
Andrew Tridgell 9677d570e9 AP_GPS: faster GPS lock
use 9600 and 115200 first
2017-11-29 00:58:43 -07:00
Peter Barker 693823ae0d AP_GPS: add gps() to AP:: namespace 2017-11-15 13:43:03 +00:00
Michael du Breuil 236e74c529 AP_GPS: Singleton 2017-11-06 01:33:57 +00:00
Michael du Breuil c856cc6f33 AP_GPS: Allow GPS's to run functions on arming (used by SBF)
Supports starting/stopping GPS logging
2017-11-06 01:33:57 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas 68828511cd AP_GPS: Only send GPS*_RTK mavlink messages if the backend supports them 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas 430b863f42 AP_GPS: Replace hardcoded duplicated end_mavlink_gps*_rtk() function with a flexible one 2017-10-30 18:28:20 +00:00
Michael du Breuil 561acb372e AP_GPS: SBF send port enable string on start
Also prohibts SBF, GSOF, NOVA drivers from getting config strings not
meant for them
2017-09-27 19:29:32 +01:00
Michael du Breuil bfbec02736 AP_GPS: SBF track the GPS error bits 2017-09-27 19:29:32 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas 09baac8f25 AP_GPS: Preserve the instance number, otherwise it will get set to zero
Signed-off-by: Dr.-Ing. Amilcar Do Carmo Lucas <amilcar.lucas@iav.de>
2017-09-26 23:15:10 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas 8b9fb19061 AP_GPS: Added const just to be explicit (NFC)
Signed-off-by: Dr.-Ing. Amilcar Do Carmo Lucas <amilcar.lucas@iav.de>
2017-09-26 23:15:10 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas 175b7c5389 AP_GPS: spellcheck in coment (NFC) 2017-09-26 23:15:10 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas d3a18e803e AP_GPS: Fix MAVLink message field SYSTEM_TIME.time_unix_usec when GPS_AUTO_SWITCH = blend
The mavlink message field SYSTEM_TIME.time_unix_usec works fine with GPS_AUTO_SWITCH == 0 (no switch) or ==1 (usebest)
But when GPS_AUTO_SWITCH == 2 (blend) then state[GPS_BLENDED_INSTANCE].last_gps_time_ms gets initialized with 0 and never rewritten.

The consequence: SYSTEM_TIME.time_unix_usec gets stuck at zero.
The solution: Do not reset state[GPS_BLENDED_INSTANCE].last_gps_time_ms because it would overwrite the correct value already set on line 1149
2017-09-14 12:38:30 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas e03826890a AP_GPS: Fix typo in comment 2017-09-13 14:22:57 -07:00
Michael du Breuil 04eb7f411e AP_GPS: Track the delta time between the last GPS positions 2017-09-13 13:36:40 +01:00
Peter Barker 7f59279670 AP_GPS: make time_epoch_usec const 2017-07-28 14:27:53 +01:00
Peter Barker e7ff5107fb AP_GPS: tidy mavlink message handling using switch statement 2017-07-27 12:03:25 +01:00
Peter Barker 2ad453fc89 AP_GPS: handle inject packets as part of handle_msg 2017-07-27 12:03:25 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas ae47ac5a09 AP_GPS: implement missing "RTK number of satellites" and "RTK correction age" information in the GPS2_RAW MAVLink message 2017-07-19 20:42:23 +09:00
Michael du Breuil 5684a5dd36 AP_GPS: Only setup state's instance field during init 2017-07-18 21:21:50 +01:00
Andrew Tridgell 82e7e44cc3 AP_GPS: fixed UAVCAN as 2nd GPS
This fixes the issue here:

  https://discuss.ardupilot.org/t/ac3-6-dev-dual-gps-issues/19172

thanks to Francisco for spotting the issue

this is tested with UAVCAN as 2nd GPS, ublox as primary
2017-07-18 18:57:55 +01:00
Peter Barker 76847a2487 AP_GPS: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +01:00
Eugene Shamaev 5341e51f45 AP_GPS: support for multiple instances on different interfaces 2017-07-03 11:44:32 +01:00
Peter Barker 7258cfd20b AP_GPS: check dataflash to see if we should log backend gps messages 2017-06-29 15:43:38 +01:00