Commit Graph

200 Commits

Author SHA1 Message Date
Peter Barker 10bc615b57 AP_GPS: add include for GCS_MAVLink.h
The initialisation of the GPS_Fix enumeration is made from the mavlink headers.

We should probably move away from this, converting from our own enumeration to the mavlink enumeration when required (emitting mavlink packets and receiving in AP_GPS_MAV)
2022-07-13 18:32:35 +10:00
Peter Barker e858a0fab7 AP_GPS: factor out a _detect_instance method
This means we don't need the goto to handle the case of a detected GPS,
and it also allows for restructure remove the "else" statements, which
will allow compilinmg out the uBlox driver
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
Andrew Tridgell 509f03f946 AP_GPS: cleanup driver option access
use option_set() to make code clearer
2022-06-15 17:30:28 +10:00
Peter Barker 4b6590734a AP_GPS: move gps blob initialisation out to method 2022-04-12 11:20:01 +10:00
Peter Barker a9aa5c2d60 AP_GPS: add a new AP_GPS_SITL object 2022-03-17 14:39:55 +11:00
Peter Barker 8d6e442997 AP_GPS: include cleanups 2022-03-01 11:21:33 +11:00
bugobliterator 3598724378 AP_GPS: change time_epoch_convert to istate_time_to_epoch_ms 2022-02-03 06:45:35 +11:00
bugobliterator 49bf4fa27b AP_GPS: move to using last_corrected_gps_time_us instead of uart_timestamp_us 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 e88cd8498b AP_GPS: add note about GPS_LEAPSECONDS_MILLIS being copied 2021-10-21 12:09:21 +11:00
bugobliterator ae65f2e6ab AP_GPS: fix build and working with single GPS Receiver config 2021-09-30 21:53:07 +10:00
Peter Barker 068f91169c AP_GPS: remove mtk GPSs
These are ancient and of very poor quality.
2021-09-29 17:28:59 +10:00
Peter Barker 1ae8385a0f AP_GPS: correct GPS switching when GPS blending disabled 2021-09-28 09:08:50 +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
Andrew Tridgell e5d878eebd AP_GPS: change handling of moving baseline yaw
this changes yaw handling in a few ways:

 - GPS yaw now has a timestamp associated with the yaw separate from
   the timestamp associated with the GPS fix

 - we no longer force the primary to change to the UBLOX MB rover when
   it has a GPS yaw. This means we don't change GPS primary due to GPS
   loss, which keeps the GPS more stable. It also increases accuracy
   as the rover is always less accurate in position and velocity than
   the base

 - now we force the primary to be the MB base if the other GPS is a
   rover and the base has GPS lock
2021-07-21 17:59:49 +10:00
Peter Barker 9e5662e927 AP_GPS: remove HIL support 2021-06-15 09:47:31 +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
bugobliterator 0031fee851 AP_GPS: add support for ordering UAVCAN GPS 2021-03-12 16:32:36 +09:00
Michael du Breuil a3ddf5264d AP_GPS: Support uavcan ardupilot.gnss.Status
Also makes the drive by change to make GPS_Backend::is_configured const
2021-03-12 09:39:55 +11:00
Michael du Breuil f227d67d58 AP_GPS: Remove unused enum 2021-03-03 10:00:15 +09:00
Peter Barker 9da9d8c94b AP_GPS: provide method for getting single char representing fix type
Should allow us to be consistent across places in the code base that
need a compact representation for a user display.
2021-02-18 08:59:23 +11:00
Peter Barker c2cba52ad8 AP_GPS: move gps logging structures into AP_GPS 2021-02-17 11:30:01 +11:00
Patrick José Pereira 2e75425a2a AP_GPS: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Andrew Tridgell bf51478dd1 AP_GPS: added ExternalAHRS backend 2021-01-05 21:13:12 +11:00
Andrew Tridgell 862ae59e28 AP_GPS: support $PHD message for AllyStay NMEA GPS
this adds vertical velocity support
2020-12-01 09:04:43 +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 4161e2eb28 AP_GPS: Factor out moving base offset helper 2020-11-03 11:12:20 +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 8c1bc94053 AP_GPS: fixed build warnings for MSP with AP_Periph 2020-09-15 09:40:03 +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 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
Michael du Breuil 08d4e1c062 AP_GPS: Support configuring the SBF com port 2020-08-13 15:04:38 +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 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 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 f00314a5d1 AP_GPS: removed dead blending code 2020-03-17 12:13:54 +11:00
Andrew Tridgell 7efd5248ee AP_GPS: added get_type() API 2020-01-26 09:12:55 +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
Andrew Tridgell 261465ef96 AP_GPS: split out update_primary() from update()
this makes the selection of primary GPS a lot clearer, with less
nesting of if statements
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
Michael du Breuil f8808022b8 AP_GPS: Check the driver logging health 2019-11-20 11:06:16 -07:00
Andrew Tridgell 632114d687 AP_GPS: support RTCMStream for RTCM injection on UAVCAN 2019-11-09 17:11:32 +11:00