Commit Graph

176 Commits

Author SHA1 Message Date
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
Tom Pittenger 12c3446777 AP_GPS: rename dataflash to logger 2019-03-28 16:40:57 +11: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
Arjun Vinod 978cea97cf AP_GPS: whitespace and typo fixes 2019-01-05 08:45:24 +09:00
Andrew Tridgell d761b24b92 AP_GPS: optionally configure a hardware PPS pin for uBlox
useful for testing time lag estimation
2018-12-04 11:37:38 +11:00
Andrew Tridgell 2eae4901c1 AP_GPS: look for iTow on uBlox MSG_STATUS 2018-12-04 11:37:38 +11:00
Andrew Tridgell df68d6413c AP_GPS: moved iTow handling to GPS_Backend 2018-12-04 11:37:38 +11: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
Alexander Remizov dc15cbd513 AP_GPS: fixed ublox configuration 2018-06-24 15:25:00 -07:00
Andrew Tridgell dc2a776985 AP_GPS: fixed fake ublox 3D lock PVT speed accuracy
allows EKF to startup fully with fake GPS lock
2018-06-06 07:15:41 +10:00
Michael du Breuil 53c66106d6 AP_GPS: Remove unneeded intilizers
saves 160 bytes on make px4-v2
2018-05-16 20:34:00 +10:00
Michael du Breuil 0300f86913 AP_GPS: u-blox: Log unconfigured messages 2017-10-06 12:53:32 +01:00
Lucas De Marchi 8389158d76 AP_GPS: use FALLTHROUGH define
When falling through on a case switch, allow to add an empty statement
with the correct attribute to tell the compiler this behavior is
intended.
2017-08-22 23:59:13 -07:00
Peter Barker 76847a2487 AP_GPS: eliminate GCS_MAVLINK::send_statustext_all 2017-07-11 23:53:53 +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
Michael du Breuil 249849dfa4 AP_GPS: Add an enum for _auto_config 2017-06-21 11:44:45 +01:00
Michael du Breuil 5f8633e322 AP_GPS: Allow backends to report their lag confidences 2017-06-21 11:44:45 +01:00
Peter Barker 1ba59b446c AP_GPS: log ublox sw and hw versions on dataflash log start
This burns 41 bytes of RAM for each u-Blox GPS.
2017-04-23 21:04:17 +01:00
Peter Barker 94a5e94ec9 AP_GPS: canonicalise statustext messages
Use "GPS %d" prefix, where %d is instance+1, to correspond
with parameters
2017-04-23 09:09:30 +10:00
Michael du Breuil 6f297deaf7 AP_GPS: Unify inject_data interface for all classes 2017-04-19 02:05:51 +01:00
Randy Mackay 81b20e971b AP_GPS_UBLOX: use get_rate_ms accessor 2017-03-13 11:31:51 +11:00
Randy Mackay e764f0d5d0 AP_GPS: sanity check update rate
Also minor spelling and parameter documentation fix
2017-03-13 11:31:51 +11:00