After looking through the logs of a recent test flight my craft reported a value of 4 for the variable fix_type
of class dronekit.GPSInfo(eph, epv, fix_type, satellites_visible)
.
eph
and epv
had no value and satellites_visible
varied between 9 and 12.
The flight was 30 minutes long. The GPS module is ublox gps + compass module.
Indoors I get fix_type
0 or 1 as expected, but out doors I get 3-4? I can find info on a 3D fix, but what does a 4D GPS fix mean?
How is this variable getting set in the source code?
class GPSInfo(object):
"""
Standard information about GPS.
If there is no GPS lock the parameters are set to ``None``.
:param Int eph: GPS horizontal dilution of position (HDOP).
:param Int epv: GPS vertical dilution of position (VDOP).
:param Int fix_type: 0-1: no fix, 2: 2D fix, 3: 3D fix
:param Int satellites_visible: Number of satellites visible.
.. todo:: FIXME: GPSInfo class - possibly normalize eph/epv? report fix type as string?
"""
def __init__(self, eph, epv, fix_type, satellites_visible):
self.eph = eph
self.epv = epv
self.fix_type = fix_type
self.satellites_visible = satellites_visible
def __str__(self):
return "GPSInfo:fix=%s,num_sat=%s" % (self.fix_type, self.satellites_visible)
Other UBLOX GPS code struct gpsData
defines fix type as having the following values:
GNSSfix Type:
0: no fix
1: dead reckoning only
2: 2D-fix
3: 3D-fix
4: GNSS + dead reckoning combined,
5: time only fix
So the values 4 and 5 likely do not mean 4D and 5D fixes as you assume given the values for 2 and 3, and make sense given the scenario you describe.