2017-11-06 2 views
0

Nachdem ich durch die Logs eines letzten Testflugs geschaut hatte, meldete mein Schiff einen Wert von 4 für die Variable fix_type der Klasse dronekit.GPSInfo(eph, epv, fix_type, satellites_visible).GPS fix_type Wert = 4

eph und epv hatte keinen Wert und satellites_visible zwischen 9 und 12 variiert

Der Flug 30 Minuten lang war. Das GPS-Modul ist UBlox GPS + Kompass-Modul.

Drinnen bekomme ich fix_type 0 oder 1 wie erwartet, aber draußen Türen bekomme ich 3-4? Ich kann Informationen über einen 3D-Fix finden, aber was bedeutet ein 4D GPS-Fix?

Wie wird diese Variable im Quellcode gesetzt?

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) 

Antwort

0

Andere UBLOX GPS codestruct gpsData definiert fix Typ wie die folgenden Werte aufweisen:

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 sind die Werte 4 und 5 wahrscheinlich nicht bedeuten, 4D und 5D behebt, wie Sie die Werte für 2 und 3 gegeben assume und machen angesichts des beschriebenen Szenarios Sinn.