def read_sensor(self):
        data = self.read_raw_gpsd_data()
        if data is None:
            return self.latest_return

        if data['class'] == 'TPV':
            if data.get('mode') == 1:  # really a number, not a string?
                return self.default_return
            else:
                self.latest_return = (
                    data.get('mode'),
                    data.get('lat'),
                    data.get('lon'),
                    data.get('track'),
                    data.get('speed'),
                    self.num_sat,
                    data['time'].split('T')[1],
                    data['time'].split('T')[2])
                return self.latest_return
        elif data['class'] == 'SKY':
            if 'satellites' in data.keys():
                self.num_sat = len(data['satellites'])
            else:
                self.num_sat = 0
        else:
            return self.latest_return
Read the newest data from gpsd and return a formatted version.
dataset/ETHPy150Open FishPi/FishPi-POCV---Command---Control/fishpi/sensor/gpsd/gpsd_interface.py/gpsdInterface.read_sensor