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
The NMEA GPHDT sentence can be used to determine the vehicles bearing
instead of a compass even when the vehicle is stationary. This type
of GPS is normally very expensive and does the bearing using some sort
of phase ambituity algorithm.
See discussion here:
https://github.com/ArduPilot/ardupilot/issues/7331
we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach
Thanks to assistance from Lucas, Peter and Francisco
This fixes the MAVLink reporting for unknown dops, and avoids the situation where a GPS driver could report a worse DOP then we could handle.
Also corrects an apparent error in the HIL_GPS MAVLink message, where we would always select the unknown dop value rather then provided DOP.
This commit adds:
- New driver for SBPv2
--- Support Piksi Multi, Swift Navigation's multi-band multi-constellation GPS
--- Proper parsing of SBP flags
--- Instant response to Piksi status changes (no more timeouts)
--- Support for Piksi Multi as a Single-Point-Positioning GPS or only onboard GPS
--- Incorporates horizontal and vertical accuracy estimates, and vdop.
- Updates driver for SBPv0
--- Continue support for previous Piksi
- Dispatches correct driver based on SBP version.
This includes these changes:
RATE_MS, RATE_MS2 parameter description Range minimum reduced to 50
_blend_health_counter is reset to 0 if blending is disabled
GPS_MAX_RECEIVERS is replaced with GPS_BLENDED_INSTANCE where appropriate
simplify all_consistent functions check of number of receivers
calc_blended_weights fix for initial check of how many receivers we have
remove unnecessary setting of GPS last time when blending fails
remove RebootRequired from AUTO_SWITCH param description
backends become friends so they can continue to access parameters held in frontend
get_rate_ms made private because only used by frontend
Also moved static arrays higher in cpp file
highest_supported_status will always return FIX_3D for blended or invalid instance
setHIL_Accuracy checks instance is 2 or less
send_mavlink_gps2_raw uses num_instances variable directly to avoid confusion with num_sensors
If the user sets a non-zero value of the delay it will be used in preference over the default value for that GPS type.
If the GPS type is unknown and the parameter is set to zero, then a default delay of 1 sample period will be used (eg 200ms for 5Hz).
This is a revert of 7c3b8dceb which tried to start at index 0 of the
array of baudrates, however because of the way last_baud is used
this lead to a GPS always being reported as being 1 index off which
lead to users getting reports of baud rates that their GPS wasn't
configured for
Also renames last_baud to be current_baud as that is how it's
actuallly used and should reduce future confusion
And fixed some tabs/vs space issues around where the last_baud rate
was incremented.
Due to the way the headers are organized a single change in a
AP_GPS backend would trigger a rebuild for most of the files in the
project. Time could be saved by using ccache (since most of the things
didn't change) but we can do better, i.e. re-organize
the headers so we don't have to re-build everything.
This makes internal headers internal and then other libraries only
depend on the AP_GPS.h header.
The ublox driver will now continuosly poll for the settings from the GPS and correct any that are found to be in correct.
This status is then reported to the arming library as an additional arming check, allowing the user to be sure that the
gps is correctly configured before using it. If a user has a GPS2 configured that is not present they will fail the arming
checks until after they have disabled the second GPS.
2 new parameters were introduced as well:
-GPS_AUTO_CONFIG: Will not request any configuration packets to attempt to change them. (If the packet is recieved then
a update will be sent to it, but in testing this scenario never occured. This is set to 1 or 0 to change the setting.
(Defaults to 1 enabling auto config)
-GPS_GNSS_MODE2: Behaves the same way as GPS_GNSS_MODE but only applies to the second GPS.
GPS drivers are now allowed 2 seconds of non responsiveness before being unloaded
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.
In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.
AVR-specific places were not changed.