Commit Graph

860 Commits

Author SHA1 Message Date
Peter Barker e257dd9fee AP_GPS: correct logging for GPS blending 2020-11-20 09:45:57 +11:00
Dr.-Ing. Amilcar do Carmo Lucas 58f0c34612 AP_GPS: fix dataflash logging of blended GPS instance 2020-11-20 09:45:57 +11:00
Peter Barker 428c9ef0e1 AP_GPS: correct logging in dual-ublox setups 2020-11-10 17:39:51 +11:00
Andrew Tridgell 6c4e552a0b AP_GPS: removed have_ekf_logging() 2020-11-10 16:15:45 +11:00
Iampete1 60951a7891 AP_GPS: add use primary if 3D fix GPS_AUTO_SWITCH option 2020-11-10 12:01:56 +11:00
Iampete1 347723dbaf AP_GPS: add primary param 2020-11-10 12:01:56 +11:00
Michael du Breuil b30c55b3f3 AP_GPS: Support yaw from moving base station on SBF drivers 2020-11-03 11:12:20 +11:00
Michael du Breuil 4161e2eb28 AP_GPS: Factor out moving base offset helper 2020-11-03 11:12:20 +11:00
Michael du Breuil a61444cec0 AP_GPS: Don't reset the entire buffer when handling RTCM data
This is a micro optimization intended to just make handling GPS
corrections a bit faster.
2020-10-25 14:21:39 +11:00
murata 4c835a0df9 AP_GPS: Move the CRC24 to the AP_Math class 2020-10-21 18:24:07 +11:00
Andrew Tridgell e529d475d4 AP_GPS: use mktime for NMEA and MTK time conversion
this fixes NMEA time handling, which was off by 3 days
2020-10-20 11:21:00 +11:00
Andrew Tridgell e995a198bd AP_GPS: always send GPS2_RAW if 2nd GPS configured
this improves the display on the GCS when the GPS has not yet been
found. This is particularly important after a reboot, as otherwise the
GCS may display stale information from the previous boot
2020-10-06 16:48:19 +11:00
Andrew Tridgell 8e08d93026 AP_GPS: fixed pre-arm check on ublox M9 GPS
this prevents a failure from config of SOL and TMODE messages
2020-10-06 10:22:52 +11:00
Donione ff80be19c1 AP_GPS: fix type and update reserved bytes in ublox PVT 2020-09-28 16:31:14 -07:00
Andrew Tridgell 8c1bc94053 AP_GPS: fixed build warnings for MSP with AP_Periph 2020-09-15 09:40:03 +10:00
Andrew Tridgell 94670879f8 AP_GPS: allow hwdef.dat override of GPS rate 2020-09-09 06:35:50 +10:00
yaapu 85b61d6bf3 AP_GPS: added support for MSP GPS sensors 2020-09-09 06:35:50 +10:00
Andrew Tridgell 5647aadbcf AP_GPS: added API for getting last iTOW 2020-09-09 06:35:50 +10:00
Andrew Tridgell 56b743dfca AP_GPS: build SBF driver with double precision 2020-09-03 09:56:29 +10:00
Michael du Breuil 6a8680d31d AP_GPS: Send RTK baseline data from SBF 2020-09-03 09:56:29 +10:00
Andrew Tridgell 87c7781be2 AP_GPS: show GPS as unhealthy if it is lagged too much
this detects GPS data lag, and if 5 samples in a row are lagged by
more than 50ms beyond the expected lag for the GPS then we declare the
GPS as unhealthy.

This is useful to detect users who have asked for more data from the
GPS then it can send at the baudrate that is being used. The case that
led to this path was a F9 GPS with GPS_RAW_DATA=1 at 115200 baud. In
that case the UART data is quickly lagged by over 1s
2020-08-25 10:22:05 +10:00
Siddharth Purohit 0690b7bd68 AP_GPS: move to using CANManager library 2020-08-19 17:31:09 +10:00
Michael du Breuil 08d4e1c062 AP_GPS: Support configuring the SBF com port 2020-08-13 15:04:38 +10:00
Iampete1 997ffcf30d AP_GPS: NMEA: only decode each measage once 2020-08-09 11:37:16 +10:00
Siddharth Purohit d122f00c14 AP_GPS: redetection not necessary for UAVCAN GPS 2020-07-29 17:32:56 +10:00
Tom Pittenger 8f6e9caf93 AP_GPS: change GPS_AUTO_SWITCH #define list to enum class
enumeration entry had to change to NONE to avoid name conflict with DISABLED
2020-06-25 11:10:31 +10:00
Andrew Tridgell 4aa10a6c30 AP_GPS: added force_disable_yaw() API 2020-06-18 15:01:00 +10:00
Andrew Tridgell 78858bbcdd AP_GPS: switch ublox over to 230400 baud
this ensures we have sufficient bandwidth for raw data
2020-06-01 17:18:17 -07:00
Andrew Tridgell 529bfe8fcd AP_GPS: fixed issue with GPS selection for moving baseline
when you have a moving baseline pair of ublox GPS modules and the
rover GPS does not have full fixed RTK lock on the base GPS then we
should not use it as our primary GPS as it's position and velocity can
be badly affected by the attempts of the GPS to gain a fixed lock.

This was observed in a flight with two F9P GPS, where the GPS velocity
data from the rover GPS went way off when it lost full RTK lock. It's
status stayed at 4, so it was selected as the primary GPS
2020-05-27 10:59:46 +10:00
Andrew Tridgell f00392d567 AP_GPS: don't accept a zero GNSS timestamp from UAVCAN GPS
this is needed for a bug in AP_Periph 1.0 which could briefly send a
zero timestamp on first fix marked as a UTC time
2020-04-29 12:20:19 +10:00
Andrew Tridgell 4f591a338f AP_GPS: use GCS_SEND_TEXT() 2020-04-29 07:36:55 +10:00
Andrew Tridgell 6347d0adb0 AP_GPS: leave uart2 config enabled when using uart2 MB setup 2020-04-21 15:30:54 +10:00
Andrew Tridgell f3a5d915f3 AP_GPS: allow for larger average delta on MB rover than normal 2020-04-21 15:30:54 +10:00
Andrew Tridgell 36098c3221 AP_GPS: improved delay health threshold
allow for missing frames without showing unhealthy on GCS
2020-04-21 15:30:54 +10:00
Andrew Tridgell 3397ed766d AP_GPS: enable ublox moving baseline compilation option
disable for HAL_MINIMIZE_FEATURES and if max receivers 1. This fixes
the f103-GPS AP_Periph build
2020-04-21 15:30:54 +10:00
Andrew Tridgell ae2132d861 AP_GPS: added check for Z error in moving baseline ublox
this ensures we don't get bad yaw from having the right distance but
incorrect Z offset for the currently expected roll/pitch
2020-04-21 15:30:54 +10:00
Andrew Tridgell 7027eecd34 AP_GPS: added GPS_DRV_OPTIONS
this allows for configuration of moving baseline with either uart1 or
uart2 for the RTCM data. Using uart2 requires an extra cable between
the two modules, but requires less uart bandwidth which is good when
DMA channels are low. Using uart2 also avoids the rtcmv3 parser, which
saves memory
2020-04-21 15:30:54 +10:00
Andrew Tridgell 9a6de209ab AP_GPS: ensure that PVT and RELPOSNED msgs time align
this ensures we wait until we have a matching PVT and RELPOSNED
message before we report new data. If we stop receiving RELPOSNED
messages then disable yaw support
2020-04-21 15:30:54 +10:00
Andrew Tridgell 3fbeae613b AP_GPS: fixed moving baseline yaw calculation
this reverts #13955 and instead applies the correct fix, which is to
subtract the angle instead of adding.
2020-04-21 15:30:54 +10:00
Andrew Tridgell 077ab22767 AP_GPS: fixed AP_Periph build with gcc 9.x 2020-04-01 17:08:48 +11:00
Andrew Tridgell 4456732911 AP_GPS: fixed rotation of moving baseline GPS
we were off by 180 degrees. Thanks to Jaime for noticing this!
2020-04-01 17:08:19 +11:00
Peter Barker 2b08af69bc AP_GPS: fix dereference-of-nullptr warning from scan-build
This is kind-of a false positive as this in practise could never be
nullptr.
2020-03-31 10:37:16 +11:00
Andrew Tridgell f00314a5d1 AP_GPS: removed dead blending code 2020-03-17 12:13:54 +11:00
Andrew Tridgell 9fa034d1de AP_GPS: fixed antenna offset for blending
we were accessing beyond the end of the antenna_offset array
2020-03-17 12:13:54 +11:00
Randy Mackay a19634b9d2 AP_GPS: reduce POS param range to 5m and add increment 2020-02-01 08:46:03 +09:00
Andrew Tridgell 7efd5248ee AP_GPS: added get_type() API 2020-01-26 09:12:55 +11:00
Andrew Tridgell e59f32074d AP_GPS: fixed yaw error when one GPS has zero position
the M_PI correction was only valid for one zero side. Much simpler to
always calculate difference
2020-01-24 11:46:40 +11:00
Andrew Tridgell cf8becfa71 AP_GPS: make all semaphores recursive
the cost is very similar and this prevents an easy coding error which
can occur on less used code paths
2020-01-19 20:19:30 +11:00
Andrew Tridgell f0d1d3fa90 AP_GPS: added get_semaphore() 2020-01-16 20:36:54 +11:00
Andrew Tridgell db777c56b9 AP_GPS: provide yaw feedback in GPS_RAW_INT and GPS2_RAW
allow GPS to display status of GPS yaw for moving baseline and NMEA
2020-01-07 12:37:35 +11:00