Home position is deinitialized on disarm at gpsUpdate, so it can't be missed
DistanceFlown is reset inside GPS_calculateDistanceFlown
DistanceFlown was not calculated properly
Harmonized (and partly corrected) all occurancies of gpsSol.llh.alt and getEstimatedAltitude() to handle altiude sourced in cm resolution.
This was introduced by GSP_RESCUE/RTH.
Introduced a naming convention that include the unit into the variable/function names:
gpsSol.llh.alt -> gpsSol.llh.alt_cm
getEstimatedAltitude() -> getEstimatedAltitude_cm()
Before GPS_RESCUE it was decimeter (0.1m per lsb) from ublox but meter (1m per lsb) from NMEA, stored as unit16.
Now both protocols should deliver centimeters (0.01m per lsb), stored as int32 in order to cover negative and high altitudes too.
Fixes underflows at negative altitude (below MSL) and overflows at altitude higher than 655.35m
Corrected parenthesis in maths.h avoid incorrect equations if arguments contain expressions.
* Get time using gps with nmea and ublox protocol. The rtctime is set once gps time is available.
* Fix issues with Gps time
* Fix problems with gpstime
Updated default gps_auto_config dynamic model to airborn4g. ALSO Added airborne1g (which is commented out) so testing can be carried out on both modes.
I am new to this... terminology is foreign, please bear with me :/
Using a ublox M8N gps receiver on my BFF3, velocity readings were very laggy and inaccurate; readings were unusable. After researching, I compiled a hex where the gps_auto_config sets the "dynamic platform model" to the airborne <2g mode. Once done, I compared osd velocity readings to my car with excellent results and response time. I have flown about a dozen times since and the difference is astounding (sample video: https://youtu.be/CLArfxTj15M).
From the ublox documentation:
"7.1 Platform settings
u-blox receivers support different dynamic platform models (see table below) to adjust the navigation engine to
the expected application environment. These platform settings can be changed dynamically without performing
a power cycle or reset. The settings improve the receiver's interpretation of the measurements and thus provide
a more accurate position output. Setting the receiver to an unsuitable platform model for the given application
environment is likely to result in a loss of receiver performance and position accuracy."
link: https://www.u-blox.com/sites/default/files/products/documents/u-blox8-M8_ReceiverDescrProtSpec_%28UBX-13003221%29_Public.pdf