-import location
+try :
+ import location
+except :
+ import hildongtk.location as location
import gobject
lat , lon , alt = None , None , None
if self.device.fix[1] & location.GPS_DEVICE_LATLONG_SET:
- lat , lon = device.fix[4:6]
+ lat , lon = self.device.fix[4:6]
if self.device.fix[1] & location.GPS_DEVICE_ALTITUDE_SET:
- alt = device.fix[7]
+ alt = self.device.fix[7]
# FIXME : get time from GPS fix
self.info = state , self.device.satellites_in_view , self.device.satellites_in_use , self.device.fix[2] , lat , lon , alt
self.satellites = self.device.satellites
else :
self.info = None, 0, 0, None, None, None, None
+ def __str__ ( self ) :
+ output = map( str , self.info )
+ return " ".join( output )
+
def report ( self ) :
return "%d gps" % self.ngps