def METHOD_NAME(self):
    #Called frequently by mavproxy
    if self.updating == True:
        data = self.ser.readline()
        try:
            data = data.decode("ascii")
        except UnicodeDecodeError as e:
            # this is probably a baudrate issue
            now = time.time()
            if now - self.last_decode_error_print > 10:
                print("movinghome: decode error; baudrate issue?")
                self.last_decode_error_print = now
            return
        if (data.startswith("$GPGGA")):
            msg = pynmea2.parse(data)
            if int(msg.num_sats) > 5:
                #convert LAT
                DD = int(float(msg.lat)/100)
                MM = float(msg.lat) - DD * 100
                self.lat = DD + MM/60
                if msg.lat_dir == "S":
                    self.lat = -self.lat;
                #convert LON
                DD = int(float(msg.lon)/100)
                MM = float(msg.lon) - DD * 100
                self.lon = DD + MM/60
                if msg.lon_dir == "W":
                    self.lon = -self.lon;
            now = time.time()
            if now-self.last_check > self.check_interval:
                self.last_check = now
                #check if we moved enough
                self.dist = self.haversine(self.lon, self.lat, self.alt, self.lonh, self.lath, self.alth)
                if self.dist > self.radius:
                    if self.fresh == True:
                        self.say("GCS position set as home")    
                        self.fresh = False
                    else:
                        message = "GCS moved "
                        message2 = message + "%.0f" % self.dist + "meters"
                        self.say("%s: %s" % (self.name,message2))
                        message2_enc = message2.encode(bytes)
                        self.master.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_NOTICE, message2)
                    self.console.writeln("home position updated")
                    self.master.mav.command_int_send(
                    self.settings.target_system, self.settings.target_component,
                    mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT_INT,
                    mavutil.mavlink.MAV_CMD_DO_SET_HOME,
                    1, # (1, set current location as home)
                    0, # move on
                    0, # param1
                    0, # param2
                    0, # param3
                    0, # param4
                    int(self.lat*1e7), # param5
                    int(self.lon*1e7), # param6
                    0) # param7
                    self.lath = self.lat
                    self.lonh = self.lon
                    #print data
                    self.console.writeln("%s: %s %s GNSS Quality %s Sats %s "% (self.name,self.lat,self.lon,msg.gps_qual,msg.num_sats))