diff --git a/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs b/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs index a1afc18261..c617fce79f 100644 --- a/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs +++ b/ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs @@ -5126,25 +5126,26 @@ public async Task readPacketAsync() // adsb packets are forwarded and can be from any sysid/compid if (msgid == (byte)MAVLINK_MSG_ID.ADSB_VEHICLE) { - var adsb = message.ToStructure(); + var adsbMessage = message.ToStructure(); - var id = adsb.ICAO_address.ToString("X5"); + var id = adsbMessage.ICAO_address.ToString("X5"); if (_UpdateADSBPlanePosition != null) _UpdateADSBPlanePosition(this, new adsb.PointLatLngAltHdg( - adsb.lat / 1e7, - adsb.lon / 1e7, - adsb.altitude / 1000, - adsb.heading * 0.01f, - adsb.hor_velocity, + adsbMessage.lat / 1e7, + adsbMessage.lon / 1e7, + adsbMessage.altitude / 1000, + adsbMessage.heading * 0.01f, + adsbMessage.hor_velocity, id, DateTime.Now ) { - CallSign = Encoding.UTF8.GetString(adsb.callsign), - Squawk = adsb.squawk, - Raw = adsb, - VerticalSpeed = adsb.ver_velocity, + CallSign = Encoding.UTF8.GetString(adsbMessage.callsign), + Squawk = adsbMessage.squawk, + Raw = adsbMessage, + VerticalSpeed = adsbMessage.ver_velocity, + Category = adsb.GetEmitterCategoryShort((ADSB_EMITTER_TYPE)adsbMessage.emitter_type), } ); } diff --git a/ExtLibs/Maps/GMapMarkerADSBPlane.cs b/ExtLibs/Maps/GMapMarkerADSBPlane.cs index 7de8750132..b0e92b0437 100644 --- a/ExtLibs/Maps/GMapMarkerADSBPlane.cs +++ b/ExtLibs/Maps/GMapMarkerADSBPlane.cs @@ -1,6 +1,7 @@ using System; using System.Drawing; using GMap.NET; +using GMap.NET.Drawing.Properties; using GMap.NET.WindowsForms; namespace MissionPlanner.Maps @@ -8,17 +9,38 @@ namespace MissionPlanner.Maps [Serializable] public class GMapMarkerADSBPlane : GMapMarker { - private static readonly Bitmap icong = new Bitmap(global::MissionPlanner.Maps.Resources.FW_icons_2013_logos_01, - new Size(40, 40)); + // The images we're using are 72x72, so we'll use that as the size + private static readonly Size size = new Size(72, 72); - private static readonly Bitmap iconr = new Bitmap(global::MissionPlanner.Maps.Resources.FW_icons_2013_logos_011, - new Size(40, 40)); + // Images retrieved from tar1090 sprites: https://github.com/wiedehopf/tar1090/blob/master/html/images/sprites.png + private static readonly Bitmap adsb_unknown = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_unknown, size); + private static readonly Bitmap adsb_light = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_light, size); + private static readonly Bitmap adsb_small = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_small, size); + private static readonly Bitmap adsb_large = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_large, size); + private static readonly Bitmap adsb_heavy = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_heavy, size); + private static readonly Bitmap adsb_highly_manuv = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_highly_manuv, size); + private static readonly Bitmap adsb_rotocraft = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_rotocraft, size); + //private static readonly Bitmap adsb_glider = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_glider, size); + private static readonly Bitmap adsb_lighter_air = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_balloon, size); + private static readonly Bitmap adsb_parachute = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_parachute, size); + //private static readonly Bitmap adsb_ultralight = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_ultralight, size); + private static readonly Bitmap adsb_uav = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_uav, size); + private static readonly Bitmap adsb_emergency_surface = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_emergency_surface, size); + private static readonly Bitmap adsb_service_surface = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_service_surface, size); + private static readonly Bitmap adsb_point_obstacle = new Bitmap(global::MissionPlanner.Maps.Resources.adsb_balloon, size); // point obstacles are used for balloons - private static readonly Bitmap icono = new Bitmap(global::MissionPlanner.Maps.Resources.FW_icons_2013_logos_012, - new Size(40, 40)); public float heading = 0; public AlertLevelOptions AlertLevel = AlertLevelOptions.Green; + public float DrawScale = 1; + + // Cache the last drawn data to avoid re-coloring every frame + private Bitmap lastDrawn = null; + // Store the last alert level to decide whether to redraw + private AlertLevelOptions lastAlertLevel = AlertLevelOptions.Green; + private MAVLink.ADSB_EMITTER_TYPE lastEmitterCategory = MAVLink.ADSB_EMITTER_TYPE.NO_INFO; + + public MAVLink.ADSB_EMITTER_TYPE EmitterCategory { get; set; } public enum AlertLevelOptions { @@ -32,10 +54,33 @@ public GMapMarkerADSBPlane(PointLatLng p, float heading, AlertLevelOptions alert { this.AlertLevel = alert; this.heading = heading; - Size = icong.Size; + Size = size; Offset = new Point(Size.Width / -2, Size.Height / -2); } + private static void ColorSprite(Bitmap bitmap, Color fillColor) + { + int width = bitmap.Width; + int height = bitmap.Height; + + bool IsWhite(Color pixel) => pixel.R == 255 && pixel.G == 255 && pixel.B == 255 && pixel.A != 0; + + // Iterate through every pixel in the image + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + Color pixel = bitmap.GetPixel(x, y); + + // If the pixel is white, color it with the fill color + if (IsWhite(pixel)) + { + bitmap.SetPixel(x, y, fillColor); + } + } + } + } + public override void OnRender(IGraphics g) { var temp = g.Transform; @@ -51,19 +96,96 @@ public override void OnRender(IGraphics g) { } + bool needsRedraw = lastDrawn == null || lastAlertLevel != AlertLevel || lastEmitterCategory != EmitterCategory; + + if (!needsRedraw) + { + g.ScaleTransform(DrawScale, DrawScale); + g.DrawImageUnscaled(lastDrawn, lastDrawn.Width / -2, lastDrawn.Height / -2); + return; + } + + // Set the icon based on emitter category + Bitmap bitmap = adsb_unknown; + DrawScale = 0.5f; + + switch (this.EmitterCategory) + { + case MAVLink.ADSB_EMITTER_TYPE.NO_INFO: + bitmap = adsb_unknown; + break; + case MAVLink.ADSB_EMITTER_TYPE.LIGHT: + bitmap = adsb_light; + break; + case MAVLink.ADSB_EMITTER_TYPE.SMALL: + bitmap = adsb_small; + break; + case MAVLink.ADSB_EMITTER_TYPE.LARGE: + bitmap = adsb_large; + DrawScale *= 1.25f; + break; + case MAVLink.ADSB_EMITTER_TYPE.HEAVY: + bitmap = adsb_heavy; + DrawScale *= 1.5f; + break; + case MAVLink.ADSB_EMITTER_TYPE.HIGH_VORTEX_LARGE: + bitmap = adsb_heavy; + DrawScale *= 1.5f; + break; + case MAVLink.ADSB_EMITTER_TYPE.HIGHLY_MANUV: + bitmap = adsb_highly_manuv; + break; + case MAVLink.ADSB_EMITTER_TYPE.ROTOCRAFT: + bitmap = adsb_rotocraft; + break; + case MAVLink.ADSB_EMITTER_TYPE.GLIDER: + bitmap = adsb_lighter_air; + break; + case MAVLink.ADSB_EMITTER_TYPE.PARACHUTE: + bitmap = adsb_parachute; + break; + case MAVLink.ADSB_EMITTER_TYPE.ULTRA_LIGHT: + bitmap = adsb_lighter_air; + break; + case MAVLink.ADSB_EMITTER_TYPE.UAV: + bitmap = adsb_uav; + break; + case MAVLink.ADSB_EMITTER_TYPE.SPACE: + //??? + break; + case MAVLink.ADSB_EMITTER_TYPE.EMERGENCY_SURFACE: + bitmap = adsb_emergency_surface; + break; + case MAVLink.ADSB_EMITTER_TYPE.SERVICE_SURFACE: + bitmap = adsb_service_surface; + break; + case MAVLink.ADSB_EMITTER_TYPE.POINT_OBSTACLE: + bitmap = adsb_point_obstacle; + break; + } + + // Set the color based on alert level + var fillColor = Color.Green; switch (AlertLevel) { case AlertLevelOptions.Green: - g.DrawImageUnscaled(icong, icong.Width / -2, icong.Height / -2); + fillColor = Color.Green; break; case AlertLevelOptions.Orange: - g.DrawImageUnscaled(icono, icono.Width / -2, icono.Height / -2); + fillColor = Color.Orange; break; case AlertLevelOptions.Red: - g.DrawImageUnscaled(iconr, iconr.Width / -2, iconr.Height / -2); + fillColor = Color.Red; break; } + ColorSprite(bitmap, fillColor); + + g.ScaleTransform(DrawScale, DrawScale); + g.DrawImageUnscaled(bitmap, bitmap.Width / -2, bitmap.Height / -2); + + lastDrawn = bitmap; + g.Transform = temp; } } diff --git a/ExtLibs/Maps/Resources.Designer.cs b/ExtLibs/Maps/Resources.Designer.cs index c1e125a6fd..04b37653a1 100644 --- a/ExtLibs/Maps/Resources.Designer.cs +++ b/ExtLibs/Maps/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace MissionPlanner.Maps { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { @@ -110,6 +110,136 @@ public static System.Drawing.Bitmap _0d92fed790a3a70170e61a86db103f399a595c70 { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_balloon { + get { + object obj = ResourceManager.GetObject("adsb_balloon", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_emergency_surface { + get { + object obj = ResourceManager.GetObject("adsb_emergency_surface", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_glider { + get { + object obj = ResourceManager.GetObject("adsb_glider", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_heavy { + get { + object obj = ResourceManager.GetObject("adsb_heavy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_highly_manuv { + get { + object obj = ResourceManager.GetObject("adsb_highly_manuv", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_large { + get { + object obj = ResourceManager.GetObject("adsb_large", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_light { + get { + object obj = ResourceManager.GetObject("adsb_light", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_parachute { + get { + object obj = ResourceManager.GetObject("adsb_parachute", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_rotocraft { + get { + object obj = ResourceManager.GetObject("adsb_rotocraft", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_service_surface { + get { + object obj = ResourceManager.GetObject("adsb_service_surface", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_small { + get { + object obj = ResourceManager.GetObject("adsb_small", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_uav { + get { + object obj = ResourceManager.GetObject("adsb_uav", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + public static System.Drawing.Bitmap adsb_unknown { + get { + object obj = ResourceManager.GetObject("adsb_unknown", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/ExtLibs/Maps/Resources.resx b/ExtLibs/Maps/Resources.resx index 51f360b4e7..fe1b65fffb 100644 --- a/ExtLibs/Maps/Resources.resx +++ b/ExtLibs/Maps/Resources.resx @@ -1721,4 +1721,43 @@ Control-S - save grid file\par Resources\boatsprite.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Resources\adsb_balloon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_emergency_surface.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_glider.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_heavy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_highly_manuv.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_large.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_light.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_parachute.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_rotocraft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_service_surface.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_uav.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\adsb_unknown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/ExtLibs/Maps/Resources/adsb_balloon.png b/ExtLibs/Maps/Resources/adsb_balloon.png new file mode 100644 index 0000000000..23676617ae Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_balloon.png differ diff --git a/ExtLibs/Maps/Resources/adsb_emergency_surface.png b/ExtLibs/Maps/Resources/adsb_emergency_surface.png new file mode 100644 index 0000000000..8a28691f86 Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_emergency_surface.png differ diff --git a/ExtLibs/Maps/Resources/adsb_glider.png b/ExtLibs/Maps/Resources/adsb_glider.png new file mode 100644 index 0000000000..576319dc3f Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_glider.png differ diff --git a/ExtLibs/Maps/Resources/adsb_heavy.png b/ExtLibs/Maps/Resources/adsb_heavy.png new file mode 100644 index 0000000000..f2d999a5ad Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_heavy.png differ diff --git a/ExtLibs/Maps/Resources/adsb_highly_manuv.png b/ExtLibs/Maps/Resources/adsb_highly_manuv.png new file mode 100644 index 0000000000..4513729988 Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_highly_manuv.png differ diff --git a/ExtLibs/Maps/Resources/adsb_large.png b/ExtLibs/Maps/Resources/adsb_large.png new file mode 100644 index 0000000000..c4587d168c Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_large.png differ diff --git a/ExtLibs/Maps/Resources/adsb_light.png b/ExtLibs/Maps/Resources/adsb_light.png new file mode 100644 index 0000000000..0ce2ad3b7f Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_light.png differ diff --git a/ExtLibs/Maps/Resources/adsb_parachute.png b/ExtLibs/Maps/Resources/adsb_parachute.png new file mode 100644 index 0000000000..005e70e251 Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_parachute.png differ diff --git a/ExtLibs/Maps/Resources/adsb_rotocraft.png b/ExtLibs/Maps/Resources/adsb_rotocraft.png new file mode 100644 index 0000000000..08712d448c Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_rotocraft.png differ diff --git a/ExtLibs/Maps/Resources/adsb_service_surface.png b/ExtLibs/Maps/Resources/adsb_service_surface.png new file mode 100644 index 0000000000..6cee96b104 Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_service_surface.png differ diff --git a/ExtLibs/Maps/Resources/adsb_small.png b/ExtLibs/Maps/Resources/adsb_small.png new file mode 100644 index 0000000000..e5c7c06633 Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_small.png differ diff --git a/ExtLibs/Maps/Resources/adsb_uav.png b/ExtLibs/Maps/Resources/adsb_uav.png new file mode 100644 index 0000000000..6a8847860b Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_uav.png differ diff --git a/ExtLibs/Maps/Resources/adsb_unknown.png b/ExtLibs/Maps/Resources/adsb_unknown.png new file mode 100644 index 0000000000..036f70c8fb Binary files /dev/null and b/ExtLibs/Maps/Resources/adsb_unknown.png differ diff --git a/ExtLibs/Utilities/adsb.cs b/ExtLibs/Utilities/adsb.cs index 239abc62e7..f7ab820e51 100644 --- a/ExtLibs/Utilities/adsb.cs +++ b/ExtLibs/Utilities/adsb.cs @@ -189,7 +189,9 @@ void TryConnect() { VerticalSpeed = ac.baro_rate * FTM_TO_CMS, CallSign = (ac.flight ?? "").Trim().ToUpper(), - Squawk = Convert.ToUInt16(ac.squawk, 16) // Convert the hex value back to a raw uint16 + Squawk = Convert.ToUInt16(ac.squawk, 16), // Convert the hex value back to a raw uint16 + Type = (ac.t ?? ""), // NOTE: ac.type is the way the aircraft was detected, not the aircraft type + Category = (ac.category ?? ""), }; UpdatePlanePosition(this, plane); @@ -1318,6 +1320,170 @@ public PointLatLngAltHdg(double lat, double lng, double alt, float heading, doub public double VerticalSpeed { get; set; } public object Raw { get; set; } public object Source { get; set; } + + /// + /// The wake vortex category of the aircraft like A1 or A3; see 2.2.3.2.5.2 (https://www.adsbexchange.com/emitter-category-ads-b-do-260b-2-2-3-2-5-2/) + /// + public string Category { get; set; } + /// + /// The type of aircraft like A380 or B737 pulled from aircraft database. + /// + public string Type { get; set; } + + /// + /// Returns the aircraft's emitter category in MAVLink enum format + /// + public MAVLink.ADSB_EMITTER_TYPE GetEmitterCategory() + { + switch (this.Category) + { + case "A0": + return MAVLink.ADSB_EMITTER_TYPE.NO_INFO; + case "A1": + return MAVLink.ADSB_EMITTER_TYPE.LIGHT; + case "A2": + return MAVLink.ADSB_EMITTER_TYPE.SMALL; + case "A3": + return MAVLink.ADSB_EMITTER_TYPE.LARGE; + case "A4": + return MAVLink.ADSB_EMITTER_TYPE.HIGH_VORTEX_LARGE; + case "A5": + return MAVLink.ADSB_EMITTER_TYPE.HEAVY; + case "A6": + return MAVLink.ADSB_EMITTER_TYPE.HIGHLY_MANUV; + case "A7": + return MAVLink.ADSB_EMITTER_TYPE.ROTOCRAFT; + case "B0": + return MAVLink.ADSB_EMITTER_TYPE.UNASSIGNED; + case "B1": + return MAVLink.ADSB_EMITTER_TYPE.GLIDER; + case "B2": + return MAVLink.ADSB_EMITTER_TYPE.LIGHTER_AIR; + case "B3": + return MAVLink.ADSB_EMITTER_TYPE.PARACHUTE; + case "B4": + return MAVLink.ADSB_EMITTER_TYPE.ULTRA_LIGHT; + case "B5": + return MAVLink.ADSB_EMITTER_TYPE.UNASSIGNED2; + case "B6": + return MAVLink.ADSB_EMITTER_TYPE.UAV; + case "B7": + return MAVLink.ADSB_EMITTER_TYPE.SPACE; + case "C0": + return MAVLink.ADSB_EMITTER_TYPE.UNASSGINED3; + case "C1": + return MAVLink.ADSB_EMITTER_TYPE.EMERGENCY_SURFACE; + case "C2": + return MAVLink.ADSB_EMITTER_TYPE.SERVICE_SURFACE; + case "C3": + return MAVLink.ADSB_EMITTER_TYPE.POINT_OBSTACLE; + // C4-C7 aren't defined in MAVLink yet + } + return MAVLink.ADSB_EMITTER_TYPE.NO_INFO; + } + public string GetCategoryFriendlyString() + { + switch (this.Category) + { + case "A0": + return "No Info"; + case "A1": + return "Light"; + case "A2": + return "Small"; + case "A3": + return "Large"; + case "A4": + return "High Vortex Large"; + case "A5": + return "Heavy"; + case "A6": + return "Highly Manuv"; + case "A7": + return "Rotocraft"; + case "B0": + return "Unassigned"; + case "B1": + return "Glider"; + case "B2": + return "Lighter Air"; + case "B3": + return "Parachute"; + case "B4": + return "Ultra Light"; + case "B5": + return "Unassigned"; + case "B6": + return "UAV"; + case "B7": + return "Space"; + case "C0": + return "Unassigned"; + case "C1": + return "Emergency Surface"; + case "C2": + return "Service Surface"; + case "C3": + return "Point Obstacle"; + case "C4": + return "Cluster Obstacle"; + case "C5": + return "Line Obstacle"; + case "C6": + return "Unassigned"; + case "C7": + return "Unassigned"; + } + return this.Category; + } + } + public static string GetEmitterCategoryShort(MAVLink.ADSB_EMITTER_TYPE category) + { + switch (category) + { + case MAVLink.ADSB_EMITTER_TYPE.NO_INFO: + return "A0"; + case MAVLink.ADSB_EMITTER_TYPE.LIGHT: + return "A1"; + case MAVLink.ADSB_EMITTER_TYPE.SMALL: + return "A2"; + case MAVLink.ADSB_EMITTER_TYPE.LARGE: + return "A3"; + case MAVLink.ADSB_EMITTER_TYPE.HIGH_VORTEX_LARGE: + return "A4"; + case MAVLink.ADSB_EMITTER_TYPE.HEAVY: + return "A5"; + case MAVLink.ADSB_EMITTER_TYPE.HIGHLY_MANUV: + return "A6"; + case MAVLink.ADSB_EMITTER_TYPE.ROTOCRAFT: + return "A7"; + case MAVLink.ADSB_EMITTER_TYPE.UNASSIGNED: + return "B0"; + case MAVLink.ADSB_EMITTER_TYPE.GLIDER: + return "B1"; + case MAVLink.ADSB_EMITTER_TYPE.LIGHTER_AIR: + return "B2"; + case MAVLink.ADSB_EMITTER_TYPE.PARACHUTE: + return "B3"; + case MAVLink.ADSB_EMITTER_TYPE.ULTRA_LIGHT: + return "B4"; + case MAVLink.ADSB_EMITTER_TYPE.UNASSIGNED2: + return "B5"; + case MAVLink.ADSB_EMITTER_TYPE.UAV: + return "B6"; + case MAVLink.ADSB_EMITTER_TYPE.SPACE: + return "B7"; + case MAVLink.ADSB_EMITTER_TYPE.UNASSGINED3: + return "C0"; + case MAVLink.ADSB_EMITTER_TYPE.EMERGENCY_SURFACE: + return "C1"; + case MAVLink.ADSB_EMITTER_TYPE.SERVICE_SURFACE: + return "C2"; + case MAVLink.ADSB_EMITTER_TYPE.POINT_OBSTACLE: + return "C3"; + } + return ""; } } + } diff --git a/GCSViews/ConfigurationView/ConfigPlanner.Designer.cs b/GCSViews/ConfigurationView/ConfigPlanner.Designer.cs index 95b1e50c50..a5daee85d3 100644 --- a/GCSViews/ConfigurationView/ConfigPlanner.Designer.cs +++ b/GCSViews/ConfigurationView/ConfigPlanner.Designer.cs @@ -122,6 +122,7 @@ private void InitializeComponent() this.CMB_mapCache = new System.Windows.Forms.ComboBox(); this.label13 = new System.Windows.Forms.Label(); this.BUT_mapCacheDir = new MissionPlanner.Controls.MyButton(); + this.CHK_speechadsb = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.NUM_tracklength)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.num_gcsid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.num_linelength)).BeginInit(); @@ -134,7 +135,6 @@ private void InitializeComponent() // // CMB_ratesensors // - resources.ApplyResources(this.CMB_ratesensors, "CMB_ratesensors"); this.CMB_ratesensors.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_ratesensors.FormattingEnabled = true; this.CMB_ratesensors.Items.AddRange(new object[] { @@ -153,6 +153,7 @@ private void InitializeComponent() resources.GetString("CMB_ratesensors.Items12"), resources.GetString("CMB_ratesensors.Items13"), resources.GetString("CMB_ratesensors.Items14")}); + resources.ApplyResources(this.CMB_ratesensors, "CMB_ratesensors"); this.CMB_ratesensors.Name = "CMB_ratesensors"; this.CMB_ratesensors.SelectedIndexChanged += new System.EventHandler(this.CMB_ratesensors_SelectedIndexChanged); // @@ -163,9 +164,9 @@ private void InitializeComponent() // // CMB_videoresolutions // - resources.ApplyResources(this.CMB_videoresolutions, "CMB_videoresolutions"); this.CMB_videoresolutions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_videoresolutions.FormattingEnabled = true; + resources.ApplyResources(this.CMB_videoresolutions, "CMB_videoresolutions"); this.CMB_videoresolutions.Name = "CMB_videoresolutions"; // // label12 @@ -199,12 +200,12 @@ private void InitializeComponent() // // NUM_tracklength // - resources.ApplyResources(this.NUM_tracklength, "NUM_tracklength"); this.NUM_tracklength.Increment = new decimal(new int[] { 100, 0, 0, 0}); + resources.ApplyResources(this.NUM_tracklength, "NUM_tracklength"); this.NUM_tracklength.Maximum = new decimal(new int[] { 200000, 0, @@ -256,7 +257,6 @@ private void InitializeComponent() // // CMB_raterc // - resources.ApplyResources(this.CMB_raterc, "CMB_raterc"); this.CMB_raterc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_raterc.FormattingEnabled = true; this.CMB_raterc.Items.AddRange(new object[] { @@ -275,6 +275,7 @@ private void InitializeComponent() resources.GetString("CMB_raterc.Items12"), resources.GetString("CMB_raterc.Items13"), resources.GetString("CMB_raterc.Items14")}); + resources.ApplyResources(this.CMB_raterc, "CMB_raterc"); this.CMB_raterc.Name = "CMB_raterc"; this.CMB_raterc.SelectedIndexChanged += new System.EventHandler(this.CMB_raterc_SelectedIndexChanged); // @@ -300,7 +301,6 @@ private void InitializeComponent() // // CMB_ratestatus // - resources.ApplyResources(this.CMB_ratestatus, "CMB_ratestatus"); this.CMB_ratestatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_ratestatus.FormattingEnabled = true; this.CMB_ratestatus.Items.AddRange(new object[] { @@ -319,12 +319,12 @@ private void InitializeComponent() resources.GetString("CMB_ratestatus.Items12"), resources.GetString("CMB_ratestatus.Items13"), resources.GetString("CMB_ratestatus.Items14")}); + resources.ApplyResources(this.CMB_ratestatus, "CMB_ratestatus"); this.CMB_ratestatus.Name = "CMB_ratestatus"; this.CMB_ratestatus.SelectedIndexChanged += new System.EventHandler(this.CMB_ratestatus_SelectedIndexChanged); // // CMB_rateposition // - resources.ApplyResources(this.CMB_rateposition, "CMB_rateposition"); this.CMB_rateposition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_rateposition.FormattingEnabled = true; this.CMB_rateposition.Items.AddRange(new object[] { @@ -343,12 +343,12 @@ private void InitializeComponent() resources.GetString("CMB_rateposition.Items12"), resources.GetString("CMB_rateposition.Items13"), resources.GetString("CMB_rateposition.Items14")}); + resources.ApplyResources(this.CMB_rateposition, "CMB_rateposition"); this.CMB_rateposition.Name = "CMB_rateposition"; this.CMB_rateposition.SelectedIndexChanged += new System.EventHandler(this.CMB_rateposition_SelectedIndexChanged); // // CMB_rateattitude // - resources.ApplyResources(this.CMB_rateattitude, "CMB_rateattitude"); this.CMB_rateattitude.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_rateattitude.FormattingEnabled = true; this.CMB_rateattitude.Items.AddRange(new object[] { @@ -366,6 +366,7 @@ private void InitializeComponent() resources.GetString("CMB_rateattitude.Items11"), resources.GetString("CMB_rateattitude.Items12"), resources.GetString("CMB_rateattitude.Items13")}); + resources.ApplyResources(this.CMB_rateattitude, "CMB_rateattitude"); this.CMB_rateattitude.Name = "CMB_rateattitude"; this.CMB_rateattitude.SelectedIndexChanged += new System.EventHandler(this.CMB_rateattitude_SelectedIndexChanged); // @@ -386,17 +387,17 @@ private void InitializeComponent() // // CMB_speedunits // - resources.ApplyResources(this.CMB_speedunits, "CMB_speedunits"); this.CMB_speedunits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_speedunits.FormattingEnabled = true; + resources.ApplyResources(this.CMB_speedunits, "CMB_speedunits"); this.CMB_speedunits.Name = "CMB_speedunits"; this.CMB_speedunits.SelectedIndexChanged += new System.EventHandler(this.CMB_speedunits_SelectedIndexChanged); // // CMB_distunits // - resources.ApplyResources(this.CMB_distunits, "CMB_distunits"); this.CMB_distunits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_distunits.FormattingEnabled = true; + resources.ApplyResources(this.CMB_distunits, "CMB_distunits"); this.CMB_distunits.Name = "CMB_distunits"; this.CMB_distunits.SelectedIndexChanged += new System.EventHandler(this.CMB_distunits_SelectedIndexChanged); // @@ -445,27 +446,27 @@ private void InitializeComponent() // // CMB_osdcolor // - resources.ApplyResources(this.CMB_osdcolor, "CMB_osdcolor"); this.CMB_osdcolor.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; this.CMB_osdcolor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_osdcolor.FormattingEnabled = true; + resources.ApplyResources(this.CMB_osdcolor, "CMB_osdcolor"); this.CMB_osdcolor.Name = "CMB_osdcolor"; this.CMB_osdcolor.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.CMB_osdcolor_DrawItem); this.CMB_osdcolor.SelectedIndexChanged += new System.EventHandler(this.CMB_osdcolor_SelectedIndexChanged); // // CMB_severity // - resources.ApplyResources(this.CMB_severity, "CMB_severity"); this.CMB_severity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_severity.FormattingEnabled = true; + resources.ApplyResources(this.CMB_severity, "CMB_severity"); this.CMB_severity.Name = "CMB_severity"; this.CMB_severity.SelectedIndexChanged += new System.EventHandler(this.CMB_severity_SelectedIndexChanged); // // CMB_language // - resources.ApplyResources(this.CMB_language, "CMB_language"); this.CMB_language.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_language.FormattingEnabled = true; + resources.ApplyResources(this.CMB_language, "CMB_language"); this.CMB_language.Name = "CMB_language"; this.CMB_language.SelectedIndexChanged += new System.EventHandler(this.CMB_language_SelectedIndexChanged); // @@ -483,9 +484,9 @@ private void InitializeComponent() // // CHK_hudshow // - resources.ApplyResources(this.CHK_hudshow, "CHK_hudshow"); this.CHK_hudshow.Checked = true; this.CHK_hudshow.CheckState = System.Windows.Forms.CheckState.Checked; + resources.ApplyResources(this.CHK_hudshow, "CHK_hudshow"); this.CHK_hudshow.Name = "CHK_hudshow"; this.CHK_hudshow.UseVisualStyleBackColor = true; this.CHK_hudshow.CheckedChanged += new System.EventHandler(this.CHK_hudshow_CheckedChanged); @@ -497,9 +498,9 @@ private void InitializeComponent() // // CMB_videosources // - resources.ApplyResources(this.CMB_videosources, "CMB_videosources"); this.CMB_videosources.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_videosources.FormattingEnabled = true; + resources.ApplyResources(this.CMB_videosources, "CMB_videosources"); this.CMB_videosources.Name = "CMB_videosources"; this.CMB_videosources.SelectedIndexChanged += new System.EventHandler(this.CMB_videosources_SelectedIndexChanged); this.CMB_videosources.Click += new System.EventHandler(this.CMB_videosources_Click); @@ -523,9 +524,9 @@ private void InitializeComponent() // // CHK_disttohomeflightdata // - resources.ApplyResources(this.CHK_disttohomeflightdata, "CHK_disttohomeflightdata"); this.CHK_disttohomeflightdata.Checked = true; this.CHK_disttohomeflightdata.CheckState = System.Windows.Forms.CheckState.Checked; + resources.ApplyResources(this.CHK_disttohomeflightdata, "CHK_disttohomeflightdata"); this.CHK_disttohomeflightdata.Name = "CHK_disttohomeflightdata"; this.CHK_disttohomeflightdata.UseVisualStyleBackColor = true; this.CHK_disttohomeflightdata.CheckedChanged += new System.EventHandler(this.CHK_disttohomeflightdata_CheckedChanged); @@ -579,9 +580,9 @@ private void InitializeComponent() // // CMB_theme // - resources.ApplyResources(this.CMB_theme, "CMB_theme"); this.CMB_theme.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_theme.FormattingEnabled = true; + resources.ApplyResources(this.CMB_theme, "CMB_theme"); this.CMB_theme.Name = "CMB_theme"; this.CMB_theme.SelectedIndexChanged += new System.EventHandler(this.CMB_theme_SelectedIndexChanged); // @@ -677,9 +678,9 @@ private void InitializeComponent() // // CMB_Layout // - resources.ApplyResources(this.CMB_Layout, "CMB_Layout"); this.CMB_Layout.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_Layout.FormattingEnabled = true; + resources.ApplyResources(this.CMB_Layout, "CMB_Layout"); this.CMB_Layout.Name = "CMB_Layout"; this.CMB_Layout.SelectedIndexChanged += new System.EventHandler(this.CMB_Layout_SelectedIndexChanged); // @@ -713,9 +714,9 @@ private void InitializeComponent() // // CMB_altunits // - resources.ApplyResources(this.CMB_altunits, "CMB_altunits"); this.CMB_altunits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.CMB_altunits.FormattingEnabled = true; + resources.ApplyResources(this.CMB_altunits, "CMB_altunits"); this.CMB_altunits.Name = "CMB_altunits"; this.CMB_altunits.SelectedIndexChanged += new System.EventHandler(this.CMB_altunits_SelectedIndexChanged); // @@ -778,9 +779,9 @@ private void InitializeComponent() // // cmb_secondarydisplaystyle // - resources.ApplyResources(this.cmb_secondarydisplaystyle, "cmb_secondarydisplaystyle"); this.cmb_secondarydisplaystyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmb_secondarydisplaystyle.FormattingEnabled = true; + resources.ApplyResources(this.cmb_secondarydisplaystyle, "cmb_secondarydisplaystyle"); this.cmb_secondarydisplaystyle.Name = "cmb_secondarydisplaystyle"; this.cmb_secondarydisplaystyle.SelectedIndexChanged += new System.EventHandler(this.cmb_secondarydisplaystyle_SelectedIndexChanged); // @@ -826,12 +827,12 @@ private void InitializeComponent() // // num_linelength // - resources.ApplyResources(this.num_linelength, "num_linelength"); this.num_linelength.Increment = new decimal(new int[] { 10, 0, 0, 0}); + resources.ApplyResources(this.num_linelength, "num_linelength"); this.num_linelength.Maximum = new decimal(new int[] { 2000, 0, @@ -879,12 +880,21 @@ private void InitializeComponent() // resources.ApplyResources(this.BUT_mapCacheDir, "BUT_mapCacheDir"); this.BUT_mapCacheDir.Name = "BUT_mapCacheDir"; + this.BUT_mapCacheDir.TextColorNotEnabled = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4))))); this.BUT_mapCacheDir.UseVisualStyleBackColor = true; this.BUT_mapCacheDir.Click += new System.EventHandler(this.BUT_mapCacheDir_Click); // + // CHK_speechadsb + // + resources.ApplyResources(this.CHK_speechadsb, "CHK_speechadsb"); + this.CHK_speechadsb.Name = "CHK_speechadsb"; + this.CHK_speechadsb.UseVisualStyleBackColor = true; + this.CHK_speechadsb.CheckedChanged += new System.EventHandler(this.CHK_speechadsb_CheckedChanged); + // // ConfigPlanner // resources.ApplyResources(this, "$this"); + this.Controls.Add(this.CHK_speechadsb); this.Controls.Add(this.label10); this.Controls.Add(this.cmb_secondarydisplaystyle); this.Controls.Add(this.label9); @@ -1083,5 +1093,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label13; public System.Windows.Forms.ComboBox CMB_mapCache; private Controls.MyButton BUT_mapCacheDir; + private System.Windows.Forms.CheckBox CHK_speechadsb; } } diff --git a/GCSViews/ConfigurationView/ConfigPlanner.cs b/GCSViews/ConfigurationView/ConfigPlanner.cs index f2b39366a5..7f67230459 100644 --- a/GCSViews/ConfigurationView/ConfigPlanner.cs +++ b/GCSViews/ConfigurationView/ConfigPlanner.cs @@ -153,6 +153,7 @@ public void Activate() SetCheckboxFromConfig("speechaltenabled", CHK_speechaltwarning); SetCheckboxFromConfig("speecharmenabled", CHK_speecharmdisarm); SetCheckboxFromConfig("speechlowspeedenabled", CHK_speechlowspeed); + SetCheckboxFromConfig("speechadsbenabled", CHK_speechadsb); SetCheckboxFromConfig("beta_updates", CHK_beta); SetCheckboxFromConfig("password_protect", CHK_Password); SetCheckboxFromConfig("showairports", CHK_showairports); @@ -393,6 +394,7 @@ private void CHK_enablespeech_CheckedChanged(object sender, EventArgs e) CHK_speechmode.Visible = true; CHK_speecharmdisarm.Visible = true; CHK_speechlowspeed.Visible = true; + CHK_speechadsb.Visible = true; } else { @@ -404,6 +406,7 @@ private void CHK_enablespeech_CheckedChanged(object sender, EventArgs e) CHK_speechmode.Visible = false; CHK_speecharmdisarm.Visible = false; CHK_speechlowspeed.Visible = false; + CHK_speechadsb.Visible = false; } } @@ -823,6 +826,13 @@ private void CHK_speecharmdisarm_CheckedChanged(object sender, EventArgs e) } } + private void CHK_speechadsb_CheckedChanged(object sender, EventArgs e) + { + if (startup) + return; + Settings.Instance["speechadsbenabled"] = ((CheckBox)sender).Checked.ToString(); + } + private void BUT_Vario_Click(object sender, EventArgs e) { if (Vario.run) diff --git a/GCSViews/ConfigurationView/ConfigPlanner.resx b/GCSViews/ConfigurationView/ConfigPlanner.resx index 14d68da1d4..3532e8891e 100644 --- a/GCSViews/ConfigurationView/ConfigPlanner.resx +++ b/GCSViews/ConfigurationView/ConfigPlanner.resx @@ -117,2804 +117,2831 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False + + + NoControl - - 107, 166 + + 535, 254 - - 144, 17 + + 43, 13 - - $this + + + 87 - - $this + + Sensor - - - NoControl + + label33 - + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 65 + + 43 - - 72 + + -1 - - 340, 554 + + 0 - - 138, 21 + + 1 - - 77 + + 2 - - 55 + + 3 - - $this + + 4 - - label93 + + 5 - - 104 + + 6 - - CHK_disttohomeflightdata + + 7 - - True + + 8 - - 81, 17 + + 9 - - label101 + + 10 - - -1 + + 25 - - Video Format + + 50 - - 60 + + 100 - - 107, 349 + + 584, 251 - - 103, 17 + + 40, 21 - - MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 88 - - 386, 20 + + CMB_ratesensors - - CMB_ratestatus + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 56, 13 + + $this - - CHK_GDIPlus + + 44 - - 1 + + True - - Log Path + + NoControl - - True + + 9, 38 - - True + + 69, 13 - - 41 + + 86 - - 40, 21 + + Video Format - - 330, 254 + + label26 - - NoControl + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + $this - - 76 + + 45 - - 48 + + 107, 35 - - 6 + + 408, 21 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 44 - - 107, 326 + + CMB_videoresolutions - - NOTE: Set the low level of SEVERITY to speak + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 949, 693 + + $this - - 50 + + 46 - - label107 + + True - + NoControl - - Low Speed + + 9, 350 - - 104 + + 31, 13 - - 58 + + 84 - - 116 + + HUD - - Custom + + label12 - - 73 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - NoControl - - - True + + 48 - - $this + + NoControl - - 86 + + 107, 349 - - 32 + + 220, 17 - - 22, 13 + + 85 - - NoControl + + GDI+ (old type/no HW acceleration) - - 88 + + CHK_GDIPlus System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 20 + + $this - - 50 + + 49 - - 9, 142 + + True - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - True + + 9, 327 - - $this + + 57, 13 - - 43, 13 + + 82 - - NoControl + + Waypoints - - 51 + + label24 - + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 88 + + 50 - - 496, 577 + + NoControl - - 81, 17 + + 107, 326 - - 115 + + 177, 17 - - chk_slowMachine + + 83 - - $this + + Load Waypoints on connect? - - 25 + + CHK_loadwponconnect - - Joystick Setup + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 559, 89 - - - Enable Speech + + 51 - - 9, 424 + + True - - 81, 17 + + NoControl - - False + + 9, 301 - - 30 + + 71, 13 - - 9 + + 81 - - 768, 500 + + Track Length - - System.Windows.Forms.MyUserControl, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + label23 - - Telemetry Rates + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - CHK_maprotation + + $this - - NoControl + + 52 - - 155, 17 + + 107, 300 - - OptOut Anon Stats + + 67, 20 - - $this + + 80 - - 53 + + NUM_tracklength - - MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 54 - - OSD Color + + True - - $this + + NoControl - - label11 + + 671, 89 - - 9 + + 88, 21 - - 9, 373 + + 79 - - 9, 171 + + Alt Warning - - 78, 13 + + False - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + CHK_speechaltwarning System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 9 - - - 81 + + $this - - 9, 327 + + 55 - - Auto Commit Params + + True - - CHK_params_bg + + NoControl - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9, 278 - - NoControl + + 78, 13 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 45 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Connect Reset - - 110 + + label108 - - NoControl + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 113 - - - 107, 62 + + 56 - + NoControl - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 107, 277 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 217, 17 - - Alt Warning + + 46 - - Alt Units + + Reset on USB Connect (toggle DTR) - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + CHK_resetapmonconnect - - 80 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 49 + + $this - - True + + 57 - - 91, 17 + + Bottom, Left - - 249, 421 + + NoControl - - 17 + + 106, 623 - - BUT_videostart + + 155, 17 - - 107, 35 + + 47 - - 107, 195 + + Mavlink Message Debug - - 50 + + CHK_mavdebug - - 25 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 9 - - - 78 - - - 39, 13 + + 58 - + NoControl - - 3 + + 461, 254 - - True + + 22, 13 - - NoControl + + 48 - - 46 + + RC - - 64, 13 + + label107 - + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 461, 254 + + 59 - - 56, 13 + + -1 - - 19 + + 0 - - ConfigPlanner + + 1 - - 87 + + 2 - - 439, 6 + + 3 - - 107, 524 + + 4 - - NoControl + + 5 - - 157, 31 + + 6 - - 26 + + 7 - - 47 + + 8 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 10 - - 50, 13 + + 25 - - $this + + 35 - - $this + + 50 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 489, 251 - - GDI+ (old type/no HW acceleration) + + 40, 21 - - 1 + + 49 - + + CMB_raterc + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - + + 60 + + NoControl - - 95 + + 330, 254 - - NoControl + + 79, 13 - - 75, 23 + + 50 - - 138, 21 + + Mode/Status label104 - - 9, 477 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - label108 + + $this - - 212, 89 + + 61 - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 220, 254 - - $this + + 56, 13 - - 75, 23 + + 51 - - 9, 38 + + Position - - NoControl + + label103 - - CMB_raterc + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + $this + + + 62 + + NoControl - - 129, 17 + + 104, 254 - - MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 56, 13 - - $this + + 52 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Attitude - - 220, 254 + + label102 - - 9, 502 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 20 + + 63 - + + True + + NoControl - - label5 + + 9, 254 - - 241, 31 + + 84, 13 - - CHK_Password + + 53 - - 436, 501 + + Telemetry Rates - - label24 + + label101 - + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 44 + + 64 - - 107, 222 + + -1 - - $this + + 0 - - 54 + + 1 - - 52, 13 + + 2 - - CHK_resetapmonconnect + + 3 - - 107, 89 + + 4 - - CHK_speechbattery + + 5 - - True + + 6 - - 92 + + 7 - - $this + + 8 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9 - - label12 + + 10 - - CMB_rateattitude + + 25 - - Map Follow + + 35 - - $this + + 50 - - False + + 415, 251 - - 469, 89 + + 40, 21 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 54 - - 99, 23 + + CMB_ratestatus - - Runing on a slow computer + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 9, 398 + + $this - - 186, 17 + + 65 - - 120 + + -1 - - 496, 554 + + 0 - - NoControl + + 1 - - 480, 198 + + 2 - - 55 + + 3 - - 671, 554 + + 4 - - label96 + + 5 - - 121, 17 + + 6 - - True + + 7 - - 100 + + 8 - - 4 + + 9 - - 51 + + 10 - - 99, 17 + + 20 - - 489, 251 + + 50 - - $this + + 100 - - 21 + + 282, 251 - - 107, 448 + + 40, 21 - - NoControl + + 55 - - 9, 527 + + CMB_rateposition - + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 82 + + $this - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 66 - - 107, 501 + + -1 - - 584, 251 + + 0 - - 25 + + 1 - - 94, 17 + + 2 - - True + + 3 - - 75, 20 + + 4 - - 83 + + 5 - - Bottom, Left + + 6 - - True + + 7 - - 67 + + 8 - - CMB_osdcolor + + 9 - - 340, 623 + + 10 - - True + + 50 - - NoControl + + 100 - - 520, 10 + + 166, 251 - - 107 + + 40, 21 - - NoControl + + 56 - - $this + + CMB_rateattitude - - 107, 395 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 8 - - - 38 + + 67 - + NoControl - - Show Airports + + 480, 198 - - 44 + + 241, 31 - - NoControl + + 57 - - 129 + + NOTE: The Configuration Tab will NOT display these units, as those are raw values. + - - Video Device + + label99 - - -1 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 220, 17 + + $this - + + 68 + + True - - 760, 89 + + NoControl - - 107, 277 + + 9, 225 - - 85 + + 65, 13 - - 59 + + 58 - - 57, 13 + + Speed Units + + + label98 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 65 - - + $this - - 9 - - - Display ToolTip - - - 45 - - - num_linelength - - - 0 - - - NoControl - - - 43, 13 - - - 104 - - - 67, 20 + + 69 - + True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 79 + + NoControl - - 138, 21 + + 9, 198 - - True + + 52, 13 - - CMB_Layout + + 59 - - 96 + + Dist Units - - 77 + + label97 - - 33 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + $this - - 24 + + 70 - - $this + + 107, 222 - - 105 + + 138, 21 - - 128 + + 60 - - 40, 21 + + CMB_speedunits - + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 10 + + 71 - - 107, 372 + + 107, 195 - - 408, 21 + + 138, 21 - - 104 + + 61 - - CMB_videosources + + CMB_distunits - - 56, 17 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + $this - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 72 - - 40, 21 + + True - - Only when Armed + + NoControl - - $this + + 9, 171 - - CHK_mavdebug + + 45, 13 - - label10 + + 62 - - 46, 13 + + Joystick - - 18 + + label96 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl - - - 72 + + $this - - 142, 17 + + 73 - - label92 + + True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - 332, 89 + + 9, 90 - - 56, 17 + + 44, 13 - - label94 + + 63 - - $this + + Speech - - $this + + label95 - - 107, 139 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 9, 11 + + $this - - 8 + + 74 - - 75, 23 + + True - - $this + + NoControl - - 60 + + 559, 89 - - CMB_rateposition + + 109, 21 - - label3 + + 64 - - 2 + + Battery Warning - - $this + + False - - -1 + + CHK_speechbattery - - BUT_Vario + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 75 - - label102 + + True - + NoControl - - NoControl + + 469, 89 - - Display Turn Radius + + 88, 21 - - 35 + + 65 - - Browse + + 30s Interval - - True + + False - - $this + + CHK_speechcustom - - 69 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 31, 13 + + $this - - Waypoints + + 76 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True - - chk_displaytooltip + + NoControl - - $this + + 408, 89 - - 107, 600 + + 63, 21 - - NoControl + + 66 - - 71 + + Mode - - 57 + + False - - Joystick + + CHK_speechmode - + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this - - - num_gcsid - - + $this - - 68 + + 77 - - Dist to Home + + True - - 14 + + NoControl - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 332, 89 - - Enable HUD Overlay + + 78, 21 - - $this + + 67 - - 7 + + Waypoint - - 111 + + False - - 85 + + CHK_speechwaypoint - - $this + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - label8 + + $this - - Display Target + + 78 - - 0 + + True - - 1 + + NoControl - - 2 + + 9, 65 - - 3 + + 57, 13 - - 4 + + 68 - - 5 + + OSD Color - - 71, 13 + + label94 - - HUD + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 98 + + $this - - CHK_showairports + + 79 - - 102, 17 + + 107, 62 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 138, 21 - - 68 + + 69 - - 100 + + CMB_osdcolor - + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 70 + + $this - - True + + 80 - - CMB_theme + + 107, 111 - - 100 + + 138, 21 - - -1 + + 125 - - MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + CMB_severity - + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - NoControl + + 81 - - Connect Reset + + 107, 139 - - 81, 17 + + 138, 21 - - $this + + 70 - - $this + + CMB_language - - $this + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 340, 600 + + $this - - 9 + + 82 - + True - + NoControl - - 7 - - - $this - - - 563, 501 + + 9, 142 - - 83 + + 69, 13 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 71 - - $this + + UI Language - - 25 + + label93 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 138, 21 + + 83 - + + True + + NoControl - - chk_tfr + + 107, 89 - - 103 + + 106, 21 - - chk_displaytarget + + 72 - - True + + Enable Speech - - 104, 254 + + CHK_enablespeech - + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - CMB_distunits + + 84 - + NoControl - - 109 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 520, 10 - - 117 + + 133, 18 - - label99 + + 73 - - 48 + + Enable HUD Overlay - - $this + + CHK_hudshow - - 115, 17 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - NoControl + + 85 - - 62 + + True - - 36 + + NoControl - - 75 + + 9, 11 - - 86, 17 + + 71, 13 - - 50 + + 74 - - True + + Video Device - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label92 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + $this + + + 86 + + + 107, 8 245, 21 - - $this + + 75 - - 61 + + CMB_videosources - + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 87 - - 9, 90 + + True - - $this + + NoControl - - 4 + + 9, 373 - - 535, 254 + + 61, 13 - - 408, 89 + + 89 - - $this + + Map Follow - - Start + + label1 - + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 3 + + 41 - - label6 + + NoControl - - CHK_hudshow + + 107, 372 - - BUT_logdirbrowse + + 205, 17 - - 27 + + 90 - - 10 + + Map is rotated to follow the plane - + + CHK_maprotation + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 4 + + 42 - - CHK_beta + + NoControl - - 47 + + 180, 303 - - Track Length + + 81, 17 - - NoControl + + 91 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Dist to Home - - True + + label2 - - True + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Inactive Aircraft + + $this - - 1 + + 39 - - True + + NoControl - - 126 + + 267, 302 - - True + + 129, 17 - - 66 + + 92 - - NoControl + + Display in Flightdata - - 89 + + CHK_disttohomeflightdata - - $this + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ADSB + + $this - - 53 + + 40 - + NoControl - - 106, 623 + + 107, 166 - - 10 + + 99, 23 - - False + + 76 - - 9, 451 + + Joystick Setup - - 43 + + BUT_Joystick - - 69, 13 + + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 109, 17 + + $this - - 16 + + 88 - - $this + + NoControl - - 57, 13 + + 439, 6 - - True + + 75, 23 - - 217, 17 + + 77 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Stop - - 104 + + BUT_videostop - - 138, 21 + + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 9, 225 - - + 89 - - 308, 501 - - + NoControl - - 64 + + 358, 6 - - True + + 75, 23 - - Map is rotated to follow the plane + + 78 - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Start - - 123, 17 + + BUT_videostart - - chk_displaycog + + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 99, 20 + + $this - - 108 + + 90 - - 99, 17 + + True - - 3 + + NoControl - - label95 + + 9, 398 - - Aircraft Icon + + 50, 13 - - 177, 17 + + 93 - - True + + Log Path - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label3 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 9, 350 + + $this - - NoControl + + 38 - - CMB_speedunits + + 107, 395 - - Mavlink Message Debug + + 386, 20 - - Beta Updates + + 94 - - 130 + + txt_log_dir - - NoControl + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Speech + + $this - + + 37 + + NoControl - - 9, 301 + + 496, 393 - - NoControl + + 75, 23 - - 63 + + 95 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Browse - - Testing Screen + + BUT_logdirbrowse - - CMB_videoresolutions + + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 84 + + $this - - No RC Receiver + + 36 - - 35 + + True - - 31 + + NoControl - - 59 + + 9, 424 - - Line Length + + 40, 13 - - 62 + + 96 - - 29 + + Theme - + + label4 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 35 - - 93 + + 107, 421 - - 415, 251 + + 138, 21 - - True + + 97 - - 78 + + CMB_theme - - Mode + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + $this - - Waypoint + + 34 - + NoControl - - 0 - - - 5 + + 249, 421 - - 6 + + 75, 20 - - 3 + + 98 - - 4 + + Custom - - Layout + + BUT_themecustom - - True + + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 7 + + $this - - 8 + + 33 - - 104 + + True - - 107, 300 + + NoControl - - 2 + + 760, 89 - - label9 + + 88, 21 - - 125 + + 99 - - 6 + + Arm/Disarm - - NoControl + + False - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + CHK_speecharmdisarm - - 81, 13 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 71, 13 + + 32 - - 0 + + NoControl - - 80 + + 107, 551 - - 76 + + 99, 20 - - BUT_Joystick + + 100 - - 74 + + Start/Stop Vario - - 75 + + BUT_Vario - - $this + + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - $this + + 31 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True - + NoControl - - 133, 18 + + 107, 577 - - 58 + + 122, 21 - - 340, 577 + + 102 - - 7 + + OptOut Anon Stats - - True + + chk_analytics - - Battery Warning + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 138, 21 + + $this - - CMB_ratesensors + + 30 - - 94 + + True - + NoControl - - 8 + + 228, 577 - - 7 + + 98, 21 - + + 103 + + + Beta Updates + + + CHK_beta + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - chk_displayheading + + $this - + + 29 + + + True + + NoControl - - -1 + + 340, 554 - - 6 + + 149, 21 - - 5 + + 104 - - 0 + + Password Protect Config - - True + + CHK_Password - - 2 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + $this - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 28 - - RC + + True - - $this + + NoControl - - 104 + + 853, 89 - - 282, 251 + + 87, 21 - - 50 + + 105 - - 63, 13 + + Low Speed - - 65, 13 + + False - - chk_shownofly + + CHK_speechlowspeed - - 79, 13 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 138, 21 + + $this - - 107, 551 + + 21 - - 67, 20 + + True - - 124 + + NoControl - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 496, 554 - - 45, 13 + + 98, 21 - - 166, 251 + + 107 - - 52 + + Show Airports - - 228, 577 + + CHK_showairports - - 87 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - CHK_speecharmdisarm + + $this - - chk_temp + + 20 - - 79 + + True - - 107, 475 + + NoControl - - 496, 393 + + 598, 554 - - True + + 62, 21 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 108 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ADSB - - 100 + + chk_ADSB System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - CMB_severity + + $this - - Display Nav Bearing + + 19 - + + True + + NoControl - - 663, 501 + + 496, 577 - - $this + + 61, 21 - - 102 + + 109 - - 84 + + TFR's - - 42 + + chk_tfr - - label23 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Sensor + + $this - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 18 - - CHK_speechaltwarning + + Bottom, Left - - 10 + + NoControl - - 49 + + 340, 623 - - NoControl + + 144, 17 - - NoControl + + 110 - - NoControl + + Testing Screen - - $this + + chk_temp - - 84 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 138, 21 + + $this - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17 - + True - - 66 - - + NoControl - - label1 + + 340, 577 - - chk_displaynavbearing + + 111, 21 - - 35 + + 111 - - $this + + No RC Receiver - - False + + chk_norcreceiver - - 80, 17 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - True - - - 155, 17 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 16 - - Params Download in BackGround + + 107, 448 - - 10 + + 138, 21 - - 40 + + 113 - - 22 + + CMB_Layout - - 122 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 39 - - - MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 15 - - CHK_speechcustom + + True - - 82 + + NoControl - - 199, 501 + + 9, 451 - - 97 + + 39, 13 - - NoControl + + 115 - - NoControl + + Layout - - cmb_secondarydisplaystyle + + label5 - - 15 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + $this - - 30s Interval + + 14 - - 46 + + True 598, 578 - - 55, 17 + + 130, 21 - - 11 + + 116 - - CHK_loadwponconnect + + Auto Commit Params - - Theme + + CHK_AutoParamCommit - - 71 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 13 + + + True + + + NoControl - - True + + 671, 554 - - $this + + 63, 21 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 117 - - 28 + + No Fly - - 119 + + chk_shownofly - + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 118 - - - 5 + + $this - - NoControl + + 12 - - 252, 108 + + True NoControl - - Start/Stop Vario - - - 57 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 249, 198 - - $this + + 46, 13 - - NoControl + + 118 - - chk_ADSB + + Alt Units - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label6 - - 53, 20 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 56 + + $this - + 10 - - UI Language + + 320, 195 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 138, 21 - - Load Waypoints on connect? + + 119 - - 249, 198 + + CMB_altunits - - NoControl + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 23 + + 11 - - 123 + + 107, 475 - - $this + + 53, 20 - - True + + 120 - - NoControl + + num_gcsid - - 70 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 598, 554 + + $this - - NoControl + + 9 - - 91, 17 + + True - - 50 + + NoControl - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9, 477 - - 9, 278 + + 43, 13 - - CMB_altunits + + 121 GCS ID - - 138, 21 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label7 - - label33 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 69 + + $this - - 90 + + 8 - - 107, 111 + + True - + NoControl - - 91 - - - False - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 107, 600 - - 358, 6 + + 193, 21 - - TFR's + + 122 - - 86 + + Params Download in BackGround - - 40, 21 + + CHK_params_bg - - 9, 65 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - $this + + 7 - - 67 + + True - - 12 + + NoControl - - Stop + + 340, 600 - - True + + 162, 21 - - NoControl + + 123 - - chk_displayradius + + Runing on a slow computer - + + chk_slowMachine + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + $this - + + 6 + + True - + NoControl - - 54, 17 - - - $this - - - Reset on USB Connect (toggle DTR) + + 212, 89 - - 320, 195 + + 116, 21 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 124 - - 50 + + Only when Armed - - label7 + + False - - 84, 13 + + CHK_speechArmedOnly - - label2 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5 - - CHK_speechwaypoint + + NoControl - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 252, 108 - - Password Protect Config + + 157, 31 - - 6 + + 126 - - 45 + + NOTE: Set the low level of SEVERITY to speak - - label98 + + label8 - - txt_log_dir + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 61, 13 + + $this - + + 4 + + + True + + NoControl - - 122, 17 + + 9, 527 - - 180, 303 + + 81, 13 - - NUM_tracklength + + 128 - - Display in Flightdata + + Inactive Aircraft - - CHK_enablespeech + + label9 - - 121 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + $this - - Display Heading + + 3 - - Position + + 107, 524 - - label97 + + 138, 21 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 129 - - CHK_AutoParamCommit + + cmb_secondarydisplaystyle - - 80 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 107, 8 + + $this - - 5 + + 2 - + True - - 107, 577 + + NoControl - - 9, 254 + + 107, 501 - - 13 + + 93, 21 - + + 104 + + + Display COG + + + chk_displaycog + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 8 + + 27 - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True - - 853, 89 + + NoControl - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9, 502 - - Arm/Disarm + + 64, 13 - - 9, 198 + + 130 - - True + + Aircraft Icon - - 56 + + label10 - - CHK_speechmode + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 8 + + $this - - 7 + + 1 - - 6 + + True - - 5 + + NoControl - - 4 + + 199, 501 - - 3 + + 110, 21 - - 2 + + 104 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Display Heading - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + chk_displayheading - - 74 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 841, 502 + + 25 - - 205, 17 + + True - - 34 + + NoControl - - BUT_videostop + + 308, 501 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 129, 21 - - $this + + 104 - - 64 + + Display Nav Bearing - - 104, 17 + + chk_displaynavbearing - - Dist Units + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 61 + + $this - - 71, 17 + + 24 - + True - - False - - - MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + NoControl - - False + + 436, 501 - - 63 + + 128, 21 - - Display COG + + 104 - - True + + Display Turn Radius - - True + + chk_displayradius - - Attitude + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 40, 21 + + 23 - - 671, 89 + + True - - chk_norcreceiver + + NoControl - - 37 + + 563, 501 - - 2 + + 101, 21 - - CHK_speechlowspeed + + 104 - - 40, 13 + + Display Target - - Mode/Status + + chk_displaytarget - - CHK_speechArmedOnly + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - BUT_themecustom + + 22 - - chk_analytics + + 768, 500 - - 54 + + 67, 20 - - 99 + + 80 - - $this + + num_linelength - - True + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - CMB_language - - - label103 - - - 73 + + 53 - - 267, 302 + + True - - No Fly + + NoControl - - 81 + + 841, 502 - - label4 + + 63, 13 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 84 - - Speed Units + + Line Length - - 69, 13 + + label11 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - label26 - - - NoControl + + 47 - + True - - Bottom, Left - - - $this + + NoControl - - $this + + 663, 501 - - 44, 13 + + 106, 21 - - 107, 421 + + 104 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Display ToolTip - - 52 + + chk_displaytooltip - - NoControl + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - NOTE: The Configuration Tab will NOT display these units, as those are raw values. - + + 26 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 107, 653 - - 0 + + 138, 21 + + + 127 - - 107, 653 - - - 138, 21 - - - 127 - - + CMB_mapCache - + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 80 + + 92 + + + True - - True - - - NoControl - - - 9, 656 - - - 96, 13 - - - 50 - - + + NoControl + + + 9, 656 + + + 96, 13 + + + 50 + + Map Access Mode - + label13 - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 79 + + 91 - - NoControl - - - 251, 653 - - - 94, 21 - - - 95 - - + + NoControl + + + 251, 653 + + + 94, 21 + + + 95 + + Open Map Cache - + BUT_mapCacheDir - + MissionPlanner.Controls.MyButton, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 81 + + 93 + + + True + + + 947, 88 + + + 91, 21 + + + 131 + + + ADSB Alerts + + + CHK_speechadsb + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 True - + + True + + + 1664, 693 + + + ConfigPlanner + + + System.Windows.Forms.MyUserControl, MissionPlanner.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + \ No newline at end of file diff --git a/GCSViews/FlightData.cs b/GCSViews/FlightData.cs index ca1bf70c8c..281790e46d 100644 --- a/GCSViews/FlightData.cs +++ b/GCSViews/FlightData.cs @@ -4070,8 +4070,15 @@ private void mainloop() if (adsbplane == null || pllau == null) return; + string typeCategory = ""; + if (pllau.Type != "") { + typeCategory = pllau.Type + " / "; + } + typeCategory += pllau.GetCategoryFriendlyString(); + adsbplane.ToolTipText = "ICAO: " + pllau.Tag + "\n" + "Callsign: " + pllau.CallSign + "\n" + + "Type/Category: " + typeCategory + "\n" + "Squawk: " + pllau.Squawk.ToString("X4") + "\n" + "Alt: " + (pllau.Alt * CurrentState.multiplieralt).ToString("0") + " " + CurrentState.AltUnit + "\n" + "Speed: " + (pllau.Speed / 100 /* cm to m */ * CurrentState.multiplierspeed).ToString("0") + " " + CurrentState.SpeedUnit + "\n" + @@ -4087,6 +4094,7 @@ private void mainloop() adsbplane.Position = pllau; adsbplane.heading = pllau.Heading; adsbplane.Tag = pllau; + adsbplane.EmitterCategory = pllau.GetEmitterCategory(); if (((DateTime) pllau.Time) > DateTime.Now.AddSeconds(-30)) { diff --git a/MainV2.cs b/MainV2.cs index f2c86b6e79..6001f8a4b0 100644 --- a/MainV2.cs +++ b/MainV2.cs @@ -1208,6 +1208,8 @@ void adsb_UpdatePlanePosition(object sender, MissionPlanner.Utilities.adsb.Point plane.Speed = adsb.Speed; plane.VerticalSpeed = adsb.VerticalSpeed; plane.Source = sender; + plane.Category = adsb.Category; + plane.Type = adsb.Type; instance.adsbPlanes[id] = plane; } else @@ -1217,7 +1219,7 @@ void adsb_UpdatePlanePosition(object sender, MissionPlanner.Utilities.adsb.Point new adsb.PointLatLngAltHdg(adsb.Lat, adsb.Lng, adsb.Alt, adsb.Heading, adsb.Speed, id, DateTime.Now) - {CallSign = adsb.CallSign, Squawk = adsb.Squawk, Raw = adsb.Raw, Source = sender}; + {CallSign = adsb.CallSign, Squawk = adsb.Squawk, Raw = adsb.Raw, Source = sender, Category = adsb.Category, Type = adsb.Type}; } } } @@ -3077,6 +3079,7 @@ private async void ADSBRunner() return; adsbThread = true; ADSBThreadRunner.Reset(); + DateTime lastSpeech = DateTime.Now; while (adsbThread) { await Task.Delay(1000).ConfigureAwait(false); // run every 1000 ms @@ -3109,7 +3112,7 @@ private async void ADSBRunner() packet.altitude_type = (byte)MAVLink.ADSB_ALTITUDE_TYPE.GEOMETRIC; packet.callsign = currentPlane.CallSign.MakeBytes(); packet.squawk = currentPlane.Squawk; - packet.emitter_type = (byte)MAVLink.ADSB_EMITTER_TYPE.NO_INFO; + packet.emitter_type = ((byte)currentPlane.GetEmitterCategory()); packet.heading = (ushort)(currentPlane.Heading * 100); packet.lat = (int)(currentPlane.Lat * 1e7); packet.lon = (int)(currentPlane.Lng * 1e7); @@ -3129,7 +3132,53 @@ private async void ADSBRunner() //send to current connected MainV2.comPort.sendPacket(packet, MainV2.comPort.MAV.sysid, MainV2.comPort.MAV.compid); + // Speech alert if plane is too close + var closestPlane = relevantPlanes.FirstOrDefault(); + if ( + lastSpeech.AddSeconds(5) < DateTime.Now && + closestPlane != null && + closestPlane.GetDistance(ourLocation) < 1000 && + Math.Abs(closestPlane.Alt - comPort.MAV.cs.altasl) < 500 + ) + { + if (speechEnable && speechEngine != null) + { + if (Settings.Instance.GetBoolean("speechadsbenabled")) + { + + // Bearing to traffic from our plane + int bearingToTraffic = (int)ourLocation.GetBearing(closestPlane); + + // Heading of our plane + int heading = (int)comPort.MAV.cs.yaw; + // Calculate the bearing to traffic relative to our heading + bearingToTraffic = (bearingToTraffic - heading + 360) % 360; + int clock = (int)Math.Round(bearingToTraffic / 30.0, MidpointRounding.AwayFromZero); + if (clock == 0) + { + clock = 12; + } + // Log it including callsign + log.InfoFormat("Traffic: {0} {1}; {2} {3}", + bearingToTraffic, + closestPlane.Alt > ourLocation.Alt ? "high" : "low", + closestPlane.CallSign, + closestPlane.Tag + ); + + string recommendedAction = closestPlane.Alt > ourLocation.Alt ? "descend" : "climb"; + string speech = string.Format("Traffic: {0} O'Clock {1}; {2}", + clock, + closestPlane.Alt > ourLocation.Alt ? "high" : "low", + recommendedAction + ); + MainV2.speechEngine.SpeakAsync(speech); + lastSpeech = DateTime.Now; + } + } + + } } } diff --git a/Utilities/httpserver.cs b/Utilities/httpserver.cs index 4bfca342b1..40bdbdb9dc 100644 --- a/Utilities/httpserver.cs +++ b/Utilities/httpserver.cs @@ -1095,6 +1095,20 @@ public void ProcessClient(object clientobj) } stream.Close(); } + else if (url.ToLower().Contains("/adsb")) + { + string header = "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\nAccess-Control-Allow-Origin: *\r\n\r\n"; + byte[] temp = asciiEncoding.GetBytes(header); + stream.Write(temp, 0, temp.Length); + + var adsbdata = MainV2.instance.adsbPlanes.ToJSON(); + + byte[] buffer = Encoding.ASCII.GetBytes(adsbdata); + + stream.Write(buffer, 0, buffer.Length); + + stream.Close(); + } ///////////////////////////////////////////////////////////////// else if (url.ToLower().Contains(" / ")) {