MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / clean_data

Method clean_data

Software/Python/Examples/gps_reading.py:42–61  ·  view source on GitHub ↗

clean_data: ensures that all relevant GPS data is set to either empty string or -1.0, or -1, depending on appropriate type This occurs right after initialisation or after 50 attemps to reach GPS

(self)

Source from the content-addressed store, hash-verified

40 # self.get_date() # attempt to gete date from GPS.
41
42 def clean_data(self):
43 '''
44 clean_data:
45 ensures that all relevant GPS data is set to either empty string
46 or -1.0, or -1, depending on appropriate type
47 This occurs right after initialisation or
48 after 50 attemps to reach GPS
49 '''
50 self.timestamp = ""
51 self.lat = -1.0 # degrees minutes and decimals of minute
52 self.NS = ""
53 self.lon = -1.0
54 self.EW = ""
55 self.quality = -1
56 self.satellites = -1
57 self.altitude = -1.0
58
59 self.latitude = -1.0 #degrees and decimals
60 self.longitude = -1.0
61 self.fancylat = "" #
62
63 def get_date(self):
64 '''

Callers 2

__init__Method · 0.95
readMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected