From 1e2d8c678ed4c5f30b36d899986d195b85d6f627 Mon Sep 17 00:00:00 2001 From: Stephen Dade Date: Tue, 3 Sep 2024 20:49:41 +1000 Subject: [PATCH] Map: remove set_secondary_vehicle_position --- MAVProxy/modules/mavproxy_map/__init__.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/MAVProxy/modules/mavproxy_map/__init__.py b/MAVProxy/modules/mavproxy_map/__init__.py index 5340567d7c..2ecfcbdc23 100644 --- a/MAVProxy/modules/mavproxy_map/__init__.py +++ b/MAVProxy/modules/mavproxy_map/__init__.py @@ -1057,20 +1057,6 @@ def cmd_clear(self, args): self.map.add_object(mp_slipmap.SlipClearLayer(3)) self.have_vehicle = {} - def set_secondary_vehicle_position(self, m): - '''show 2nd vehicle on map''' - if m.get_type() != 'GLOBAL_POSITION_INT': - return - (lat, lon, heading) = (m.lat*1.0e-7, m.lon*1.0e-7, m.hdg*0.01) - if abs(lat) < 1.0e-3 and abs(lon) > 1.0e-3: - return - # hack for OBC2016 - alt = self.module('terrain').ElevationModel.GetElevation(lat, lon) - agl = m.alt * 0.001 - alt - agl_s = str(int(agl)) + 'm' - self.create_vehicle_icon('VehiclePos2', 'blue', follow=False, vehicle_type='plane') - self.map.set_position('VehiclePos2', (lat, lon), rotation=heading, label=agl_s, colour=(0,255,255)) - def update_vehicle_icon(self, name, vehicle, colour, m, display): '''update display of a vehicle on the map. m is expected to store location in lat/lng *1e7 @@ -1198,7 +1184,7 @@ def mavlink_packet(self, m): elif mtype == "NAV_CONTROLLER_OUTPUT": tlayer = 'Trajectory%u' % m.get_srcSystem() - if (self.master.flightmode in [ "AUTO", "GUIDED", "LOITER", "RTL", "QRTL", "QLOITER", "QLAND", "FOLLOW", "ZIGZAG" ] and + if (self.master.flightmode in [ "AUTO", "GUIDED", "LOITER", "RTL", "QRTL","QLOITER", "QLAND", "FOLLOW", "ZIGZAG", "CIRCLE"] and m.get_srcSystem() in self.lat_lon_heading): (lat,lon,_) = self.lat_lon_heading[m.get_srcSystem()] trajectory = [ (lat, lon), @@ -1218,7 +1204,7 @@ def mavlink_packet(self, m): return tlayer = 'PostionTarget%u' % m.get_srcSystem() (lat,lon,_) = self.lat_lon_heading[m.get_srcSystem()] - if (self.master.flightmode in [ "AUTO", "GUIDED", "LOITER", "RTL", "QRTL", "QLOITER", "QLAND", "FOLLOW" ]): + if (self.master.flightmode in [ "AUTO", "GUIDED", "LOITER", "RTL", "QRTL", "QLOITER", "QLAND", "FOLLOW", "CIRCLE"]): lat_float = m.lat_int*1e-7 lon_float = m.lon_int*1e-7 vec = [ (lat_float, lon_float),