code: def mavlink_packet(self, m):
          '''handle an incoming mavlink packet'''
          if m.get_type() == 'VFR_HUD' and ('GPS_RAW' in self.status.msgs or 'GPS_RAW_INT' in self.status.msgs):
              self.check_heading(m)
              if self.settings.speedreporting:
                  if m.airspeed != 0:
                      speed = m.airspeed
                  else:
                      speed = m.groundspeed
                  self.report_change('speed', speed, maxdiff=2, deltat=2)
          if self.status.watch == "sensors" and time.time() > self.sensors_state.last_watch + 1:
              self.sensors_state.last_watch = time.time()
              self.cmd_sensors([]f mavlink_packet(self, m):
          '''handle an incoming mavlink packet'''
          if m.get_type() == 'VFR_HUD' and ('GPS_RAW' in self.status.msgs or 'GPS_RAW_INT' in self.status.msgs):
              self.check_heading(m)
              if self.settings.speedreporting:
                  if m.airspeed != 0:
                      speed = m.airspeed
                  else:
                      speed = m.groundspeed
                  self.report_change('speed', speed, maxdiff=2, deltat=2)
          if self.status.watch == "sensors" and time.time() > self.sensors_state.last_watch + 1:
              self.sensors_state.last_watch = time.time()
              self.cmd_sensors([])
docs: handle an incoming mavlink packet