def METHOD_NAME(self, ac_id, msg):
    if msg.name == "INS":
        self.msg_count = self.msg_count + 1
        newx = float(msg.get_field(0)) / 256.0
        newy = float(msg.get_field(1)) / 256.0
        moved = ((newx - self.ins_msg_x) ** 2 + (newy - self.ins_msg_y) ** 2)
        if self.init == 0:
            self.init = 1
        elif self.running:
            self.distance = self.distance + math.sqrt(moved)
        self.ins_msg_x = newx
        self.ins_msg_y = newy
        self.ins_msg_z = msg.get_field(2)
        # graphical update
        wx.CallAfter(self.update)
    if msg.name == "ROTORCRAFT_STATUS":
        self.msg_count_time = self.msg_count_time + 1
        time_new = float(msg['cpu_time'])
        if time_new > self.time_old and self.time_old != 0 and self.running:
            self.time_elapsed += time_new - self.time_old
        self.time_old = time_new
        # graphical update
        wx.CallAfter(self.update)