code: def cmd_set_home(self, args):
          '''called when user selects "Set Home" on map'''
          (lat, lon) = (self.click_position[0], self.click_position[1])
          alt = self.ElevationMap.GetElevation(lat, lon)
          print("Setting home to: ", lat, lon, alt)
          self.master.mav.command_long_send(
              self.settings.target_system, self.settings.target_component,
              mavutil.mavlink.MAV_CMD_DO_SET_HOME,
              1, # set position
              0, # param1
              0, # param2
              0, # param3
              0, # param4
              lat, # lat
              lon, # lon
              altf cmd_set_home(self, args):
          '''called when user selects "Set Home" on map'''
          (lat, lon) = (self.click_position[0], self.click_position[1])
          alt = self.ElevationMap.GetElevation(lat, lon)
          print("Setting home to: ", lat, lon, alt)
          self.master.mav.command_long_send(
              self.settings.target_system, self.settings.target_component,
              mavutil.mavlink.MAV_CMD_DO_SET_HOME,
              1, # set position
              0, # param1
              0, # param2
              0, # param3
              0, # param4
              lat, # lat
              lon, # lon
              alt)
docs: called when user selects "Set Home" on map