Commit Graph

224 Commits

Author SHA1 Message Date
Peter Barker 21fc013016 AP_GPS: use subgroup to hold GPS instance parameters 2024-03-19 19:50:12 +11:00
Peter Barker 8bd05941a1 AP_GPS: stop passing serial manager to GPS init
it can get this via the singleton
2024-03-19 07:28:55 +11:00
Peter Barker 4811a10e1a AP_GPS: exclude more code based on HAL_LOGGING_ENABLED 2024-03-19 07:28:23 +11:00
Peter Barker 466b4b6c2e AP_GPS: create convenience methods is_rtk_base and is_rtk_rover 2024-03-12 08:51:11 +11:00
Andrew Tridgell 0f6f738a33 AP_GPS: added option to decode RTCM injected data
this allows for redundent RTCM links (eg. WiFi and SiK links for light
show drones) without causing corruption into the GPS.

If the GPS_DRV_OPTION bit is set then we instantiate a separate RTCM3
decoder per mavlink channel, and only inject when we get a full packet
that passes the RTCM 24 bit CRC
2024-03-06 19:38:06 +11:00
Andrew Tridgell d894f7ac5d AP_GPS: do initial probe at default baudrate
this makes for much faster probe for most users
2024-02-29 11:00:40 +11:00
Peter Barker 21a01c5587 AP_GPS: remove dead GPS_MINDGPS variable 2024-02-22 14:41:29 +11:00
Peter Barker 494d72503a AP_GPS: use probing when probing for GPS, add detected message 2024-02-20 19:35:01 +11:00
bugobliterator 78b0ddcf45 AP_GPS: add support for setting L5 override 2024-01-21 12:23:12 +11:00
Michael du Breuil 772dbfb04f AP_GPS: SBF supports yaw from dual antennas
Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2023-11-28 11:17:51 +11:00
Gone4Dirt 3edaea9be9 AP_GPS: Remove GPS_TC_BLEND 2023-11-02 15:51:52 +11:00
Peter Barker 0824eca776 AP_GPS: use AP_GPS_ENABLED to exclude more code when GPS not compiled in 2023-09-27 16:38:15 +10:00
Ryan Friedman 01cd42d1e7 AP_GPS: Allow multiple external AHRS GPS instances
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-08-24 12:01:32 +10:00
Peter Barker 407cfc22ca AP_GPS: remove code if blended instance is not available 2023-08-01 10:03:19 +10:00
Peter Barker 3f70f2104a AP_GPS: use minimize_features.inc for more features 2023-06-06 10:14:02 +10:00
Peter Barker a16c9cf64e AP_GPS: log fragments used/fragments discarded for RTCM injection data 2023-05-17 18:37:43 +10:00
Ryan Friedman 4b2687352c AP_GPS: Add const and WARN_IF_UNUSED to AP_GPS_GSOF
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-11 10:41:17 -07:00
Ryan Friedman d6569d6f79 AP_GPS: Use SI unit abbreviation
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-26 14:08:01 +10:00
Ryan Friedman 1e9403dca6 AP_GPS: Add covariance output to AP_GPS matching ROS NavSatFix
* Zero every iteration in case GPS quality degrades or fix is lost
* Use float precision for now

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-14 12:06:42 +10:00
Andrew Tridgell 645fd82507 AP_GPS: rename more variables, types and defines 2023-04-11 10:31:31 +10:00
Peter Barker 3c3f383601 AP_GPS: decouple status enumeration from MAVLink fix types
This moves us towards being able to compile the GPS library without having the MAVLink headers available.  We shouldn't need those headers when building for Periph.

If the headers are available then we ensure our values match mavlink so we can do a simple cast from one to the other
2023-03-22 14:23:41 +11:00
Andrew Tridgell ad9dfe2d51 AP_GPS: added support for Unicore NMEA GPS
this includes dual-antenna moving baseline support, 3D velocity and accuracies
2022-12-20 10:23:58 +11:00
jackhong12 4a4f361a17 all: use CLASS_NO_COPY() macro 2022-10-04 11:23:04 +11:00
Joshua Henderson 378dff5568 AP_GPS: added get_undulation support 2022-08-09 14:37:08 +10:00
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