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
b5f3750014
AP_GPS: convert NOVA, SBP and SBP2 to use check_new_itow()
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
4af857da44
AP_GPS: adjust NMEA sentence length calculation
...
review feedback
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
Andrew Tridgell
2512b73106
AP_GPS: added ability to disable GPS
...
this is used for GPS loss testing in real vehicles, by linking it to a
RCn_OPTION value. GPS position is still logged, but is not used
2018-11-29 08:49:23 +11:00
Peter Barker
fd888727b8
AP_GPS: add override keyword where required
2018-11-08 11:30:12 +11:00
Michael du Breuil
d6944510da
AP_GPS: Suppress clearing non-trival type warning
2018-10-30 16:17:03 -07:00
ebethon
f67a9af339
AP_GPS: fix SBAS mode in the SBP2 driver
2018-10-24 13:12:34 -07:00
Andrew Tridgell
249291eac0
AP_GPS: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Peter Barker
40daa8e15f
AP_GPS: use mavlink definition to get statustext size
...
Also, add one for null-termination
2018-10-16 10:11:28 +11:00
liang.tang
7885b267f0
AP_GPS: fix UAVCAN gps message handlers
2018-09-05 17:23:14 +10:00
Michael du Breuil
70e587b572
AP_GPS: Fix accidental quantization to float on SBF logging
2018-08-31 01:16:31 +01:00
Siddharth Purohit
ca54123b7d
AP_GPS: move UAVCAN GPS related code to AP_GPS_UAVCAN backend
2018-08-29 22:54:59 +01:00
Patrick José Pereira
10ffd89a0c
AP_GPS: Remove unused operation
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-08-27 23:35:34 +01:00
Dr.-Ing. Amilcar do Carmo Lucas
9c97f35b19
AP_GPS: Use GPS_AUTO_SWITCH parameter to choose exacly which GPS to use
2018-08-26 01:05:09 -07:00
Francisco Ferreira
b29369eb82
AP_GPS: adapt to changes in AP_BoardConfig_CAN
2018-08-12 13:35:03 +01:00
Michael du Breuil
1a406dacfc
AP_GPS: Ensure a lag value is always provided
...
The value may not be the optimal value for the driver, but we should
always try to provide a value for the caller
2018-08-07 09:55:26 +10:00
Michael du Breuil
cca6b54921
AP_GPS: Remove unneeded field limitations
...
Saves ~1100 bytes of flash
2018-08-01 09:19:20 +10:00
Michael du Breuil
fcb1c4cdfd
AP_GPS: Remove unused ADC include
2018-07-17 09:29:50 +10:00
Alexander Remizov
dc15cbd513
AP_GPS: fixed ublox configuration
2018-06-24 15:25:00 -07:00
Andrew Tridgell
796291f176
AP_GPS: improved ccache build speed
...
making this header equal improves speed of fmuv2 build after fmuv3
build with ccache, without affecting binary
2018-06-22 11:13:03 +10:00
Peter Barker
5b41db5120
AP_GPS: use AP_RTC
...
set the system time from a GPS if we have a 3D fix or better
2018-06-15 08:01:22 +10:00
Eugene Shamaev
9985d4a937
AP_GPS: uniform naming
2018-06-09 22:46:48 -07:00
Eugene Shamaev
9f27a65f4b
AP_GPS: helper func
2018-06-09 22:46:48 -07:00
Eugene Shamaev
a805b3ce18
AP_GPS: reducing indenting by linearizing the logic
2018-06-09 22:46:48 -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
Francisco Ferreira
5fc7da0e83
AP_GPS: remove Qualcomm board support
2018-05-17 09:57:20 +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
Dr.-Ing. Amilcar do Carmo Lucas
9b9932ca9c
AP_GPS: Document septentrio RXERROR flags
2018-05-06 20:32:39 -06:00
Andrew Tridgell
4e1d310959
AP_GPS: fixed use of pow()
2018-05-07 11:43:23 +10:00
Andrew Tridgell
53d36c02ae
AP_GPS: enable double precision maths where needed
2018-05-07 11:43:23 +10:00
Michael du Breuil
88ea7ac5fa
AP_GPS: Remove software check from SBF driver
2018-05-06 14:52:04 -06:00
Michael du Breuil
b1a3e0a537
AP_GPS: Report when SBF errors change
2018-04-24 12:32:35 -07:00
Peter Barker
643e7e039a
AP_GPS: log received data
...
Also log a set of flag values if a driver is deleted
2018-04-18 13:50:55 +09:00
Patrick José Pereira
a255c47c33
AP_GPS: Do not restart driver if type is defined as MAV
...
Fix bluerobotics/ardusub#104
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-04-16 17:08:39 -07:00
Michael du Breuil
362fb470c4
AP_GPS: Allow HIL_GPS to flag vertical velocity
...
Closes #7997
2018-04-10 17:01:21 +01:00
Michael du Breuil
a21eb12f9e
AP_GPS: Correct HIL_GPS altitude conversion
2018-04-02 20:21:20 -07:00
Peter Barker
816045c1ab
AP_GPS: correct compiler warnings
...
In file included from ../../libraries/AP_GPS/AP_GPS_SBF.cpp:22:
../../libraries/AP_GPS/AP_GPS_SBF.h:75:14: warning: private field
'last_injected_data_ms' is not used [-Wunused-private-field]
uint32_t last_injected_data_ms = 0;
^
../../libraries/AP_GPS/AP_GPS_SBF.h:210:7: warning: private field
'RxError_bits' is not used [-Wunused-private-field]
} RxError_bits;
2018-03-02 09:26:37 +09:00
chobits
ea1a6b2044
AP_GPS: set have_vertical_velocity if MAVLink GPS report it
2018-03-01 14:31:56 -07:00
Tom Pittenger
793f50808d
AP_GPS: add param defaults for EMLID_EDGE for GPS_TYPE=9
2018-02-13 15:29:53 +11:00
Michael du Breuil
9e37e9ee82
AP_GPS: Remove unused blending function.
...
Thanks to ender-chen for noticing, closes #7510
2018-01-09 12:52:32 -08:00
Dr.-Ing. Amilcar Do Carmo Lucas
479d4be3fd
AP_GPS: Add horizontal, vertical and speed accuracy to the GPS_RAW_INT message
2018-01-09 13:01:05 +11:00
Andrew Tridgell
d2c9e2719e
AP_GPS: removed create() method for objects
...
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
2017-12-14 08:12:28 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
9b2e48ce10
AP_GPS: Improve comments (NFC)
2017-12-05 10:44:58 +09:00
Peter Barker
47f8ed7fab
AP_GPS: set GPS_SAVE_CFG default to save GPS config as required
2017-11-29 00:58:43 -07:00
Andrew Tridgell
9677d570e9
AP_GPS: faster GPS lock
...
use 9600 and 115200 first
2017-11-29 00:58:43 -07:00
Peter Barker
693823ae0d
AP_GPS: add gps() to AP:: namespace
2017-11-15 13:43:03 +00:00
Michael du Breuil
236e74c529
AP_GPS: Singleton
2017-11-06 01:33:57 +00:00
Michael du Breuil
c856cc6f33
AP_GPS: Allow GPS's to run functions on arming (used by SBF)
...
Supports starting/stopping GPS logging
2017-11-06 01:33:57 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
68828511cd
AP_GPS: Only send GPS*_RTK mavlink messages if the backend supports them
2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
e0c2a45eec
AP_GPS: support GPS_RTK and GPS2_RTK messages in Emlid reach modules. Requires Reach FW >= 2.7.4
2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
c0dd7984ad
AP_GPS: Publish information on the GPS*_RTK mavlink messages
2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
bf6778277e
AP_GPS: implement GPS*_RTK mavlink messages
2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
430b863f42
AP_GPS: Replace hardcoded duplicated end_mavlink_gps*_rtk() function with a flexible one
2017-10-30 18:28:20 +00:00
Michael du Breuil
b0e18de576
AP_GPS: Remove detect helpers for MTK/SIRF when minimizing the build
...
Removes 16 bytes
2017-10-22 03:03:29 +01:00
Michael du Breuil
0300f86913
AP_GPS: u-blox: Log unconfigured messages
2017-10-06 12:53:32 +01:00
Michael du Breuil
3023fac4d0
AP_GPS: SBF enable comment block logging
...
This is intended to help with GCS's injecting custom data to the GPS
2017-09-27 19:29:32 +01:00
Michael du Breuil
561acb372e
AP_GPS: SBF send port enable string on start
...
Also prohibts SBF, GSOF, NOVA drivers from getting config strings not
meant for them
2017-09-27 19:29:32 +01:00
Michael du Breuil
bfbec02736
AP_GPS: SBF track the GPS error bits
2017-09-27 19:29:32 +01:00
Michael du Breuil
0d522663b2
AP_GPS: SBF: fix the PVTMode to support PPK (and baseline) units
2017-09-27 19:29:32 +01:00
Michael du Breuil
80b71b9ced
AP_GPS: SBF: Validate that configuration was accepted
...
Note: The config string of "spm, Rover, StandAlone+SBAS+DGPS+RTK\n" is
incompatible with AsteRx-M FW 3.6.3 and will result in refusing to
arm/pass configuration checks
2017-09-27 19:29:32 +01:00
Michael du Breuil
20988b9f05
AP_GPS: SBF respect GPS_AUTO_CONFIG
2017-09-27 19:29:32 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
09baac8f25
AP_GPS: Preserve the instance number, otherwise it will get set to zero
...
Signed-off-by: Dr.-Ing. Amilcar Do Carmo Lucas <amilcar.lucas@iav.de>
2017-09-26 23:15:10 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas
8b9fb19061
AP_GPS: Added const just to be explicit (NFC)
...
Signed-off-by: Dr.-Ing. Amilcar Do Carmo Lucas <amilcar.lucas@iav.de>
2017-09-26 23:15:10 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas
175b7c5389
AP_GPS: spellcheck in coment (NFC)
2017-09-26 23:15:10 -07:00
Lucas De Marchi
b05610870c
global: use static method to construct AP_Rally
2017-09-26 03:01:21 +01:00
Lucas De Marchi
69b6d95cb2
global: use static method to construct AP_Board_Config{,_CAN}
2017-09-26 03:01:21 +01:00
Lucas De Marchi
72fd2d6f05
global: use static method to construct AP_SerialManager
2017-09-26 03:01:21 +01:00
Lucas De Marchi
8094482f21
global: use static method to construct AP_GPS
2017-09-26 03:01:21 +01:00
Lucas De Marchi
2cb2727a31
AP_GPS: add static create method
2017-09-26 03:01:21 +01:00
chobitsfan
02cfe9128d
AP_GPS: parse RTK status in NMEA GGA message
2017-09-15 22:33:47 +01:00
Michael du Breuil
2f8f2ffd2d
AP_GPS: Remove NMEA init blobs for binary drivers
...
All of the init strings that were sent in the NMEA driver are for GPS protocols
which have binary drivers, which provide far more features and are more robust.
It also appears that due to driver changes the config strings for SIRF/UBLOX
were no longer correct anyways).
2017-09-15 14:30:48 -07:00
Dr.-Ing. Amilcar Do Carmo Lucas
d3a18e803e
AP_GPS: Fix MAVLink message field SYSTEM_TIME.time_unix_usec when GPS_AUTO_SWITCH = blend
...
The mavlink message field SYSTEM_TIME.time_unix_usec works fine with GPS_AUTO_SWITCH == 0 (no switch) or ==1 (usebest)
But when GPS_AUTO_SWITCH == 2 (blend) then state[GPS_BLENDED_INSTANCE].last_gps_time_ms gets initialized with 0 and never rewritten.
The consequence: SYSTEM_TIME.time_unix_usec gets stuck at zero.
The solution: Do not reset state[GPS_BLENDED_INSTANCE].last_gps_time_ms because it would overwrite the correct value already set on line 1149
2017-09-14 12:38:30 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
e03826890a
AP_GPS: Fix typo in comment
2017-09-13 14:22:57 -07:00
Michael du Breuil
04eb7f411e
AP_GPS: Track the delta time between the last GPS positions
2017-09-13 13:36:40 +01:00
Michael du Breuil
be371e09f9
AP_GPS: SBF: Reject short packets early, allow 256 byte long messages to be decoded
2017-09-06 10:41:36 +10:00
Andrew Tridgell
048dfee68a
AP_GPS: make SBF driver more robust
...
this fixes a crash bug in the SBF GPS driver where a badly formed packet
could cause crc16_ccitt to reference invalid memory
2017-09-06 10:41:33 +10:00
Lucas De Marchi
b62e8909c4
AP_GPS: add missing fallthrough
2017-09-01 13:45:22 -07:00
Lucas De Marchi
3414883f05
AP_GPS: remove tabs and fix coding style
2017-08-22 23:59:13 -07: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
7f59279670
AP_GPS: make time_epoch_usec const
2017-07-28 14:27:53 +01:00
Peter Barker
e7ff5107fb
AP_GPS: tidy mavlink message handling using switch statement
2017-07-27 12:03:25 +01:00
Peter Barker
2ad453fc89
AP_GPS: handle inject packets as part of handle_msg
2017-07-27 12:03:25 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
b791fef7cb
AP_GPS: Publish the number of satellites in the RTK correction messages, and the age of the RTK correction messages
2017-07-19 20:42:23 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
ae47ac5a09
AP_GPS: implement missing "RTK number of satellites" and "RTK correction age" information in the GPS2_RAW MAVLink message
2017-07-19 20:42:23 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
059c213d19
AP_GPS: Improve comments and documentation (NFC)
2017-07-19 20:42:23 +09:00
Michael du Breuil
5684a5dd36
AP_GPS: Only setup state's instance field during init
2017-07-18 21:21:50 +01:00
Andrew Tridgell
82e7e44cc3
AP_GPS: fixed UAVCAN as 2nd GPS
...
This fixes the issue here:
https://discuss.ardupilot.org/t/ac3-6-dev-dual-gps-issues/19172
thanks to Francisco for spotting the issue
this is tested with UAVCAN as 2nd GPS, ublox as primary
2017-07-18 18:57:55 +01:00
Peter Barker
76847a2487
AP_GPS: eliminate GCS_MAVLINK::send_statustext_all
2017-07-11 23:53:53 +01:00
Michael du Breuil
cb1b9b6674
AP_GPS: Fix SBF race condition on start
...
Unsure what the underlying problem is, but the length of the first string in
the initilisation_blob increasing resulted in a race condition, waiting
longer before retrying the message resolves it, but we still need to identify
the underlying problem. This patch just results in the GPS working with current
configurations. Tested against AsteRx-M firmware 3.6.3
2017-07-11 09:40:02 +09:00
Eugene Shamaev
5341e51f45
AP_GPS: support for multiple instances on different interfaces
2017-07-03 11:44:32 +01:00
Peter Barker
cbe9627bf5
AP_GPS: correct example
2017-06-29 15:43:38 +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
Francisco Ferreira
f35f0d59dd
AP_GPS: fix SBP2 driver build warnings by using memcpy
...
Build gave the following warnings:
../../libraries/AP_GPS/AP_GPS_SBP2.cpp: In member function ‘void AP_GPS_SBP2::_sbp_process_message()’:
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:181:78: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_heartbeat = *((struct sbp_heartbeat_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:181:28: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_heartbeat = *((struct sbp_heartbeat_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:186:76: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_gps_time = *((struct sbp_gps_time_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:186:27: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_gps_time = *((struct sbp_gps_time_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:190:74: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_vel_ned = *((struct sbp_vel_ned_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:190:26: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_vel_ned = *((struct sbp_vel_ned_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:194:74: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_pos_llh = *((struct sbp_pos_llh_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:194:26: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_pos_llh = *((struct sbp_pos_llh_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:198:68: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_dops = *((struct sbp_dops_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:198:23: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_dops = *((struct sbp_dops_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:202:74: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_event = *((struct sbp_ext_event_t*)parser_state.msg_buff);
^
../../libraries/AP_GPS/AP_GPS_SBP2.cpp:202:24: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
last_event = *((struct sbp_ext_event_t*)parser_state.msg_buff);
^
2017-06-29 15:18:09 +01:00
ebethon
005dbf41a7
AP_GPS: Add SBP EXT_EVENT Message to dataflash log
2017-06-29 15:18:05 +01:00
ebethon
4779a8f1f1
AP_GPS: Rename SBR1/SBR2 to SBRH/SBRM and change format
...
Add (sender_id, msg_len) in SBRM message
Add index/pages in SBRH/SBRM messages
Change format to integers to avoid GCS string parsing
Decrease data size in SBRH
2017-06-29 15:14:54 +01:00
Rob Ratcliff
60c6f8ad60
AP_GPS: fix bug when injecting messages bigger than 255 bytes
...
Commit 5261654
changed the used injection method so change this method signature to use uint16 for message length like previous injection method did
2017-06-27 03:06:26 +01:00
Michael du Breuil
249849dfa4
AP_GPS: Add an enum for _auto_config
2017-06-21 11:44:45 +01:00