Peter Barker
4811a10e1a
AP_GPS: exclude more code based on HAL_LOGGING_ENABLED
2024-03-19 07:28:23 +11:00
Peter Barker
8ab3b0db37
AP_GPS: correct update_primary check
...
takes an instance, not a type
2024-03-12 20:50:18 +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
Peter Barker
b4f5d49adb
AP_GPS: remove redundant check
...
get_type has this sanity check
2024-03-12 08:51:11 +11:00
Peter Barker
093709cbe3
AP_GPS: avoid use of _type
...
some of these methods are taking the instance in externally. Protect by using get_type
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
e6a6db9ba0
AP_GPS: correct check of reported antenna distance vs stated offset
2024-02-27 10:52:10 +11:00
Peter Barker
cb2f764700
AP_GPS: improve reporting of offset vs reported-distance inaccuracy
2024-02-27 10:44:56 +11:00
Andrew Piper
6d6c790e37
AP_GPS: fragments_received is a bitmask not a count
2024-02-26 09:23:08 +11:00
Peter Barker
21a01c5587
AP_GPS: remove dead GPS_MINDGPS variable
2024-02-22 14:41:29 +11:00
Andrew Tridgell
4fca2ee852
AP_GPS: prevent announcing DroneCAN at 5Hz
2024-02-22 13:27:54 +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
4bcac076f6
AP_GPS: broaden the acceptance criteria for GPS Yaw measurement
2024-02-08 00:59:15 -08:00
Simon Hancock
867f656033
AP_GPS: Updates to log message units and help text
...
Link GPS.Status to AP_GPS::GPS_Status enum
Remove units on fields set to Bytes which are not
Set the unit of GPS.GMS and GRAW.WkMS to ms (no unit specified before).
Change the unit of GPS.HDop and GPA.VDop from m to no-unit.
2024-01-21 14:26:54 +11:00
Andrew Tridgell
754d3df304
AP_GPS: support newer M10 versions with L1L5
2024-01-21 12:23:12 +11:00
Andrew Tridgell
6aaf6883ef
AP_GPS: make L1/L5 check work on M10 modules too
...
tested on SierraAerospace L1L5 module
2024-01-21 12:23:12 +11:00
bugobliterator
55a922563b
AP_GPS: set L5 config only on BBR and RAM
2024-01-21 12:23:12 +11:00
bugobliterator
78b0ddcf45
AP_GPS: add support for setting L5 override
2024-01-21 12:23:12 +11:00
Peter Barker
fa8f3b5715
AP_GPS: allow compilation with HAL_LOGGING_ENABLED false
2024-01-17 18:25:55 +11:00
Peter Barker
2e41cf810c
Revert "AP_GPS: GSOF robust config parsing"
...
This reverts commit bf9881579c
.
2023-11-28 16:09:46 +11:00
Peter Barker
8b7652d1db
Revert "AP_GPS: Move init logic from constructor to class"
...
This reverts commit 5f84cd8f2b
.
2023-11-28 16:09:46 +11:00
Ryan Friedman
d7b5cd3203
AP_GPS: Fix missing GSOF param for SITL
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-28 15:50:02 +11:00
Ryan Friedman
5f84cd8f2b
AP_GPS: Move init logic from constructor to class
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-28 15:44:37 +11:00
Ryan Friedman
bf9881579c
AP_GPS: GSOF robust config parsing
...
* Refactor checksum to unique function
* Clear uart before reading data
* Add ack/nack check
* Implement output disable before requesting GSOF data
* Improve debug message to have line number
* Use debug in more code
* Stop delaying in configuration
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-28 15:44:37 +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
Ryan Friedman
201c66e417
AP_GPS: Fix GSOF autobaud detection msg
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-14 10:26:01 +11:00
Ryan Friedman
08d88ce7c6
AP_GPS: Use GPS_COM_PORT param in GSOF driver
...
* Instead of hard coding to COM2, allow users to set it
* The enum is confusing, so this needs a wiki entry
* Use the same port in requestBAUD
* If the user configures an invalid param, send an error
* Add values for the GSOF COM ports
* Fix bug in RS232 being port 3 instead of port 0
* Use set_default for the typical user value when the GSOF driver is run
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-10 13:38:48 +11:00
Peter Barker
2d9346e85a
AP_GPS: correct uBlox M10 configuration on minimised boards
2023-11-08 09:05:13 +11:00
Ryan Friedman
9445cb2672
AP_GPS: Expose COM port and Output Rate in header
...
* This removes magic numbers of hard coding the hardware port and output
rate
* This also fixes configuring the incorrect hardware port
* Now, COM2 (TTL) is configured for GSOF output
* The data rate remains the same as before
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-07 10:42:14 +11:00
Peter Barker
e47a5c1ea9
AP_GPS: make AP_GPS_FixType enum class
...
Don't want "NONE" in the global namespace
2023-11-07 10:30:04 +11:00
Gone4Dirt
3edaea9be9
AP_GPS: Remove GPS_TC_BLEND
2023-11-02 15:51:52 +11:00
Mykhailo Kuznietsov
3a7e939a6c
AP_GPS: Fix some typos
...
Fixed some typos found in the code.
2023-10-12 18:30:42 +11:00
Peter Barker
2175a4a271
AP_GPS: allow for compilation without AP_RTC_ENABLED
2023-10-11 19:17:27 +11:00
Peter Barker
88dd8130f6
AP_GPS: correct placement of voiding clause
...
should be voided when no logging, not just on periph...
2023-10-10 08:37:57 +09:00
Peter Barker
53115c73f9
AP_GPS: have AP_GPS_UBLOX use boolean uart read
2023-10-06 16:34:50 +11:00
Andrew Tridgell
4cabe0f223
AP_GPS: prevent use of blended GPS with moving baseline
...
when moving baseline is enabled the rover is slaved to the base for
position and velocity, adding no additional useful data. Only the yaw
comes from the rover
2023-09-30 09:05:08 +10:00
Andrew Tridgell
4e61fb3f26
AP_GPS: allow GPS moving baseline rover at 3Hz
...
users with busy CAN bus often get significiantly lower GPS rates on a
moving baseline rover, preventing arming. This PR relaxes the required
frame rate as the EKF is quite happy with 3Hz yaw and the yaw is the
only data consumed from a moving baseline rover
2023-09-30 09:05:08 +10:00
Peter Barker
f358ddd771
AP_GPS: add an AP_GPS_FixType header
...
useful when you need nice symbols for the numbers, but are not compiling the GPS headers in
2023-09-27 14:14:57 -07: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
Andrew Tridgell
89bd6ab218
AP_GPS: implement the GPS_DRV_OPTION for ellisoid height in mode drivers
...
this allows a lot more drivers to use the GPS_DRV_OPTION but to use
ellisoid height. Particularly useful for DroneCAN GPS modules
using ellisoid height instead of AMSL is useful in some specialised
application
2023-09-21 19:36:26 +10:00
Peter Barker
a391b14a6d
AP_GPS: replace utility functions with compiler builtins
2023-09-12 09:48:53 +10:00
Peter Barker
668e2fa068
AP_GPS: use correct define for DroneCAN GPS drivers
2023-09-03 08:43:03 +10:00
Andrew Tridgell
74139423cb
AP_GPS: fixes for macos CAN SITL build
2023-08-29 15:09:48 +10:00
Andrew Tridgell
babd2d2033
AP_GPS: removed native_millis/micros
2023-08-24 13:06:40 +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
941e9785d4
AP_GPS_NOVA: avoid infinite reading of bytes
...
if we have a very fast stream of garbage coming in available() may never return 0
2023-08-15 08:36:13 +10:00
Ryan Friedman
5b21834827
AP_GPS: Switch to sparse endian to make it portable
...
* Instead of custom algorithm to reduce flash and code maintenance
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-08-11 11:21:41 +10:00
Peter Barker
e6ac368972
AP_GPS: make AP_GPS_MAV dependent on HAL_GCS_ENABLED
2023-08-08 11:33:54 +10:00
Peter Barker
6ee9f01ffb
AP_GPS: avoid use of mavlink constructs when GCS not compiled in
2023-08-08 11:33:54 +10:00
Peter Barker
bf005731a9
AP_GPS: tidy is_healthy calculations
...
this removes some duplicate code and simplifies the flow of control
2023-08-08 11:31:18 +10:00
Peter Barker
00bc4a9e8b
AP_GPS: add and use AP_GPS_DRONECAN_ENABLED
2023-08-02 17:46:30 +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
c45c02ce82
AP_GPS: use AP_AHRS_ENABLED in place of HAL_BUILD_AP_PERIPH
...
the guard here is just against use of the singleton
2023-07-04 10:27:32 +10:00
Peter Barker
5664c0a142
AP_GPS: check delay_ok in one place
2023-07-04 08:15:31 +10:00
Peter Barker
c89ec67333
AP_GPS: move AP_RTC::mktime to be ap_mktime
...
in preparation for AP_RTC_ENABLED
2023-06-27 11:25:11 +10:00
Andrew Tridgell
848e1bfdf8
AP_GPS: ensure uart buffer sizes are OK for RTK
...
rover needs higher tx size, base needs higher rx size
2023-06-27 10:32:43 +10:00
Andrew Tridgell
64869b6e16
AP_GPS: fixed RTK injection with moving baseline
...
when 2nd DroneCAN GPS on the bus is the base in moving baseline we
need to be able to inject to it
2023-06-27 10:32:43 +10:00
Peter Barker
6f292c02da
AP_GPS: add and use AP_GPS_ENABLED
2023-06-21 22:28:48 +10:00
Andrew Tridgell
0d4018107b
AP_GPS: fixed ublox M10S auto-config
...
this copes with the M10S rejecting multiple-key VALGET calls. We fall
back to fetching one at a time
2023-06-13 11:00:47 +10:00
Andrew Tridgell
531b12e272
AP_GPS: fixed RTCM injection for DroneCAN GPS
...
need to check broadcast() return
2023-06-08 10:15:50 +10:00
Alexander Keller
6ba526fa25
AP_GPS:Comform to ardupilot undulation definition
2023-06-08 09:48:30 +10:00
Peter Barker
3f70f2104a
AP_GPS: use minimize_features.inc for more features
2023-06-06 10:14:02 +10:00
bugobliterator
5026b3d08c
AP_GPS: send RTCM Stream message to over dronecan directly
2023-05-31 17:31:09 +10:00
Ryan Friedman
639ba63560
AP_GPS: Remove gsof zero initialization
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-30 09:45:29 +10:00
Peter Barker
e415b5fda0
AP_GPS: add clarifying comment on _configure_config_set method
...
it's a bit confusingly named, because it doesn't actually "set" anything - it gets messages from the GPS which are then parsed and responded to based on the received values.
2023-05-29 09:56:20 +10:00
Ryan Friedman
f092c22915
AP_GPS: Enforce max of 10 GSOF outputs per the manual
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-20 14:23:17 +10:00
Ryan Friedman
77e169b226
AP_GPS: Update GSOF docs with newer data
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-20 14:22:15 +10:00
Ryan Friedman
a05af3f3c3
AP_GPS: More const for gsofmsgreq
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-19 18:43:31 +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
5c815e2c32
AP_GPS: Reduce extra GSOF namespacing since it's all in class scope
...
* Also remove in s on enums to follow Peter's conventions
* Fixed incorrect style on class and enum names
2023-05-17 18:12:44 +10:00
Ryan Friedman
2f5f77712f
AP_GPS: Use enum classes in GSOF
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-17 18:12:44 +10:00
Ryan Friedman
29a6ae4ea1
AP_GPS: Add missing const to the rest of the headers
...
* Related to #23743 , but I missed this since I didn't realize the buffer was not modified in-place
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-15 12:25:34 +10:00
Ryan Friedman
b8f59b0df5
AP_GPS: Remove unused member variable in gsof driver
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-12 19:19: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
Peter Barker
271571e29c
AP_GPS_NMEA: fix stringop truncation failure on g++ 9
2023-04-18 11:44:57 +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
f6fa35a1f7
AP_GPS: fixed name length
2023-04-11 10:31:31 +10:00
Andrew Tridgell
834831bfeb
AP_GPS: text messages and more defines
2023-04-11 10:31:31 +10:00
Andrew Tridgell
645fd82507
AP_GPS: rename more variables, types and defines
2023-04-11 10:31:31 +10:00
Andrew Tridgell
5952eb1249
AP_GPS: update header references
2023-04-11 10:31:31 +10:00
Andrew Tridgell
258158b0bc
AP_GPS: rename UAVCAN drivers to DroneCAN
2023-04-11 10:31:31 +10:00
Andrew Tridgell
8829f54d89
AP_GPS: rename AP_UAVCAN to AP_DroneCAN
2023-04-08 07:11:23 +10:00
Ryan Friedman
c6060dd047
AP_GPS: Fix spelling in receiver
...
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-06 09:13:09 +10:00
bugobliterator
09de24f3d2
AP_GPS: replace libuavcan with libcanard based driver
2023-03-29 17:16:39 +11: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
Peter Barker
84bf020897
AP_GPS: correct config boards include
...
Important to include AP_HAL_Boards.h directly, rather than relying on someone else having done it or getting it transitively
2023-03-19 09:08:41 +11:00
Henry Wurzburg
eeb72637ec
AP_GPS:make Unicore reset to rover in all cases
2023-03-07 10:57:20 +11:00
Tom Pittenger
fe37282f77
AP_GPS: allow external libraries to detect CAN instance
2023-03-02 09:22:15 +11:00
Henry Wurzburg
7e214b2695
AP_Compass: add GPYW metadata
2023-03-02 08:37:32 +11:00
Pierre Kancir
8d962f915e
AP_GPS: change isnanf for isnan
2023-02-27 04:15:24 -08:00
Andrew Tridgell
fd0bf49ca5
AP_GPS: don't try and configure M10 options on non-M10 GPS
...
this fixes a pre-arm failure "GPS 1 failing configuration checks" on
non-M10 GPS modules, including AP_Periph
it also adds the ublox unconfigured msgs to the DroneCAN GNSS.Status
errors field for easier diagnosis of this type of issue in the future
2023-02-18 15:33:13 +11:00
Peter Barker
5423dd0210
AP_GPS: avoid using struct Location
...
clang reports this could be a problem when compiling under some EABIs. Remove it from most places as it is just noise, replace with class where we want to avoid including Location.h
2023-02-04 22:51:54 +11:00
Andrew Tridgell
7a741a0a2d
AP_GPS: fixed use of undulation for GPS2_RAW
...
GPS2_RAW needs to use undulation of 2nd receiver
2023-01-08 13:30:11 +11:00
Andrew Tridgell
17c25780c7
AP_GPS: support UNIHEADINGA message for Unicore NMEA
...
this allows for good yaw even without a RTK fix, which makes yaw with
dual-antenna Unicore GPS modules much more useful
2023-01-08 13:30:11 +11:00
Andrew Tridgell
f53c865c7a
AP_GPS: only create GPS logs for active GPS backends
2022-12-20 10:23:58 +11:00
Andrew Tridgell
fc5ae600ef
AP_GPS: fixed handling of empty HDT/THS sentences
...
fixes #22432
2022-12-20 10:23:58 +11:00
Andrew Tridgell
761e4a05e2
AP_GPS: don't consume Heading message if we have RelPosHeading
...
this avoids 2 conflicting yaw sources
2022-12-20 10:23:58 +11:00
Andrew Tridgell
b0c006deca
AP_GPS: suppress string truncation warnings
2022-12-20 10:23:58 +11:00