code: def mavlink_packet(self, msg):
          '''handle an incoming mavlink packet'''
          type = msg.get_type()
          master = self.master
          # add some status fields
          if type == 'TERRAIN_REQUEST':
              self.current_request = msg
              self.sent_mask = 0
              self.requests_received += 1
          elif type == 'TERRAIN_REPORT':
              if (msg.lat == self.check_lat and
                  msg.lon == self.check_lon and
                  (self.check_lat != 0 or self.check_lon != 0)):
                  print(msg)
                  self.check_lat = 0
                  self.check_lon = f mavlink_packet(self, msg):
          '''handle an incoming mavlink packet'''
          type = msg.get_type()
          master = self.master
          # add some status fields
          if type == 'TERRAIN_REQUEST':
              self.current_request = msg
              self.sent_mask = 0
              self.requests_received += 1
          elif type == 'TERRAIN_REPORT':
              if (msg.lat == self.check_lat and
                  msg.lon == self.check_lon and
                  (self.check_lat != 0 or self.check_lon != 0)):
                  print(msg)
                  self.check_lat = 0
                  self.check_lon = 0
docs: handle an incoming mavlink packet