Commit Graph

198 Commits

Author SHA1 Message Date
Peter Barker b88f414320 AP_GPS: allow UBLOX driver to be compiled out 2022-07-13 17:56:38 +10:00
Andrew Tridgell 06a9a1521c AP_GPS: added GPS_DRV_OPTIONS bit for ellipsoid height 2022-06-15 17:30:28 +10:00
Iampete1 2589fa1b3b AP_GPS: UBlox: add TIM-TM2 logging 2022-04-06 17:22:30 +10:00
Peter Barker cafad05b38 AP_GPS: rearrange send-text for consistency 2022-03-27 06:21:20 -07:00
bugobliterator 46294c0fba AP_GPS: sync pps rate with message rate 2022-01-20 17:26:35 +11:00
bugobliterator 9834304525 AP_GPS: make more precise calculation of gps message
use PPS signal if available as well
2022-01-20 17:26:35 +11:00
Peter Barker 8d17b8dbe7 AP_GPS: use const structure for saving GPS config 2022-01-12 18:29:01 +11:00
Peter Barker 1943de9016 AP_GPS: tidy configuration of UBLOX rates 2022-01-12 18:29:01 +11:00
Andrew Tridgell 9d21c0b6c1 AP_GPS: added GPS data logging system
for debugging GPS protocols
2022-01-11 10:34:11 +11:00
Peter Barker 065cb2decb AP_GPS_UBLOX: tidy reading of uart data
Neither of the return types used for data and numc were actually correct for the values being returned from the uartdriver functions.
2021-11-09 10:31:25 +11:00
Josh Henderson 06251335da AP_GPS: use vector.xy().length() instead of norm(x,y) 2021-09-14 10:43:46 +10:00
bugobliterator 85d8becb8c AP_GPS: add support for auto config Moving Baseline for AP_Periph GPS 2021-08-19 14:20:58 +10:00
bugobliterator 9fc57e40b4 AP_GPS: add support for dual GPS heading using Periph GPSes 2021-08-19 14:20:58 +10:00
Siddharth Purohit c18652f35a AP_GPS: add option to enable configuring PPS pin in UBLOX driver 2021-07-02 08:50:16 +10:00
Peter Barker a61b6ebda8 AP_GPS: move from HAL_NO_LOGGING to HAL_LOGGING_ENABLED 2021-05-19 17:38:47 +10:00
Michael du Breuil 1288f4c81b AP_GPS: Support GPS_SBAS_MODE on SBF GPS units
Also swaps to using an AP_Enum for the SBAS type, and fixes up the fact
that the prearm/failure reasons should be using the config step, rather
then the init blob index
2021-05-18 09:52:07 +10:00
Andrew Tridgell 7cc11e6856 AP_GPS: fixed handling of loss of GPS yaw
when the GPS yaw data doesn't pass the internal tests of validity for
400ms we need to stop telling the EKF that we have valid yaw
2021-05-04 10:37:15 +10:00
giacomo892 a245100ae6 AP_GPS_UBLOX: Fix GALILEO auto configuration 2021-04-29 13:01:09 +10:00
Patrick José Pereira 6bdc1704f4 AP_GPS: Remove pointer check before delete
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-04 09:01:19 +11:00
Peter Barker 428c9ef0e1 AP_GPS: correct logging in dual-ublox setups 2020-11-10 17:39:51 +11:00
Michael du Breuil 4161e2eb28 AP_GPS: Factor out moving base offset helper 2020-11-03 11:12:20 +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
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 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 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
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 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
Andrew Tridgell e40c570615 AP_GPS: faster config of moving baseline
thanks to MdB for suggestion
2020-01-07 12:37:35 +11:00
Andrew Tridgell e660532f67 AP_GPS: fixes from PR review 2020-01-07 12:37:35 +11:00
Andrew Tridgell 41289fe945 AP_GPS: adjust lag for MB RTK ublox
rover will lag by about 40ms
2020-01-07 12:37:35 +11:00
Andrew Tridgell 93aaf98672 AP_GPS: added automatic u-blox moving baseline configuration
this uses GPS_TYPE and GPS_TYPE2 to setup two u-blox F9 receivers in a
RTK moving baseline configuration
2020-01-07 12:37:35 +11:00
Andrew Tridgell 379e3d60a1 AP_GPS: fixed sizes of config items 2019-11-16 15:28:52 +11:00
Michael du Breuil 63a6a1084c AP_GPS: UBlox: Fix the assumption that all keys are 1 byte keys 2019-11-16 15:28:52 +11:00
Michael du Breuil 150a4edcf2 AP_GPS: UBlox fix not listing the time mode as a configuration reason 2019-11-16 15:28:52 +11:00
Andrew Tridgell 7bec9d87b4 AP_GPS: fixed TMODE config issue on non-F9 GPS
thanks to Michel Pastor for reporting this
2019-11-16 15:28:52 +11:00
Andrew Tridgell 8aa781206d AP_GPS: fixed signed/unsigned comparisons 2019-11-09 17:11:32 +11:00
Andrew Tridgell 6c31fb1bb6 AP_GPS: added automatic config of TMODE on F9
the Drotek F9 GPS ships with TMODE enabled, which means we don't get a
3D fix.

This also adds the VALGET/VALSET msgs we will need for automatic
moving baseline config
2019-11-09 17:11:32 +11:00
Andrew Tridgell 37fb028532 AP_GPS: improved checking for valid yaw for moving baseline
and fixed check for carrSolnFixed
2019-10-15 11:06:11 +11:00
Michael du Breuil 2587b13ae7 AP_GPS: UBLOX: Parse RELPOSNED messages
This does not yet:
  - validate the receiver configuration
  - manage timing out stale GPS heading info
  - relPosNormalized usage isn't clear, which may defeat the STRICT_LENGTH_CHECK
2019-10-15 11:06:11 +11:00
Andrew Tridgell b5217412f9 AP_GPS: fixed a bug in handling corrupt u-blox packets
when we have corrupt input due to loss of bytes on a UART we can end
up with a u-blox packet with zero payload bytes. When that happens we
need to bypass payload reading as otherwise we will end up keeping
reading bytes until the driver resets at 4 seconds, causing a GPS
outage.

This was causing GPS outages every few hours in copters running 3.6.7,
and was also reproduced in SITL using SIM_GPS_BYTELOSS.
2019-09-30 15:20:30 -06:00
Andrew Tridgell 291d72601b AP_GPS: enabled reduced size for AP_Periph support 2019-08-27 10:29:56 +10:00
Randy Mackay 64637dba8f AP_GPS: resolve gcs::send_text compiler warning 2019-07-30 09:02:39 +09:00
Andrew Tridgell 5bfb6ced84 AP_GPS: fixed u-blox F9 auto configuration 2019-07-05 13:31:40 +10:00
Michael Oborne 6031f5b6a9 AP_GPS_UBLOX: add support for TIMEGPS message. used to get gps week 2019-05-29 09:48:17 +10:00
Michael du Breuil 833bc8f12a AP_GPS: Ensure that all ublox configuration failure reasons have a description 2019-04-02 08:15:59 +11:00