def update(self, data):
        """ Update observed speed, heading, location from model and sensor data. """
        if data.has_time:
            #data.timestamp
            #data.datestamp
            pass

        if data.has_compass:
            compass_heading = data.compass_heading
            compass_pitch = data.compass_pitch
            compass_roll = data.compass_roll
            
        if data.has_GPS and data.fix:
            lat = data.lat
            lon = data.lon
            # heading only vaild above speed x
            gps_heading = data.gps_heading
            gps_speed = data.speed
            altitude = data.altitude
            num_sat = data.num_sat
                
        # temp - use GPS speed
        if data.has_GPS and data.fix:
            self._observed_speed = 0.0 #gps_speed

        # temp - average compass and GPS headings
        if data.has_compass and data.has_GPS and data.fix:
            self._observed_heading = 2.0 / (compass_heading + gps_heading)
        elif data.has_compass:
            self._observed_heading = compass_heading
        elif data.has_GPS and data.fix:
            self._observed_heading = gps_heading
dataset/ETHPy150Open FishPi/FishPi-POCV---Command---Control/fishpi/perception/world.py/PerceptionUnit.update/swapped operands of `/`