Co-authored-by: Andrew Tridgell <andrew@tridgell.net>
uses the elements out of the simulated GPS data "d", rather than going to the parameters in teh simulated GPS "backends".
- checksum calculation was including header parts in CRC twice
- need to send DOP message to make EKF happy
- need to supply own number of satellites
- must pad packets to a multiple of 4 bytes
Remove unnecessary header
Switch parameters to default initialization
Change pointer casting to prevent a const_cast, and remove doubled sync byte when echoing ASCII messages
Fix Valgrind report by preventing use of nmea_printf on buffers which may not be null-terminated
gimbal was sending mavlink into ArduPilot with the target system's own sysid/compid tuple. ArduPilot was simply discarding these as its own messages being looped back to it
Aside from the RRG,1 call, the simulation should reply with exactly what was received as a receipt confirmation to allow the driver to proceed past init
Airspeed calculation for JSON was not quite working because velocity_air_ef was not updated in SIM_JSON.cpp
Update libraries/SITL/SIM_JSON.cpp
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
Update libraries/SITL/SIM_JSON.cpp
Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com>
comment changes
remove redundant airspeed calculation
I have no idea if this is actually the sort of number which these devices will return.
However, for the EKF to be happy with the GPS the reported speed accuracy must be much lower than the SBP2 driver reports when we give it these numbers.
It might be that we are interpretting these fields incorrectly in the driver and that the simulator is, in fact, correct.
* Rename NMEA heading to ground_course_deg
* Rename heading() utility to ground course (it was wrong)
* Add _rad prefix to be pedantic about units
* Add missing degrees conversion in NMEA because NMEA is not SI
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>