diff --git a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj index d2c0842ebc..ba72a4d3c1 100644 --- a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj +++ b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj @@ -254,11 +254,11 @@ ProgressReporterDialogue.cs - + UserControl - - ConfigAccelerometerCalibration.cs + + ConfigAccelerometerCalibrationQuad.cs UserControl @@ -320,6 +320,12 @@ ConfigRawParams.cs + + UserControl + + + ConfigAccelerometerCalibrationPlane.cs + Form @@ -558,26 +564,26 @@ ProgressReporterDialogue.cs - - ConfigAccelerometerCalibration.cs + + ConfigAccelerometerCalibrationQuad.cs - - ConfigAccelerometerCalibration.cs + + ConfigAccelerometerCalibrationQuad.cs - - ConfigAccelerometerCalibration.cs + + ConfigAccelerometerCalibrationQuad.cs - - ConfigAccelerometerCalibration.cs + + ConfigAccelerometerCalibrationQuad.cs - - ConfigAccelerometerCalibration.cs + + ConfigAccelerometerCalibrationQuad.cs - - ConfigAccelerometerCalibration.cs + + ConfigAccelerometerCalibrationQuad.cs - - ConfigAccelerometerCalibration.cs + + ConfigAccelerometerCalibrationQuad.cs ConfigArducopter.cs @@ -699,6 +705,27 @@ Configuration.cs + + ConfigAccelerometerCalibrationPlane.cs + + + ConfigAccelerometerCalibrationPlane.cs + + + ConfigAccelerometerCalibrationPlane.cs + + + ConfigAccelerometerCalibrationPlane.cs + + + ConfigAccelerometerCalibrationPlane.cs + + + ConfigAccelerometerCalibrationPlane.cs + + + ConfigAccelerometerCalibrationPlane.cs + Setup.cs diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.Designer.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.Designer.cs new file mode 100644 index 0000000000..e674259f91 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.Designer.cs @@ -0,0 +1,97 @@ +namespace ArdupilotMega.GCSViews.ConfigurationView +{ + partial class ConfigAccelerometerCalibrationPlane + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigAccelerometerCalibrationPlane)); + this.label28 = new System.Windows.Forms.Label(); + this.BUT_levelplane = new ArdupilotMega.MyButton(); + this.CHK_manuallevel = new System.Windows.Forms.CheckBox(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label28 + // + resources.ApplyResources(this.label28, "label28"); + this.label28.Name = "label28"; + // + // BUT_levelplane + // + resources.ApplyResources(this.BUT_levelplane, "BUT_levelplane"); + this.BUT_levelplane.Name = "BUT_levelplane"; + this.toolTip1.SetToolTip(this.BUT_levelplane, resources.GetString("BUT_levelplane.ToolTip")); + this.BUT_levelplane.UseVisualStyleBackColor = true; + this.BUT_levelplane.Click += new System.EventHandler(this.BUT_levelplane_Click); + // + // CHK_manuallevel + // + resources.ApplyResources(this.CHK_manuallevel, "CHK_manuallevel"); + this.CHK_manuallevel.Name = "CHK_manuallevel"; + this.toolTip1.SetToolTip(this.CHK_manuallevel, resources.GetString("CHK_manuallevel.ToolTip")); + this.CHK_manuallevel.UseVisualStyleBackColor = true; + this.CHK_manuallevel.CheckedChanged += new System.EventHandler(this.CHK_manuallevel_CheckedChanged); + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; + // + // label2 + // + resources.ApplyResources(this.label2, "label2"); + this.label2.Name = "label2"; + // + // ConfigAccelerometerCalibrationPlane + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.CHK_manuallevel); + this.Controls.Add(this.label28); + this.Controls.Add(this.BUT_levelplane); + this.Name = "ConfigAccelerometerCalibrationPlane"; + this.Load += new System.EventHandler(this.ConfigAccelerometerCalibration_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label28; + private MyButton BUT_levelplane; + private System.Windows.Forms.CheckBox CHK_manuallevel; + private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + } +} diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.cs new file mode 100644 index 0000000000..6837cc9ce3 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using ArdupilotMega.Controls.BackstageView; + +namespace ArdupilotMega.GCSViews.ConfigurationView +{ + public partial class ConfigAccelerometerCalibrationPlane : BackStageViewContentPanel + { + bool startup = false; + + public ConfigAccelerometerCalibrationPlane() + { + InitializeComponent(); + } + + private void ConfigAccelerometerCalibration_Load(object sender, EventArgs e) + { + if (!MainV2.comPort.BaseStream.IsOpen) + { + this.Enabled = false; + return; + } + else + { + if (MainV2.cs.firmware == MainV2.Firmwares.ArduPlane) + { + this.Enabled = true; + } + else + { + this.Enabled = false; + return; + } + } + + startup = true; + + if (MainV2.comPort.param["MANUAL_LEVEL"] != null) + CHK_manuallevel.Checked = MainV2.comPort.param["MANUAL_LEVEL"].ToString() == "1" ? true : false; + + startup = false; + } + + private void CHK_manuallevel_CheckedChanged(object sender, EventArgs e) + { + if (startup) + return; + try + { + MainV2.comPort.setParam("MANUAL_LEVEL", ((CheckBox)sender).Checked == true ? 1 : 0); + } + catch + { + CustomMessageBox.Show("Failed to level : AP 2.32+ is required"); + } + } + + private void BUT_levelplane_Click(object sender, EventArgs e) + { + try + { +#if MAVLINK10 + int fixme; // needs to be accel only + MainV2.comPort.doCommand(MAVLink.MAV_CMD.PREFLIGHT_CALIBRATION,1,1,1,1,1,1,1); +#else + MainV2.comPort.doAction(MAVLink.MAV_ACTION.MAV_ACTION_CALIBRATE_ACC); +#endif + BUT_levelplane.Text = "Complete"; + } + catch + { + CustomMessageBox.Show("Failed to level : AP 2.32+ is required"); + } + } + } +} diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.es-ES.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.es-ES.resx new file mode 100644 index 0000000000..70ad73f1af --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.es-ES.resx @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 180 + + + Manual + + + PWM 0 - 1230 + + + PWM 1621 - 1749 + + + Modo actual: + + + Habilitar el flujo óptico + + + NOTA: Las imágenes son sólo para su presentación + + + Modo Simple + + + PWM 1750 + + + + Elevons CH1 Rev + + + PWM Actual: + + + APMSetup + + + Swash-Servo posición + + + Activar Compas + + + Modo Simple + + + ArduCopter2 + + + Modo Simple + + + Ajuste Chásis (+ or x) + + + 60 + + + 1 + + + Modo Simple + + + Modo Simple + + + 2 + + + Modos + + + Modo Simple + + + 3 + + + Reset + + + -60 + + + Superior + + + Swash de Viaje + + + Manual + + + Timón de Viaje + + + Calibración del sensor de voltaje:Para calibrar el sensor, use un multímetro para medir la tensión que sale de la CES de la batería-la eliminación del circuito (se trata de cables negro y rojo en el cable de tres hilos que suministra energía a la placa APM).Luego reste 0,3 V de ese valor y entrar en él en el campo # 1 a la izquierda. + + + Calibrar Radio + + + Max + + + Modo de Vuelo 2 + + + Alabeo Max + + + Modo de Vuelo 3 + + + Cabeceo Max + + + por ejemplo, en grados 2 ° 3 'W es -2,3 + + + Modo de Vuelo 1 + + + Nivel tu quad para establecer las compensaciones por defecto acel + + + Modo de Vuelo 6 + + + Capacidad + + + Declinación + + + Activar Sonar + + + PWM 1231 - 1360 + + + Entrada Radio + + + Calibración + + + 1500 + + + Modo de Vuelo 4 + + + Modo de Vuelo 5 + + + Gyro + + + PWM 1361 - 1490 + + + Hardware + + + PWM 1491 - 1620 + + + Sitio Web Declinación + + + 1500 + + + Batería + + + Cero + + + Activar Airspeed + + + 4500 + + + Restablecer los Ajustes de hardware APM + + + 1000 + + + Monitor + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.fr.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.fr.resx new file mode 100644 index 0000000000..1bd274beea --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.fr.resx @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 180 + + + Manuel + + + PWM 0 - 1230 + + + PWM 1621 - 1749 + + + Mode Courant: + + + Activ. capteur optique + + + NOTE: images pou presentation uniquement. Fonctionnel pour Hex, Octo etc... + + + Mode Simple + + + PWM 1750 + + + + Elevons CH1 Rev + + + PWM Actuel: + + + APMSetup + + + Swash-Servo position + + + Activ. Boussole + + + Mode Simple + + + ArduCopter2 + + + Mode Simple + + + type de châssis (+ ou x) + + + 60 + + + 1 + + + Mode Simple + + + Mode Simple + + + 2 + + + Modes + + + Mode Simple + + + 3 + + + Réinit. + + + -60 + + + Haut + + + Mouvement Swash + + + Manuel + + + Deplac. du Gouvernail + + + Calibration du capteur de Voltage.1. Mesurer le voltage sur APM et inscrivez-le dans la boite ci-bas.2. Mesurer le voltage de la batterie et inscrivez-le dans la boite ci-bas.3. Inscrire les ampères par volt de la documentation du capteur de courant ci-bas + + + Calibrer Radio + + + Max + + + Mode de vol 2 + + + Roulis Max + + + Mode de vol 2 + + + Tangage Max + + + en degrés eg 2° 3' W est -2.3 + + + Mode de vol 1 + + + Niveler l'apareil pour copensation des accels + + + Mode de vol 6 + + + Capacité + + + Déclination + + + Activer Sonar + + + PWM 1231 - 1360 + + + Entrée Radio + + + 1500 + + + Mode de vol 4 + + + Mode de vol 5 + + + Gyro + + + PWM 1361 - 1490 + + + Matériel + + + PWM 1491 - 1620 + + + Site Web Déclination + + + 1500 + + + Batterie + + + Zéro + + + Activ. Airspeed + + + 4500 + + + RàZ tout parametres du APM + + + 1000 + + + Moniteur + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.it-IT.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.it-IT.resx new file mode 100644 index 0000000000..2b2636c813 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.it-IT.resx @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 180 + + + Manuale + + + PWM 0 - 1230 + + + PWM 1621 - 1749 + + + Modo Corrente: + + + Abilita Flusso ottico + + + Nota: le immagini sono sono per presentazione, funzionerà con Hexa, etc. + + + Modo Semplice + + + PWM 1750 + + + + Elevatore CH1 Rev + + + PWM Corrente: + + + Imposta APM + + + Posizione del servo del piatto + + + Abilita Magnetometro + + + Modo Semplice + + + ArduCopter2 + + + Modo Semplice + + + Imposta Frame (+ or x) + + + 60 + + + 1 + + + Modo Semplice + + + Modo Semplice + + + 2 + + + Modi + + + Modo Semplice + + + 3 + + + Riavvia + + + -60 + + + Alto + + + Escursione del piatto + + + Manuale + + + Escursione Timone + + + Calibarzione del sensore di voltaggio: +1. Misura il valtaggio di ingresso di APM e inseriscilo nel box sotto +2. Misura il voltaggio della batteria e inseriscilo nel box sotto +3. Dalle caratteristiche del sensore di corrente, inserisci il valore degli ampere per volt nel box qui sotto + + + Calibrazione Radio + + + Massimo + + + Modo di volo 2 + + + Rollio massimo + + + Modo di volo 3 + + + Passo massimo + + + in gradi es 2° 3' W is -2.3 + + + Modo di volo 1 + + + Livella il quad per impostare gli accelerometri + + + Modo di volo 6 + + + Capacità + + + Declinazione + + + Attiva Sonar + + + PWM 1231 - 1360 + + + Ingresso Radio + + + Calibration + + + 1500 + + + Modo di volo 4 + + + Modo di volo 5 + + + Giroscopio + + + PWM 1361 - 1490 + + + Hardware + + + PWM 1491 - 1620 + + + Sito Web per la Declinazione + + + 1500 + + + Batteria + + + Zero + + + Attiva Sensore Velocità + + + 4500 + + + Resetta APM ai valori di Default + + + 1000 + + + Monitor + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.pl.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.pl.resx new file mode 100644 index 0000000000..057b932716 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.pl.resx @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 180 + + + Ręczne + + + PWM 0 - 1230 + + + PWM 1621 - 1749 + + + Aktualny tryb: + + + Włącz Optical Flow + + + UWAGA: Obrazy są wyłącznie do prezentacji, działają jedynie z hexa, itp. + + + Tryb prosty + + + PWM 1750 + + + + Odwr. Elevon CH1 + + + Aktualny PWM: + + + Ustawienia APM + + + Pozycja serwa płyty ster. + + + Włącz kompas + + + Tryb prosty + + + ArduCopter2 + + + Tryb prosty + + + Ustawienie ramy (+ lub x) + + + 60 + + + 1 + + + Tryb prosty + + + Tryb prosty + + + 2 + + + Tryby + + + Tryb prosty + + + 3 + + + Reset + + + -60 + + + Góra + + + Zakres ruchu płyty sterującej + + + Ręczne + + + Zakres steru kierunku + + + Kalibracja czujnika napięcia: +1. Zmierz napięcie wejściowe APM i wpisz poniżej +2. Zmierz napięcie baterii i wpisz poniżej +3. Wpisz poniżej ilość amperów/wolt [A/V] z dokumentacji czujnika prądu + + + Kalibracja radia + + + Max + + + Tryb lotu 2 + + + Max przechylenie + + + Tryb lotu 3 + + + Max pochylenie + + + w stopniech np. 2° 3' W to -2.3 + + + Tryb lotu 1 + + + Wypoziomuj quada żeby stawić domyśle offsety przysp. + + + Tryb lotu 6 + + + Pojemność + + + Deklinacja + + + Włącz sonar + + + PWM 1231 - 1360 + + + Wejścia radia + + + Calibration + + + 1500 + + + Tryb lotu 4 + + + Tryb lotu 5 + + + Żyro + + + PWM 1361 - 1490 + + + Hardware + + + PWM 1491 - 1620 + + + Strona www deklinacji + + + 1500 + + + Bateria + + + Zero + + + Włącz prędkość powietrza + + + 4500 + + + Reset APM do stawień domyślnych + + + 1000 + + + Monitor + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.resx new file mode 100644 index 0000000000..a4f7288080 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.resx @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + True + + + + NoControl + + + + 114, 129 + + + 212, 13 + + + 15 + + + Level your plane to set default accel offsets + + + label28 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + NoControl + + + 175, 158 + + + 75, 23 + + + 14 + + + Level + + + 17, 17 + + + Do a accel calibration now. + + + BUT_levelplane + + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.1.4492.39671, Culture=neutral, PublicKeyToken=null + + + $this + + + 4 + + + True + + + 172, 264 + + + 86, 17 + + + 16 + + + Manual level + + + Disables autolevel and will keep the last done accel calibration + + + CHK_manuallevel + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + True + + + 150, 248 + + + 133, 13 + + + 17 + + + For advanced users ONLY + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + 100, 49 + + + 264, 39 + + + 18 + + + By default your plane will autolevel on every boot. +To disable this action you need to turn on manual + level and preform a level to calibrate the accel offsets. + + + label2 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 13 + + + 439, 356 + + + toolTip1 + + + System.Windows.Forms.ToolTip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ConfigAccelerometerCalibrationPlane + + + ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4492.39671, Culture=neutral, PublicKeyToken=null + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.zh-Hans.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.zh-Hans.resx new file mode 100644 index 0000000000..f96892c423 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.zh-Hans.resx @@ -0,0 +1,496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 遥控输入 + + + 模式 + + + 硬件 + + + 电池 + + + AC2 直升机 + + + 上降副翼 (Elevon) 配置 + + + + 115, 17 + + + Elevons CH2 逆转 + + + 91, 17 + + + Elevons 逆转 + + + 115, 17 + + + Elevons CH1 逆转 + + + 50, 17 + + + 逆转 + + + 50, 17 + + + 逆转 + + + 50, 17 + + + 逆转 + + + 50, 17 + + + 逆转 + + + 校准遥控 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 64, 13 + + + 当前 PWM: + + + 58, 13 + + + 当前模式: + + + 64, 13 + + + 飞行模式 6 + + + 64, 13 + + + 飞行模式 5 + + + 64, 13 + + + 飞行模式 4 + + + 64, 13 + + + 飞行模式 3 + + + 64, 13 + + + 飞行模式 2 + + + 64, 13 + + + 飞行模式 1 + + + 保存模式 + + + 十进制, 2° 3' W 就是 -2.3 + + + 启用光流 + + + 67, 13 + + + 磁偏角网站 + + + 磁偏角 + + + 启用空速计 + + + 启用声纳 + + + 启用罗盘 + + + 58, 13 + + + 输入电压: + + + 94, 13 + + + 测量的电池电压: + + + 58, 13 + + + 电池电压: + + + 52, 13 + + + 分 压 比: + + + 63, 13 + + + 安培/伏特: + + + 48, 18 + + + 传感器 + + + 电压传感器校准: +1. 测量APM输入电压,输入到下方的文本框中 +2. 测量电池电压,输入到下方的文本框中 +3. 从当前的传感器的数据表中找到安培/伏特,输入到下方的文本框中 + + + 31, 13 + + + 容量 + + + 48, 13 + + + 监控器 + + + 175, 13 + + + 设置水平面的默认加速度计偏移 + + + 261, 13 + + + 注: 图片只是用于展示,设置可以用于六轴等机架 + + + 93, 13 + + + 机架设置 (+ 或 x) + + + 找平 + + + 手动 + + + 手动 + + + 31, 13 + + + 感度 + + + 31, 13 + + + 启用 + + + 31, 13 + + + 微调 + + + 31, 13 + + + 逆转 + + + 43, 13 + + + 方向舵 + + + 31, 13 + + + 最大 + + + 31, 13 + + + 最小 + + + 31, 13 + + + 最低 + + + 31, 13 + + + 最高 + + + 0度 + + + 31, 13 + + + 微调 + + + 31, 13 + + + 逆转 + + + 31, 13 + + + 位置 + + + 31, 13 + + + 舵机 + + + 55, 13 + + + 最大俯仰 + + + 55, 13 + + + 最大侧倾 + + + 55, 13 + + + 舵机行程 + + + 79, 13 + + + 斜盘水平微调 + + + 79, 13 + + + 斜盘舵机位置 + + + 重置 + + + 重置 APM 为默认设置 + + + APM设置 + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.zh-TW.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.zh-TW.resx new file mode 100644 index 0000000000..0c03fbf8ed --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationPlane.zh-TW.resx @@ -0,0 +1,460 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 重置 + + + 遙控輸入 + + + 模式 + + + 硬件 + + + 電池 + + + 重置 APM 為默認設置 + + + + 50, 17 + + + 逆轉 + + + 50, 17 + + + 逆轉 + + + 50, 17 + + + 逆轉 + + + 50, 17 + + + 逆轉 + + + 校準遙控 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 64, 13 + + + 當前 PWM: + + + 58, 13 + + + 當前模式: + + + 64, 13 + + + 飛行模式 6 + + + 64, 13 + + + 飛行模式 5 + + + 64, 13 + + + 飛行模式 4 + + + 64, 13 + + + 飛行模式 3 + + + 64, 13 + + + 飛行模式 2 + + + 64, 13 + + + 飛行模式 1 + + + 保存模式 + + + 67, 13 + + + 磁偏角網站 + + + 磁偏角 + + + 啟用空速計 + + + 啟用聲納 + + + 啟用羅盤 + + + 63, 13 + + + 安培/伏特: + + + 52, 13 + + + 分 壓 比: + + + 58, 13 + + + 電池電壓: + + + 94, 13 + + + 測量的電池電壓: + + + 58, 13 + + + 輸入電壓: + + + 電壓傳感器校準: +1. 測量APM輸入電壓,輸入到下方的文本框中 +2. 測量電池電壓,輸入到下方的文本框中 +3. 從當前的傳感器的數據表中找到安培/伏特,輸入到下方的文本框中 + + + 31, 13 + + + 容量 + + + 48, 13 + + + 監控器 + + + 175, 13 + + + 設置水平面的默認加速度計偏移 + + + 261, 13 + + + 注: 圖片只是用於展示,設置可以用於六軸等機架 + + + 93, 13 + + + 機架設置 (+ 或 x) + + + 找平 + + + 31, 13 + + + 感度 + + + 31, 13 + + + 啟用 + + + 31, 13 + + + 微調 + + + 31, 13 + + + 逆轉 + + + 43, 13 + + + 方向舵 + + + 手動 + + + 31, 13 + + + 最大 + + + 31, 13 + + + 最小 + + + 手動 + + + 31, 13 + + + 最低 + + + 31, 13 + + + 最高 + + + 0度 + + + 31, 13 + + + 微調 + + + 31, 13 + + + 逆轉 + + + 31, 13 + + + 位置 + + + 31, 13 + + + 舵機 + + + 55, 13 + + + 最大俯仰 + + + 55, 13 + + + 最大側傾 + + + 55, 13 + + + 舵機行程 + + + 79, 13 + + + 斜盤水平微調 + + + 79, 13 + + + 斜盤舵機位置 + + + APM設置 + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.Designer.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.Designer.cs new file mode 100644 index 0000000000..a61b888aa7 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.Designer.cs @@ -0,0 +1,110 @@ +namespace ArdupilotMega.GCSViews.ConfigurationView +{ + partial class ConfigAccelerometerCalibrationQuad + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigAccelerometerCalibrationQuad)); + this.label28 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.pictureBoxQuadX = new System.Windows.Forms.PictureBox(); + this.pictureBoxQuad = new System.Windows.Forms.PictureBox(); + this.BUT_levelac2 = new ArdupilotMega.MyButton(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuadX)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuad)).BeginInit(); + this.SuspendLayout(); + // + // label28 + // + resources.ApplyResources(this.label28, "label28"); + this.label28.Name = "label28"; + // + // label16 + // + resources.ApplyResources(this.label16, "label16"); + this.label16.Name = "label16"; + // + // label15 + // + resources.ApplyResources(this.label15, "label15"); + this.label15.Name = "label15"; + // + // pictureBoxQuadX + // + this.pictureBoxQuadX.Cursor = System.Windows.Forms.Cursors.Hand; + this.pictureBoxQuadX.Image = global::ArdupilotMega.Properties.Resources.quadx; + resources.ApplyResources(this.pictureBoxQuadX, "pictureBoxQuadX"); + this.pictureBoxQuadX.Name = "pictureBoxQuadX"; + this.pictureBoxQuadX.TabStop = false; + this.pictureBoxQuadX.Click += new System.EventHandler(this.pictureBoxQuadX_Click); + // + // pictureBoxQuad + // + this.pictureBoxQuad.Cursor = System.Windows.Forms.Cursors.Hand; + this.pictureBoxQuad.Image = global::ArdupilotMega.Properties.Resources.quad; + resources.ApplyResources(this.pictureBoxQuad, "pictureBoxQuad"); + this.pictureBoxQuad.Name = "pictureBoxQuad"; + this.pictureBoxQuad.TabStop = false; + this.pictureBoxQuad.Click += new System.EventHandler(this.pictureBoxQuad_Click); + // + // BUT_levelac2 + // + resources.ApplyResources(this.BUT_levelac2, "BUT_levelac2"); + this.BUT_levelac2.Name = "BUT_levelac2"; + this.BUT_levelac2.UseVisualStyleBackColor = true; + this.BUT_levelac2.Click += new System.EventHandler(this.BUT_levelac2_Click); + // + // ConfigAccelerometerCalibrationQuad + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label28); + this.Controls.Add(this.label16); + this.Controls.Add(this.label15); + this.Controls.Add(this.pictureBoxQuadX); + this.Controls.Add(this.pictureBoxQuad); + this.Controls.Add(this.BUT_levelac2); + this.Name = "ConfigAccelerometerCalibrationQuad"; + this.Load += new System.EventHandler(this.ConfigAccelerometerCalibration_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuadX)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxQuad)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label28; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.PictureBox pictureBoxQuadX; + private System.Windows.Forms.PictureBox pictureBoxQuad; + private MyButton BUT_levelac2; + } +} diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.cs new file mode 100644 index 0000000000..5da92ae68d --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using ArdupilotMega.Controls.BackstageView; + +namespace ArdupilotMega.GCSViews.ConfigurationView +{ + public partial class ConfigAccelerometerCalibrationQuad : BackStageViewContentPanel + { + public ConfigAccelerometerCalibrationQuad() + { + InitializeComponent(); + } + + private void pictureBoxQuadX_Click(object sender, EventArgs e) + { + try + { + MainV2.comPort.setParam("FRAME", 1f); + CustomMessageBox.Show("Set to x"); + } + catch { CustomMessageBox.Show("Set frame failed"); } + } + + private void BUT_levelac2_Click(object sender, EventArgs e) + { + try + { +#if MAVLINK10 + int fixme; // needs to be accel only + MainV2.comPort.doCommand(MAVLink.MAV_CMD.PREFLIGHT_CALIBRATION,1,1,1,1,1,1,1); +#else + MainV2.comPort.doAction(MAVLink.MAV_ACTION.MAV_ACTION_CALIBRATE_ACC); +#endif + + BUT_levelac2.Text = "Complete"; + } + catch + { + CustomMessageBox.Show("Failed to level : ac2 2.0.37+ is required"); + } + } + + private void pictureBoxQuad_Click(object sender, EventArgs e) + { + try + { + MainV2.comPort.setParam("FRAME", 0f); + CustomMessageBox.Show("Set to +"); + } + catch { CustomMessageBox.Show("Set frame failed"); } + } + + private void ConfigAccelerometerCalibration_Load(object sender, EventArgs e) + { + if (!MainV2.comPort.BaseStream.IsOpen) + { + this.Enabled = false; + return; + } + else + { + if (MainV2.cs.firmware == MainV2.Firmwares.ArduCopter2) + { + this.Enabled = true; + } + else + { + this.Enabled = false; + return; + } + } + } + } +} diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.es-ES.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.es-ES.resx new file mode 100644 index 0000000000..70ad73f1af --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.es-ES.resx @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 180 + + + Manual + + + PWM 0 - 1230 + + + PWM 1621 - 1749 + + + Modo actual: + + + Habilitar el flujo óptico + + + NOTA: Las imágenes son sólo para su presentación + + + Modo Simple + + + PWM 1750 + + + + Elevons CH1 Rev + + + PWM Actual: + + + APMSetup + + + Swash-Servo posición + + + Activar Compas + + + Modo Simple + + + ArduCopter2 + + + Modo Simple + + + Ajuste Chásis (+ or x) + + + 60 + + + 1 + + + Modo Simple + + + Modo Simple + + + 2 + + + Modos + + + Modo Simple + + + 3 + + + Reset + + + -60 + + + Superior + + + Swash de Viaje + + + Manual + + + Timón de Viaje + + + Calibración del sensor de voltaje:Para calibrar el sensor, use un multímetro para medir la tensión que sale de la CES de la batería-la eliminación del circuito (se trata de cables negro y rojo en el cable de tres hilos que suministra energía a la placa APM).Luego reste 0,3 V de ese valor y entrar en él en el campo # 1 a la izquierda. + + + Calibrar Radio + + + Max + + + Modo de Vuelo 2 + + + Alabeo Max + + + Modo de Vuelo 3 + + + Cabeceo Max + + + por ejemplo, en grados 2 ° 3 'W es -2,3 + + + Modo de Vuelo 1 + + + Nivel tu quad para establecer las compensaciones por defecto acel + + + Modo de Vuelo 6 + + + Capacidad + + + Declinación + + + Activar Sonar + + + PWM 1231 - 1360 + + + Entrada Radio + + + Calibración + + + 1500 + + + Modo de Vuelo 4 + + + Modo de Vuelo 5 + + + Gyro + + + PWM 1361 - 1490 + + + Hardware + + + PWM 1491 - 1620 + + + Sitio Web Declinación + + + 1500 + + + Batería + + + Cero + + + Activar Airspeed + + + 4500 + + + Restablecer los Ajustes de hardware APM + + + 1000 + + + Monitor + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.fr.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.fr.resx new file mode 100644 index 0000000000..1bd274beea --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.fr.resx @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 180 + + + Manuel + + + PWM 0 - 1230 + + + PWM 1621 - 1749 + + + Mode Courant: + + + Activ. capteur optique + + + NOTE: images pou presentation uniquement. Fonctionnel pour Hex, Octo etc... + + + Mode Simple + + + PWM 1750 + + + + Elevons CH1 Rev + + + PWM Actuel: + + + APMSetup + + + Swash-Servo position + + + Activ. Boussole + + + Mode Simple + + + ArduCopter2 + + + Mode Simple + + + type de châssis (+ ou x) + + + 60 + + + 1 + + + Mode Simple + + + Mode Simple + + + 2 + + + Modes + + + Mode Simple + + + 3 + + + Réinit. + + + -60 + + + Haut + + + Mouvement Swash + + + Manuel + + + Deplac. du Gouvernail + + + Calibration du capteur de Voltage.1. Mesurer le voltage sur APM et inscrivez-le dans la boite ci-bas.2. Mesurer le voltage de la batterie et inscrivez-le dans la boite ci-bas.3. Inscrire les ampères par volt de la documentation du capteur de courant ci-bas + + + Calibrer Radio + + + Max + + + Mode de vol 2 + + + Roulis Max + + + Mode de vol 2 + + + Tangage Max + + + en degrés eg 2° 3' W est -2.3 + + + Mode de vol 1 + + + Niveler l'apareil pour copensation des accels + + + Mode de vol 6 + + + Capacité + + + Déclination + + + Activer Sonar + + + PWM 1231 - 1360 + + + Entrée Radio + + + 1500 + + + Mode de vol 4 + + + Mode de vol 5 + + + Gyro + + + PWM 1361 - 1490 + + + Matériel + + + PWM 1491 - 1620 + + + Site Web Déclination + + + 1500 + + + Batterie + + + Zéro + + + Activ. Airspeed + + + 4500 + + + RàZ tout parametres du APM + + + 1000 + + + Moniteur + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.it-IT.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.it-IT.resx new file mode 100644 index 0000000000..2b2636c813 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.it-IT.resx @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 180 + + + Manuale + + + PWM 0 - 1230 + + + PWM 1621 - 1749 + + + Modo Corrente: + + + Abilita Flusso ottico + + + Nota: le immagini sono sono per presentazione, funzionerà con Hexa, etc. + + + Modo Semplice + + + PWM 1750 + + + + Elevatore CH1 Rev + + + PWM Corrente: + + + Imposta APM + + + Posizione del servo del piatto + + + Abilita Magnetometro + + + Modo Semplice + + + ArduCopter2 + + + Modo Semplice + + + Imposta Frame (+ or x) + + + 60 + + + 1 + + + Modo Semplice + + + Modo Semplice + + + 2 + + + Modi + + + Modo Semplice + + + 3 + + + Riavvia + + + -60 + + + Alto + + + Escursione del piatto + + + Manuale + + + Escursione Timone + + + Calibarzione del sensore di voltaggio: +1. Misura il valtaggio di ingresso di APM e inseriscilo nel box sotto +2. Misura il voltaggio della batteria e inseriscilo nel box sotto +3. Dalle caratteristiche del sensore di corrente, inserisci il valore degli ampere per volt nel box qui sotto + + + Calibrazione Radio + + + Massimo + + + Modo di volo 2 + + + Rollio massimo + + + Modo di volo 3 + + + Passo massimo + + + in gradi es 2° 3' W is -2.3 + + + Modo di volo 1 + + + Livella il quad per impostare gli accelerometri + + + Modo di volo 6 + + + Capacità + + + Declinazione + + + Attiva Sonar + + + PWM 1231 - 1360 + + + Ingresso Radio + + + Calibration + + + 1500 + + + Modo di volo 4 + + + Modo di volo 5 + + + Giroscopio + + + PWM 1361 - 1490 + + + Hardware + + + PWM 1491 - 1620 + + + Sito Web per la Declinazione + + + 1500 + + + Batteria + + + Zero + + + Attiva Sensore Velocità + + + 4500 + + + Resetta APM ai valori di Default + + + 1000 + + + Monitor + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.pl.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.pl.resx new file mode 100644 index 0000000000..057b932716 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.pl.resx @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 180 + + + Ręczne + + + PWM 0 - 1230 + + + PWM 1621 - 1749 + + + Aktualny tryb: + + + Włącz Optical Flow + + + UWAGA: Obrazy są wyłącznie do prezentacji, działają jedynie z hexa, itp. + + + Tryb prosty + + + PWM 1750 + + + + Odwr. Elevon CH1 + + + Aktualny PWM: + + + Ustawienia APM + + + Pozycja serwa płyty ster. + + + Włącz kompas + + + Tryb prosty + + + ArduCopter2 + + + Tryb prosty + + + Ustawienie ramy (+ lub x) + + + 60 + + + 1 + + + Tryb prosty + + + Tryb prosty + + + 2 + + + Tryby + + + Tryb prosty + + + 3 + + + Reset + + + -60 + + + Góra + + + Zakres ruchu płyty sterującej + + + Ręczne + + + Zakres steru kierunku + + + Kalibracja czujnika napięcia: +1. Zmierz napięcie wejściowe APM i wpisz poniżej +2. Zmierz napięcie baterii i wpisz poniżej +3. Wpisz poniżej ilość amperów/wolt [A/V] z dokumentacji czujnika prądu + + + Kalibracja radia + + + Max + + + Tryb lotu 2 + + + Max przechylenie + + + Tryb lotu 3 + + + Max pochylenie + + + w stopniech np. 2° 3' W to -2.3 + + + Tryb lotu 1 + + + Wypoziomuj quada żeby stawić domyśle offsety przysp. + + + Tryb lotu 6 + + + Pojemność + + + Deklinacja + + + Włącz sonar + + + PWM 1231 - 1360 + + + Wejścia radia + + + Calibration + + + 1500 + + + Tryb lotu 4 + + + Tryb lotu 5 + + + Żyro + + + PWM 1361 - 1490 + + + Hardware + + + PWM 1491 - 1620 + + + Strona www deklinacji + + + 1500 + + + Bateria + + + Zero + + + Włącz prędkość powietrza + + + 4500 + + + Reset APM do stawień domyślnych + + + 1000 + + + Monitor + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.resx new file mode 100644 index 0000000000..e8ff56c3df --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.resx @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + True + + + + NoControl + + + + 124, 13 + + + 210, 13 + + + 15 + + + Level your quad to set default accel offsets + + + label28 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + NoControl + + + 124, 308 + + + 192, 26 + + + 13 + + + NOTE: images are for presentation only +will work with hexa's etc + + + label16 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + NoControl + + + 167, 99 + + + 102, 13 + + + 12 + + + Frame Setup (+ or x) + + + label15 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + NoControl + + + 226, 115 + + + 190, 190 + + + Zoom + + + 11 + + + pictureBoxQuadX + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + NoControl + + + 19, 115 + + + 190, 190 + + + Zoom + + + 10 + + + pictureBoxQuad + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + 182, 43 + + + 75, 23 + + + 16 + + + Level + + + BUT_levelac2 + + + ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.1.4492.39671, Culture=neutral, PublicKeyToken=null + + + $this + + + 5 + + + True + + + 6, 13 + + + 439, 356 + + + ConfigAccelerometerCalibrationQuad + + + ArdupilotMega.Controls.BackstageView.BackStageViewContentPanel, ArdupilotMegaPlanner, Version=1.1.4492.39671, Culture=neutral, PublicKeyToken=null + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.zh-Hans.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.zh-Hans.resx new file mode 100644 index 0000000000..f96892c423 --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.zh-Hans.resx @@ -0,0 +1,496 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 遥控输入 + + + 模式 + + + 硬件 + + + 电池 + + + AC2 直升机 + + + 上降副翼 (Elevon) 配置 + + + + 115, 17 + + + Elevons CH2 逆转 + + + 91, 17 + + + Elevons 逆转 + + + 115, 17 + + + Elevons CH1 逆转 + + + 50, 17 + + + 逆转 + + + 50, 17 + + + 逆转 + + + 50, 17 + + + 逆转 + + + 50, 17 + + + 逆转 + + + 校准遥控 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 74, 17 + + + 简单模式 + + + 64, 13 + + + 当前 PWM: + + + 58, 13 + + + 当前模式: + + + 64, 13 + + + 飞行模式 6 + + + 64, 13 + + + 飞行模式 5 + + + 64, 13 + + + 飞行模式 4 + + + 64, 13 + + + 飞行模式 3 + + + 64, 13 + + + 飞行模式 2 + + + 64, 13 + + + 飞行模式 1 + + + 保存模式 + + + 十进制, 2° 3' W 就是 -2.3 + + + 启用光流 + + + 67, 13 + + + 磁偏角网站 + + + 磁偏角 + + + 启用空速计 + + + 启用声纳 + + + 启用罗盘 + + + 58, 13 + + + 输入电压: + + + 94, 13 + + + 测量的电池电压: + + + 58, 13 + + + 电池电压: + + + 52, 13 + + + 分 压 比: + + + 63, 13 + + + 安培/伏特: + + + 48, 18 + + + 传感器 + + + 电压传感器校准: +1. 测量APM输入电压,输入到下方的文本框中 +2. 测量电池电压,输入到下方的文本框中 +3. 从当前的传感器的数据表中找到安培/伏特,输入到下方的文本框中 + + + 31, 13 + + + 容量 + + + 48, 13 + + + 监控器 + + + 175, 13 + + + 设置水平面的默认加速度计偏移 + + + 261, 13 + + + 注: 图片只是用于展示,设置可以用于六轴等机架 + + + 93, 13 + + + 机架设置 (+ 或 x) + + + 找平 + + + 手动 + + + 手动 + + + 31, 13 + + + 感度 + + + 31, 13 + + + 启用 + + + 31, 13 + + + 微调 + + + 31, 13 + + + 逆转 + + + 43, 13 + + + 方向舵 + + + 31, 13 + + + 最大 + + + 31, 13 + + + 最小 + + + 31, 13 + + + 最低 + + + 31, 13 + + + 最高 + + + 0度 + + + 31, 13 + + + 微调 + + + 31, 13 + + + 逆转 + + + 31, 13 + + + 位置 + + + 31, 13 + + + 舵机 + + + 55, 13 + + + 最大俯仰 + + + 55, 13 + + + 最大侧倾 + + + 55, 13 + + + 舵机行程 + + + 79, 13 + + + 斜盘水平微调 + + + 79, 13 + + + 斜盘舵机位置 + + + 重置 + + + 重置 APM 为默认设置 + + + APM设置 + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.zh-TW.resx b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.zh-TW.resx new file mode 100644 index 0000000000..0c03fbf8ed --- /dev/null +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/ConfigAccelerometerCalibrationQuad.zh-TW.resx @@ -0,0 +1,460 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 重置 + + + 遙控輸入 + + + 模式 + + + 硬件 + + + 電池 + + + 重置 APM 為默認設置 + + + + 50, 17 + + + 逆轉 + + + 50, 17 + + + 逆轉 + + + 50, 17 + + + 逆轉 + + + 50, 17 + + + 逆轉 + + + 校準遙控 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 74, 17 + + + 簡單模式 + + + 64, 13 + + + 當前 PWM: + + + 58, 13 + + + 當前模式: + + + 64, 13 + + + 飛行模式 6 + + + 64, 13 + + + 飛行模式 5 + + + 64, 13 + + + 飛行模式 4 + + + 64, 13 + + + 飛行模式 3 + + + 64, 13 + + + 飛行模式 2 + + + 64, 13 + + + 飛行模式 1 + + + 保存模式 + + + 67, 13 + + + 磁偏角網站 + + + 磁偏角 + + + 啟用空速計 + + + 啟用聲納 + + + 啟用羅盤 + + + 63, 13 + + + 安培/伏特: + + + 52, 13 + + + 分 壓 比: + + + 58, 13 + + + 電池電壓: + + + 94, 13 + + + 測量的電池電壓: + + + 58, 13 + + + 輸入電壓: + + + 電壓傳感器校準: +1. 測量APM輸入電壓,輸入到下方的文本框中 +2. 測量電池電壓,輸入到下方的文本框中 +3. 從當前的傳感器的數據表中找到安培/伏特,輸入到下方的文本框中 + + + 31, 13 + + + 容量 + + + 48, 13 + + + 監控器 + + + 175, 13 + + + 設置水平面的默認加速度計偏移 + + + 261, 13 + + + 注: 圖片只是用於展示,設置可以用於六軸等機架 + + + 93, 13 + + + 機架設置 (+ 或 x) + + + 找平 + + + 31, 13 + + + 感度 + + + 31, 13 + + + 啟用 + + + 31, 13 + + + 微調 + + + 31, 13 + + + 逆轉 + + + 43, 13 + + + 方向舵 + + + 手動 + + + 31, 13 + + + 最大 + + + 31, 13 + + + 最小 + + + 手動 + + + 31, 13 + + + 最低 + + + 31, 13 + + + 最高 + + + 0度 + + + 31, 13 + + + 微調 + + + 31, 13 + + + 逆轉 + + + 31, 13 + + + 位置 + + + 31, 13 + + + 舵機 + + + 55, 13 + + + 最大俯仰 + + + 55, 13 + + + 最大側傾 + + + 55, 13 + + + 舵機行程 + + + 79, 13 + + + 斜盤水平微調 + + + 79, 13 + + + 斜盤舵機位置 + + + APM設置 + + \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/Configuration.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/Configuration.cs index 459bf45cb6..780efaf1c5 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/Configuration.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/Configuration.cs @@ -20,7 +20,7 @@ namespace ArdupilotMega.GCSViews.ConfigurationView this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigFlightModes(), "Flight Modes")); this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigHardwareOptions(), "Hardware Options")); this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigBatteryMonitoring(), "Battery Monitor")); - this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigAccelerometerCalibration(), "Level Calibration")); + this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigAccelerometerCalibrationQuad(), "Level Calibration")); this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigArducopter(), "Arducopter Setup")); this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigArduplane(), "Arduplane Setup")); this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigTradHeli(), "Heli Setup")); diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/Setup.cs b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/Setup.cs index 0c9caa3b95..71cbc02c9f 100644 --- a/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/Setup.cs +++ b/Tools/ArdupilotMegaPlanner/GCSViews/ConfigurationView/Setup.cs @@ -20,7 +20,8 @@ namespace ArdupilotMega.GCSViews.ConfigurationView this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigFlightModes(), "Flight Modes")); this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigHardwareOptions(), "Hardware Options")); this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigBatteryMonitoring(), "Battery Monitor")); - this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigAccelerometerCalibration(), "Level Calibration")); + this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigAccelerometerCalibrationQuad(), "Level Calibration Quad")); + this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigAccelerometerCalibrationPlane(), "Level Calibration Plane")); this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ConfigTradHeli(), "Heli Setup")); this.backstageView.AddPage(new BackstageView.BackstageViewPage(new ArdupilotMega._3DRradio(), "3DR Radio")); diff --git a/Tools/ArdupilotMegaPlanner/MAVLinkTypes.cs b/Tools/ArdupilotMegaPlanner/MAVLinkTypes.cs index ae36010847..eb64c40fa6 100644 --- a/Tools/ArdupilotMegaPlanner/MAVLinkTypes.cs +++ b/Tools/ArdupilotMegaPlanner/MAVLinkTypes.cs @@ -56,25 +56,25 @@ namespace ArdupilotMega public enum MAV_CMD { /// Navigate to MISSION. |Hold time in decimal seconds. (ignored by fixed wing, time to stay at MISSION for rotary wing)| Acceptance radius in meters (if the sphere with this radius is hit, the MISSION counts as reached)| 0 to pass through the WP, if > 0 radius in meters to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at MISSION (rotary wing)| Latitude| Longitude| Altitude| - NAV_WAYPOINT=16, + WAYPOINT=16, /// Loiter around this MISSION an unlimited amount of time |Empty| Empty| Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| - NAV_LOITER_UNLIM=17, + LOITER_UNLIM=17, /// Loiter around this MISSION for X turns |Turns| Empty| Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| - NAV_LOITER_TURNS=18, + LOITER_TURNS=18, /// Loiter around this MISSION for X seconds |Seconds (decimal)| Empty| Radius around MISSION, in meters. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| - NAV_LOITER_TIME=19, + LOITER_TIME=19, /// Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| - NAV_RETURN_TO_LAUNCH=20, + RETURN_TO_LAUNCH=20, /// Land at location |Empty| Empty| Empty| Desired yaw angle.| Latitude| Longitude| Altitude| - NAV_LAND=21, + LAND=21, /// Takeoff from ground / hand |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer| Latitude| Longitude| Altitude| - NAV_TAKEOFF=22, + TAKEOFF=22, /// Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicles control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of intereset mode. (see MAV_ROI enum)| MISSION index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| - NAV_ROI=80, + ROI=80, /// Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal, in compass degrees, [0..360]| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| - NAV_PATHPLANNING=81, + PATHPLANNING=81, /// NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| - NAV_LAST=95, + LAST=95, /// Delay mission state machine. |Delay in seconds (decimal)| Empty| Empty| Empty| Empty| Empty| Empty| CONDITION_DELAY=112, /// Ascend/descend at rate. Delay mission state machine until desired altitude reached. |Descent / Ascend rate (m/s)| Empty| Empty| Empty| Empty| Empty| Finish Altitude| @@ -916,7 +916,7 @@ namespace ArdupilotMega /// receive errors public UInt16 rxerrors; /// count of error corrected packets - public UInt16 fixed; + public UInt16 fixedp; /// local signal strength public byte rssi; /// remote signal strength @@ -1110,7 +1110,7 @@ namespace ArdupilotMega public UInt16 param_index; /// Onboard parameter id [MarshalAs(UnmanagedType.ByValArray,SizeConst=16)] - public string param_id; + public byte[] param_id; /// Onboard parameter type: see MAV_VAR enum public byte param_type; @@ -1129,7 +1129,7 @@ namespace ArdupilotMega public byte target_component; /// Onboard parameter id [MarshalAs(UnmanagedType.ByValArray,SizeConst=16)] - public string param_id; + public byte[] param_id; /// Onboard parameter type: see MAV_VAR enum public byte param_type; diff --git a/Tools/ArdupilotMegaPlanner/MainV2.cs b/Tools/ArdupilotMegaPlanner/MainV2.cs index 79e7d411e3..3f3e862b62 100644 --- a/Tools/ArdupilotMegaPlanner/MainV2.cs +++ b/Tools/ArdupilotMegaPlanner/MainV2.cs @@ -478,28 +478,29 @@ namespace ArdupilotMega { comPort.BaseStream = new TcpSerial(); } - else - if (CMB_serialport.Text == "UDP") - { - comPort.BaseStream = new UdpSerial(); - } - else - { - comPort.BaseStream = new SerialPort(); - } - try + else if (CMB_serialport.Text == "UDP") { - comPort.BaseStream.BaudRate = int.Parse(CMB_baudrate.Text); + comPort.BaseStream = new UdpSerial(); + } + else + { + comPort.BaseStream = new SerialPort(); } - catch { } - comPort.BaseStream.DataBits = 8; - comPort.BaseStream.StopBits = (StopBits)Enum.Parse(typeof(StopBits), "1"); - comPort.BaseStream.Parity = (Parity)Enum.Parse(typeof(Parity), "None"); try { + // set port, then options comPort.BaseStream.PortName = CMB_serialport.Text; + comPort.BaseStream.DataBits = 8; + comPort.BaseStream.StopBits = (StopBits)Enum.Parse(typeof(StopBits), "1"); + comPort.BaseStream.Parity = (Parity)Enum.Parse(typeof(Parity), "None"); + try + { + comPort.BaseStream.BaudRate = int.Parse(CMB_baudrate.Text); + } + catch { } + // false here comPort.BaseStream.DtrEnable = false; comPort.BaseStream.RtsEnable = false; diff --git a/Tools/ArdupilotMegaPlanner/Msi/wix.pdb b/Tools/ArdupilotMegaPlanner/Msi/wix.pdb index 997b2adcda..a411636227 100644 Binary files a/Tools/ArdupilotMegaPlanner/Msi/wix.pdb and b/Tools/ArdupilotMegaPlanner/Msi/wix.pdb differ diff --git a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs index 3109be3ffb..e04253db93 100644 --- a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs +++ b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ using System.Resources; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.1.*")] -[assembly: AssemblyFileVersion("1.1.70")] +[assembly: AssemblyFileVersion("1.1.71")] [assembly: NeutralResourcesLanguageAttribute("")] diff --git a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb index 9d8a0cd5e1..6b7ad7d637 100644 Binary files a/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb and b/Tools/ArdupilotMegaPlanner/bin/Release/ArdupilotMegaPlanner.pdb differ diff --git a/Tools/ArdupilotMegaPlanner/bin/Release/version.txt b/Tools/ArdupilotMegaPlanner/bin/Release/version.txt index 7fb755b96f..0212221d02 100644 --- a/Tools/ArdupilotMegaPlanner/bin/Release/version.txt +++ b/Tools/ArdupilotMegaPlanner/bin/Release/version.txt @@ -1 +1 @@ -1.1.4492.34709 \ No newline at end of file +1.1.4493.14496 \ No newline at end of file diff --git a/Tools/ArdupilotMegaPlanner/georefimage.cs b/Tools/ArdupilotMegaPlanner/georefimage.cs index 85248f6a7e..17c166f02e 100644 --- a/Tools/ArdupilotMegaPlanner/georefimage.cs +++ b/Tools/ArdupilotMegaPlanner/georefimage.cs @@ -11,6 +11,7 @@ using SharpKml.Base; using SharpKml.Dom; using System.Drawing; using System.Drawing.Imaging; +using System.Text; namespace ArdupilotMega { @@ -29,7 +30,16 @@ namespace ArdupilotMega private TextBox TXT_outputlog; private MyButton BUT_estoffset; - int latpos = 4, lngpos = 5, altpos = 7; + int latpos = 4, lngpos = 5, altpos = 7, cogpos = 9; + private NumericUpDown numericUpDown1; + private NumericUpDown numericUpDown2; + private NumericUpDown numericUpDown3; + private NumericUpDown numericUpDown4; + private Label label2; + private Label label3; + private Label label4; + private Label label5; + private Label label6; private MyButton BUT_Geotagimages; internal Georefimage() { @@ -136,7 +146,7 @@ namespace ArdupilotMega string[] vals = new string[] { "GPS", (cs.datetime - new DateTime(cs.datetime.Year,cs.datetime.Month,cs.datetime.Day,0,0,0,DateTimeKind.Local)).TotalMilliseconds.ToString(), "1", - cs.satcount.ToString(),cs.lat.ToString(),cs.lng.ToString(),"0.0",cs.alt.ToString(),cs.alt.ToString(),"0.0",cs.groundcourse.ToString()}; + cs.satcount.ToString(),cs.lat.ToString(),cs.lng.ToString(),"0.0",cs.alt.ToString(),cs.alt.ToString(),cs.groundspeed.ToString(),cs.groundcourse.ToString()}; if (oldvalues.Length > 2 && oldvalues[latpos] == vals[latpos] && oldvalues[lngpos] == vals[lngpos] @@ -316,7 +326,7 @@ namespace ArdupilotMega } ); - photocoords[filename] = new double[] { double.Parse(arr[latpos]), double.Parse(arr[lngpos]), double.Parse(arr[altpos]) }; + photocoords[filename] = new double[] { double.Parse(arr[latpos]), double.Parse(arr[lngpos]), double.Parse(arr[altpos]), double.Parse(arr[cogpos]) }; imagetotime[filename] = (long)(logdt.AddSeconds(-offsetseconds) - DateTime.MinValue).TotalSeconds; @@ -341,6 +351,8 @@ namespace ArdupilotMega MainV2.instance.georefkml = serializer.Xml; + writeGPX(dirWithImages + Path.DirectorySeparatorChar + "location.gpx"); + sw4.Close(); sw2.Close(); @@ -349,6 +361,55 @@ namespace ArdupilotMega TXT_outputlog.AppendText("Done " + matchs + " matchs"); } + private void writeGPX(string filename) + { + + using (System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(Path.GetDirectoryName(filename) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(filename) + ".gpx", Encoding.ASCII)) + { + + xw.WriteStartElement("gpx"); + + xw.WriteStartElement("trk"); + + xw.WriteStartElement("trkseg"); + + List items = new List(); + + foreach (string photo in photocoords.Keys) + { + items.Add(photo); + } + + items.Sort(); + + foreach (string photo in items) + { + + + xw.WriteStartElement("trkpt"); + xw.WriteAttributeString("lat", ((double[])photocoords[photo])[0].ToString(new System.Globalization.CultureInfo("en-US"))); + xw.WriteAttributeString("lon", ((double[])photocoords[photo])[1].ToString(new System.Globalization.CultureInfo("en-US"))); + + // must stay as above + + xw.WriteElementString("time", ((DateTime)filedatecache[photo]).ToString("yyyy-MM-ddTHH:mm:ssZ")); + + xw.WriteElementString("ele", ((double[])photocoords[photo])[2].ToString(new System.Globalization.CultureInfo("en-US"))); + xw.WriteElementString("course", ((double[])photocoords[photo])[3].ToString(new System.Globalization.CultureInfo("en-US"))); + + xw.WriteElementString("compass", ((double[])photocoords[photo])[3].ToString(new System.Globalization.CultureInfo("en-US"))); + + xw.WriteEndElement(); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndElement(); + + xw.Close(); + } + } + private void InitializeComponent() { this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); @@ -363,6 +424,19 @@ namespace ArdupilotMega this.BUT_doit = new ArdupilotMega.MyButton(); this.BUT_browsedir = new ArdupilotMega.MyButton(); this.BUT_browselog = new ArdupilotMega.MyButton(); + this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); + this.numericUpDown3 = new System.Windows.Forms.NumericUpDown(); + this.numericUpDown4 = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit(); this.SuspendLayout(); // // openFileDialog1 @@ -398,12 +472,12 @@ namespace ArdupilotMega this.TXT_outputlog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.TXT_outputlog.Location = new System.Drawing.Point(28, 144); + this.TXT_outputlog.Location = new System.Drawing.Point(28, 190); this.TXT_outputlog.Multiline = true; this.TXT_outputlog.Name = "TXT_outputlog"; this.TXT_outputlog.ReadOnly = true; this.TXT_outputlog.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.TXT_outputlog.Size = new System.Drawing.Size(398, 143); + this.TXT_outputlog.Size = new System.Drawing.Size(397, 160); this.TXT_outputlog.TabIndex = 6; // // label1 @@ -418,7 +492,7 @@ namespace ArdupilotMega // BUT_Geotagimages // this.BUT_Geotagimages.Enabled = false; - this.BUT_Geotagimages.Location = new System.Drawing.Point(366, 105); + this.BUT_Geotagimages.Location = new System.Drawing.Point(223, 161); this.BUT_Geotagimages.Name = "BUT_Geotagimages"; this.BUT_Geotagimages.Size = new System.Drawing.Size(75, 23); this.BUT_Geotagimages.TabIndex = 9; @@ -438,7 +512,7 @@ namespace ArdupilotMega // // BUT_doit // - this.BUT_doit.Location = new System.Drawing.Point(285, 105); + this.BUT_doit.Location = new System.Drawing.Point(142, 161); this.BUT_doit.Name = "BUT_doit"; this.BUT_doit.Size = new System.Drawing.Size(75, 23); this.BUT_doit.TabIndex = 5; @@ -466,9 +540,111 @@ namespace ArdupilotMega this.BUT_browselog.UseVisualStyleBackColor = true; this.BUT_browselog.Click += new System.EventHandler(this.BUT_browselog_Click); // + // numericUpDown1 + // + this.numericUpDown1.Location = new System.Drawing.Point(130, 116); + this.numericUpDown1.Name = "numericUpDown1"; + this.numericUpDown1.Size = new System.Drawing.Size(42, 20); + this.numericUpDown1.TabIndex = 10; + this.numericUpDown1.Value = new decimal(new int[] { + 4, + 0, + 0, + 0}); + // + // numericUpDown2 + // + this.numericUpDown2.Location = new System.Drawing.Point(178, 116); + this.numericUpDown2.Name = "numericUpDown2"; + this.numericUpDown2.Size = new System.Drawing.Size(42, 20); + this.numericUpDown2.TabIndex = 11; + this.numericUpDown2.Value = new decimal(new int[] { + 5, + 0, + 0, + 0}); + // + // numericUpDown3 + // + this.numericUpDown3.Location = new System.Drawing.Point(226, 116); + this.numericUpDown3.Name = "numericUpDown3"; + this.numericUpDown3.Size = new System.Drawing.Size(42, 20); + this.numericUpDown3.TabIndex = 12; + this.numericUpDown3.Value = new decimal(new int[] { + 7, + 0, + 0, + 0}); + // + // numericUpDown4 + // + this.numericUpDown4.Location = new System.Drawing.Point(274, 116); + this.numericUpDown4.Name = "numericUpDown4"; + this.numericUpDown4.Size = new System.Drawing.Size(42, 20); + this.numericUpDown4.TabIndex = 13; + this.numericUpDown4.Value = new decimal(new int[] { + 9, + 0, + 0, + 0}); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(127, 100); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(22, 13); + this.label2.TabIndex = 14; + this.label2.Text = "Lat"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(175, 100); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(25, 13); + this.label3.TabIndex = 15; + this.label3.Text = "Lon"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(223, 100); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(19, 13); + this.label4.TabIndex = 16; + this.label4.Text = "Alt"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(271, 100); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(47, 13); + this.label5.TabIndex = 17; + this.label5.Text = "Heading"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(63, 118); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(61, 13); + this.label6.TabIndex = 18; + this.label6.Text = "Log Offsets"; + // // Georefimage // - this.ClientSize = new System.Drawing.Size(453, 299); + this.ClientSize = new System.Drawing.Size(452, 362); + this.Controls.Add(this.label6); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.numericUpDown4); + this.Controls.Add(this.numericUpDown3); + this.Controls.Add(this.numericUpDown2); + this.Controls.Add(this.numericUpDown1); this.Controls.Add(this.BUT_Geotagimages); this.Controls.Add(this.BUT_estoffset); this.Controls.Add(this.label1); @@ -480,6 +656,11 @@ namespace ArdupilotMega this.Controls.Add(this.BUT_browsedir); this.Controls.Add(this.BUT_browselog); this.Name = "Georefimage"; + this.Text = "Geo Ref Images"; + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit(); this.ResumeLayout(false); this.PerformLayout();