code: def get_home(self):
          '''get home location'''
          if 'HOME_POSITION' in self.master.messages:
              h = self.master.messages['HOME_POSITION']
              return mavutil.mavlink.MAVLink_mission_item_message(self.target_system,
                                                                  self.target_component,
                                                                  0,
                                                                  0,
                                                                  mavutil.mavlink.MAV_CMD_NAV_WAYPOINT,
                                                                  0, 0, 0, 0, 0, 0,
                                                                  h.latitude*1.0e-7, h.longitude*1.0e-7, h.altitude*1.0e-3)
          if self.wploader.count() > 0:
              return self.wploader.wp(0)
          return Nonf get_home(self):
          '''get home location'''
          if 'HOME_POSITION' in self.master.messages:
              h = self.master.messages['HOME_POSITION']
              return mavutil.mavlink.MAVLink_mission_item_message(self.target_system,
                                                                  self.target_component,
                                                                  0,
                                                                  0,
                                                                  mavutil.mavlink.MAV_CMD_NAV_WAYPOINT,
                                                                  0, 0, 0, 0, 0, 0,
                                                                  h.latitude*1.0e-7, h.longitude*1.0e-7, h.altitude*1.0e-3)
          if self.wploader.count() > 0:
              return self.wploader.wp(0)
          return None
docs: get home location