diff --git a/Tools/ArdupilotMegaPlanner/ArduinoDetect.cs b/Tools/ArdupilotMegaPlanner/ArduinoDetect.cs
index c4c7ea8e0c..01a77d1430 100644
--- a/Tools/ArdupilotMegaPlanner/ArduinoDetect.cs
+++ b/Tools/ArdupilotMegaPlanner/ArduinoDetect.cs
@@ -82,7 +82,7 @@ namespace ArdupilotMega
ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
foreach (ManagementObject obj2 in searcher.Get())
{
- Console.WriteLine("Dependant : " + obj2["Dependent"]);
+ //Console.WriteLine("Dependant : " + obj2["Dependent"]);
if (obj2["Dependent"].ToString().Contains(@"USB\\VID_2341&PID_0010"))
{
diff --git a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj
index 0c24ba0236..f394484c2c 100644
--- a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj
+++ b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj
@@ -145,6 +145,9 @@
..\..\..\..\..\Desktop\DIYDrones\kml-library\KmlTestbed\bin\Release\KMLib.dll
+
+ ..\..\..\..\..\Desktop\DIYDrones\myquad\MetaDataExtractorCSharp240d\bin\Release\MetaDataExtractor.dll
+
False
..\..\..\..\..\..\..\Windows\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.dll
diff --git a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj.user b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj.user
index 225c748121..a4d8cafb2b 100644
--- a/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj.user
+++ b/Tools/ArdupilotMegaPlanner/ArdupilotMega.csproj.user
@@ -11,6 +11,6 @@
- C:\Users\hog\Desktop\DIYDrones\myquad\greatmaps_e1bb830a18a3\Demo.WindowsForms\bin\Debug\;C:\Users\hog\Desktop\DIYDrones\myquad\sharpkml\SharpKml\bin\Release\
+ C:\Users\hog\Desktop\DIYDrones\myquad\greatmaps_e1bb830a18a3\Demo.WindowsForms\bin\Debug\;C:\Users\hog\Desktop\DIYDrones\myquad\sharpkml\SharpKml\bin\Release\;C:\Users\hog\Desktop\DIYDrones\myquad\MetaDataExtractorCSharp240d\bin\Release\
\ No newline at end of file
diff --git a/Tools/ArdupilotMegaPlanner/CurrentState.cs b/Tools/ArdupilotMegaPlanner/CurrentState.cs
index c0f99f4cab..6cce04eea3 100644
--- a/Tools/ArdupilotMegaPlanner/CurrentState.cs
+++ b/Tools/ArdupilotMegaPlanner/CurrentState.cs
@@ -129,7 +129,7 @@ namespace ArdupilotMega
//battery
public float battery_voltage { get { return _battery_voltage; } set { _battery_voltage = value / 1000; } }
private float _battery_voltage;
- public float battery_remaining { get { return _battery_remaining; } set { _battery_remaining = value / 1000; } }
+ public float battery_remaining { get { return _battery_remaining; } set { _battery_remaining = value / 1000; if (_battery_remaining < 0) _battery_remaining = 0; } }
private float _battery_remaining;
// HIL
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/Firmware.resx b/Tools/ArdupilotMegaPlanner/GCSViews/Firmware.resx
index ff5d72d8b1..ce57897e56 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/Firmware.resx
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/Firmware.resx
@@ -123,7 +123,7 @@
- 45, -9
+ 7, -9
190, 190
@@ -151,7 +151,7 @@
NoControl
- 45, 184
+ 7, 184
190, 190
@@ -340,7 +340,7 @@
NoControl
- 42, 168
+ 4, 168
190, 13
@@ -400,7 +400,7 @@
NoControl
- 42, 361
+ 4, 361
190, 13
@@ -679,7 +679,7 @@
BUT_setup
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
$this
@@ -700,6 +700,6 @@
Firmware
- System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ff91852278f5092c
+ System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
\ No newline at end of file
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.Designer.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.Designer.cs
index 04ed05a3fd..a5650efb77 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.Designer.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.Designer.cs
@@ -8,8 +8,8 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlightData));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.goHereToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pointCameraHereToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -1213,8 +1213,8 @@
//
// dataGridViewImageColumn1
//
- dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
- this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle1;
resources.ApplyResources(this.dataGridViewImageColumn1, "dataGridViewImageColumn1");
this.dataGridViewImageColumn1.Image = global::ArdupilotMega.Properties.Resources.up;
this.dataGridViewImageColumn1.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch;
@@ -1222,8 +1222,8 @@
//
// dataGridViewImageColumn2
//
- dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
- this.dataGridViewImageColumn2.DefaultCellStyle = dataGridViewCellStyle4;
+ dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ this.dataGridViewImageColumn2.DefaultCellStyle = dataGridViewCellStyle2;
resources.ApplyResources(this.dataGridViewImageColumn2, "dataGridViewImageColumn2");
this.dataGridViewImageColumn2.Image = global::ArdupilotMega.Properties.Resources.down;
this.dataGridViewImageColumn2.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch;
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs
index 07849c6661..e461f5559a 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.cs
@@ -1078,6 +1078,11 @@ namespace ArdupilotMega.GCSViews
private void BUT_log2kml_Click(object sender, EventArgs e)
{
+ if (DialogResult.Cancel == Common.MessageShowAgain("Tlog to KML Firmware Version", "When converting logs, ensure your Firmware version is set correctly.\n(Near your com port selection.)"))
+ {
+ return;
+ }
+
Form frm = new MavlinkLog();
MainV2.fixtheme(frm);
frm.ShowDialog();
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.resx b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.resx
index e4cf5f65e3..6eb95e738d 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.resx
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightData.resx
@@ -121,15 +121,6 @@
290, 17
-
- 175, 48
-
-
- contextMenuStrip1
-
-
- System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
174, 22
@@ -142,6 +133,15 @@
Point Camera Here
+
+ 175, 48
+
+
+ contextMenuStrip1
+
+
+ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
Fill
@@ -167,6 +167,18 @@
542, 17
+
+ 172, 22
+
+
+ Record Hud to AVI
+
+
+ 172, 22
+
+
+ Stop Record
+
173, 48
@@ -216,6 +228,444 @@
0
+
+ NoControl
+
+
+ 17, 93
+
+
+ 66, 23
+
+
+ 78
+
+
+ Script
+
+
+ BUT_script
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 0
+
+
+ NoControl
+
+
+ 101, 93
+
+
+ 66, 23
+
+
+ 77
+
+
+ Joystick
+
+
+ 445, 17
+
+
+ Setup and enable your joystick
+
+
+ BUT_joystick
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 1
+
+
+ NoControl
+
+
+ 173, 35
+
+
+ 57, 23
+
+
+ 76
+
+
+ &Manual
+
+
+ Change Mode to Manual/Stabalize
+
+
+ BUT_quickmanual
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 2
+
+
+ NoControl
+
+
+ 173, 64
+
+
+ 57, 23
+
+
+ 75
+
+
+ &RTL
+
+
+ Change Mode to RTL
+
+
+ BUT_quickrtl
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 3
+
+
+ NoControl
+
+
+ 173, 6
+
+
+ 57, 23
+
+
+ 74
+
+
+ &Auto
+
+
+ Change mode to Auto
+
+
+ BUT_quickauto
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 4
+
+
+ 0 (Home)
+
+
+ 4, 35
+
+
+ 91, 21
+
+
+ 72
+
+
+ CMB_setwp
+
+
+ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tabActions
+
+
+ 5
+
+
+ NoControl
+
+
+ 101, 35
+
+
+ 66, 23
+
+
+ 73
+
+
+ Set WP
+
+
+ Changes the current target waypoint
+
+
+ BUT_setwp
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 6
+
+
+ 4, 64
+
+
+ 91, 21
+
+
+ 70
+
+
+ CMB_modes
+
+
+ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tabActions
+
+
+ 7
+
+
+ NoControl
+
+
+ 101, 64
+
+
+ 66, 23
+
+
+ 71
+
+
+ Set Mode
+
+
+ Changes to the Mode on the left
+
+
+ BUT_setmode
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 8
+
+
+ NoControl
+
+
+ 236, 93
+
+
+ 97, 23
+
+
+ 52
+
+
+ Clear Track
+
+
+ Clear the recorded path on the map
+
+
+ BUT_clear_track
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 9
+
+
+ 4, 6
+
+
+ 91, 21
+
+
+ 59
+
+
+ CMB_action
+
+
+ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tabActions
+
+
+ 10
+
+
+ NoControl
+
+
+ 236, 6
+
+
+ 97, 23
+
+
+ 69
+
+
+ Set Home Alt
+
+
+ Set the current display alt as 0, ie home alt is shown as 0
+
+
+ BUT_Homealt
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 11
+
+
+ NoControl
+
+
+ 236, 64
+
+
+ 97, 23
+
+
+ 68
+
+
+ Raw Sensor View
+
+
+ View raw Gyro and Accel values, and Raw Radio ins/outs
+
+
+ BUT_RAWSensor
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 12
+
+
+ NoControl
+
+
+ 236, 35
+
+
+ 97, 23
+
+
+ 63
+
+
+ Restart Mission
+
+
+ Restarts the mission from the beginning
+
+
+ BUTrestartmission
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 13
+
+
+ NoControl
+
+
+ 101, 6
+
+
+ 66, 23
+
+
+ 60
+
+
+ Do Action
+
+
+ Preform the action ot the left
+
+
+ BUTactiondo
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabActions
+
+
+ 14
+
+
+ 4, 22
+
+
+ 407, 116
+
+
+ 2
+
+
+ Actions
+
tabActions
@@ -228,6 +678,144 @@
0
+
+ Zoom
+
+
+ Microsoft Sans Serif, 9pt
+
+
+ 3, 6
+
+
+ 0, 0, 0, 0
+
+
+ 100, 100
+
+
+ 82
+
+
+ Gvspeed
+
+
+ AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabGauges
+
+
+ 0
+
+
+ Zoom
+
+
+ Microsoft Sans Serif, 9pt
+
+
+ 303, 6
+
+
+ 0, 0, 0, 0
+
+
+ 100, 100
+
+
+ 80
+
+
+ Gheading
+
+
+ AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabGauges
+
+
+ 1
+
+
+ Zoom
+
+
+ Microsoft Sans Serif, 9pt
+
+
+ 203, 6
+
+
+ 0, 0, 0, 0
+
+
+ 100, 100
+
+
+ 81
+
+
+ Galt
+
+
+ AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabGauges
+
+
+ 2
+
+
+ Zoom
+
+
+ Microsoft Sans Serif, 9pt
+
+
+ 103, 6
+
+
+ 0, 0, 0, 0
+
+
+ 100, 100
+
+
+ 79
+
+
+ Double click me to change Max
+
+
+ Gspeed
+
+
+ AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabGauges
+
+
+ 3
+
+
+ 4, 22
+
+
+ 3, 3, 3, 3
+
+
+ 407, 116
+
+
+ 0
+
+
+ Gauges
+
tabGauges
@@ -240,6 +828,24 @@
1
+
+ True
+
+
+ 4, 22
+
+
+ 3, 3, 3, 3
+
+
+ 407, 116
+
+
+ 1
+
+
+ Status
+
tabStatus
@@ -252,6 +858,171 @@
2
+
+ 298, 35
+
+
+ 51, 20
+
+
+ 78
+
+
+ 0.00 %
+
+
+ lbl_logpercent
+
+
+ ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabTLogs
+
+
+ 0
+
+
+ 178, 35
+
+
+ 54, 20
+
+
+ 77
+
+
+ Playback Speed
+
+
+ NUM_playbackspeed
+
+
+ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tabTLogs
+
+
+ 1
+
+
+ NoControl
+
+
+ 51, 32
+
+
+ 80, 23
+
+
+ 76
+
+
+ Log > KML
+
+
+ BUT_log2kml
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabTLogs
+
+
+ 2
+
+
+ NoControl
+
+
+ 178, 3
+
+
+ 171, 45
+
+
+ 75
+
+
+ tracklog
+
+
+ System.Windows.Forms.TrackBar, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tabTLogs
+
+
+ 3
+
+
+ NoControl
+
+
+ 89, 3
+
+
+ 80, 23
+
+
+ 73
+
+
+ Play/Pause
+
+
+ BUT_playlog
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabTLogs
+
+
+ 4
+
+
+ NoControl
+
+
+ 3, 3
+
+
+ 80, 23
+
+
+ 71
+
+
+ Load Log
+
+
+ BUT_loadtelem
+
+
+ ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
+
+
+ tabTLogs
+
+
+ 5
+
+
+ 4, 22
+
+
+ 407, 116
+
+
+ 3
+
+
+ Telemetry Logs
+
tabTLogs
@@ -661,1299 +1432,6 @@
0
-
- TXT_lat
-
-
- ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- panel1
-
-
- 0
-
-
- Zoomlevel
-
-
- System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- panel1
-
-
- 1
-
-
- label1
-
-
- ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- panel1
-
-
- 2
-
-
- TXT_long
-
-
- ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- panel1
-
-
- 3
-
-
- TXT_alt
-
-
- ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- panel1
-
-
- 4
-
-
- CHK_autopan
-
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- panel1
-
-
- 5
-
-
- CB_tuning
-
-
- System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- panel1
-
-
- 6
-
-
- Fill
-
-
- 1, 428
-
-
- 0, 0, 0, 0
-
-
- 583, 30
-
-
- 0
-
-
- panel1
-
-
- System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tableMap
-
-
- 1
-
-
- Fill
-
-
- 0, 0
-
-
- 2
-
-
- 585, 459
-
-
- 75
-
-
- tableMap
-
-
- System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- MainH.Panel2
-
-
- 0
-
-
- <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="splitContainer1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panel1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="Percent,100,Absolute,30,Absolute,20" /></TableLayoutSettings>
-
-
- MainH.Panel2
-
-
- System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- MainH
-
-
- 1
-
-
- 1008, 461
-
-
- 417
-
-
- 68
-
-
- MainH
-
-
- System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 2
-
-
- 172, 22
-
-
- Record Hud to AVI
-
-
- 172, 22
-
-
- Stop Record
-
-
- BUT_script
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 0
-
-
- BUT_joystick
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 1
-
-
- BUT_quickmanual
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 2
-
-
- BUT_quickrtl
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 3
-
-
- BUT_quickauto
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 4
-
-
- CMB_setwp
-
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabActions
-
-
- 5
-
-
- BUT_setwp
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 6
-
-
- CMB_modes
-
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabActions
-
-
- 7
-
-
- BUT_setmode
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 8
-
-
- BUT_clear_track
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 9
-
-
- CMB_action
-
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabActions
-
-
- 10
-
-
- BUT_Homealt
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 11
-
-
- BUT_RAWSensor
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 12
-
-
- BUTrestartmission
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 13
-
-
- BUTactiondo
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 14
-
-
- 4, 22
-
-
- 407, 116
-
-
- 2
-
-
- Actions
-
-
- tabActions
-
-
- System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabControl1
-
-
- 0
-
-
- NoControl
-
-
- 17, 93
-
-
- 66, 23
-
-
- 78
-
-
- Script
-
-
- BUT_script
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 0
-
-
- 445, 17
-
-
- NoControl
-
-
- 101, 93
-
-
- 66, 23
-
-
- 77
-
-
- Joystick
-
-
- Setup and enable your joystick
-
-
- BUT_joystick
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 1
-
-
- NoControl
-
-
- 173, 35
-
-
- 57, 23
-
-
- 76
-
-
- &Manual
-
-
- Change Mode to Manual/Stabalize
-
-
- BUT_quickmanual
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 2
-
-
- NoControl
-
-
- 173, 64
-
-
- 57, 23
-
-
- 75
-
-
- &RTL
-
-
- Change Mode to RTL
-
-
- BUT_quickrtl
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 3
-
-
- NoControl
-
-
- 173, 6
-
-
- 57, 23
-
-
- 74
-
-
- &Auto
-
-
- Change mode to Auto
-
-
- BUT_quickauto
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 4
-
-
- 0 (Home)
-
-
- 4, 35
-
-
- 91, 21
-
-
- 72
-
-
- CMB_setwp
-
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabActions
-
-
- 5
-
-
- NoControl
-
-
- 101, 35
-
-
- 66, 23
-
-
- 73
-
-
- Set WP
-
-
- Changes the current target waypoint
-
-
- BUT_setwp
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 6
-
-
- 4, 64
-
-
- 91, 21
-
-
- 70
-
-
- CMB_modes
-
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabActions
-
-
- 7
-
-
- NoControl
-
-
- 101, 64
-
-
- 66, 23
-
-
- 71
-
-
- Set Mode
-
-
- Changes to the Mode on the left
-
-
- BUT_setmode
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 8
-
-
- NoControl
-
-
- 236, 93
-
-
- 97, 23
-
-
- 52
-
-
- Clear Track
-
-
- Clear the recorded path on the map
-
-
- BUT_clear_track
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 9
-
-
- 4, 6
-
-
- 91, 21
-
-
- 59
-
-
- CMB_action
-
-
- System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabActions
-
-
- 10
-
-
- NoControl
-
-
- 236, 6
-
-
- 97, 23
-
-
- 69
-
-
- Set Home Alt
-
-
- Set the current display alt as 0, ie home alt is shown as 0
-
-
- BUT_Homealt
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 11
-
-
- NoControl
-
-
- 236, 64
-
-
- 97, 23
-
-
- 68
-
-
- Raw Sensor View
-
-
- View raw Gyro and Accel values, and Raw Radio ins/outs
-
-
- BUT_RAWSensor
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 12
-
-
- NoControl
-
-
- 236, 35
-
-
- 97, 23
-
-
- 63
-
-
- Restart Mission
-
-
- Restarts the mission from the beginning
-
-
- BUTrestartmission
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 13
-
-
- NoControl
-
-
- 101, 6
-
-
- 66, 23
-
-
- 60
-
-
- Do Action
-
-
- Preform the action ot the left
-
-
- BUTactiondo
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabActions
-
-
- 14
-
-
- Gvspeed
-
-
- AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabGauges
-
-
- 0
-
-
- Gheading
-
-
- AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabGauges
-
-
- 1
-
-
- Galt
-
-
- AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabGauges
-
-
- 2
-
-
- Gspeed
-
-
- AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabGauges
-
-
- 3
-
-
- 4, 22
-
-
- 3, 3, 3, 3
-
-
- 407, 116
-
-
- 0
-
-
- Gauges
-
-
- tabGauges
-
-
- System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabControl1
-
-
- 1
-
-
- Zoom
-
-
- Microsoft Sans Serif, 9pt
-
-
- 3, 6
-
-
- 0, 0, 0, 0
-
-
- 100, 100
-
-
- 82
-
-
- Gvspeed
-
-
- AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabGauges
-
-
- 0
-
-
- Zoom
-
-
- Microsoft Sans Serif, 9pt
-
-
- 303, 6
-
-
- 0, 0, 0, 0
-
-
- 100, 100
-
-
- 80
-
-
- Gheading
-
-
- AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabGauges
-
-
- 1
-
-
- Zoom
-
-
- Microsoft Sans Serif, 9pt
-
-
- 203, 6
-
-
- 0, 0, 0, 0
-
-
- 100, 100
-
-
- 81
-
-
- Galt
-
-
- AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabGauges
-
-
- 2
-
-
- Zoom
-
-
- Microsoft Sans Serif, 9pt
-
-
- 103, 6
-
-
- 0, 0, 0, 0
-
-
- 100, 100
-
-
- 79
-
-
- Double click me to change Max
-
-
- Gspeed
-
-
- AGaugeApp.AGauge, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabGauges
-
-
- 3
-
-
- True
-
-
- 4, 22
-
-
- 3, 3, 3, 3
-
-
- 407, 116
-
-
- 1
-
-
- Status
-
-
- tabStatus
-
-
- System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabControl1
-
-
- 2
-
-
- lbl_logpercent
-
-
- ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabTLogs
-
-
- 0
-
-
- NUM_playbackspeed
-
-
- System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabTLogs
-
-
- 1
-
-
- BUT_log2kml
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabTLogs
-
-
- 2
-
-
- tracklog
-
-
- System.Windows.Forms.TrackBar, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabTLogs
-
-
- 3
-
-
- BUT_playlog
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabTLogs
-
-
- 4
-
-
- BUT_loadtelem
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabTLogs
-
-
- 5
-
-
- 4, 22
-
-
- 407, 116
-
-
- 3
-
-
- Telemetry Logs
-
-
- tabTLogs
-
-
- System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabControl1
-
-
- 3
-
-
- 298, 35
-
-
- 51, 20
-
-
- 78
-
-
- 0.00 %
-
-
- lbl_logpercent
-
-
- ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabTLogs
-
-
- 0
-
-
- 178, 35
-
-
- 54, 20
-
-
- 77
-
-
- Playback Speed
-
-
- NUM_playbackspeed
-
-
- System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabTLogs
-
-
- 1
-
-
- NoControl
-
-
- 51, 32
-
-
- 80, 23
-
-
- 76
-
-
- Log > KML
-
-
- BUT_log2kml
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabTLogs
-
-
- 2
-
-
- NoControl
-
-
- 178, 3
-
-
- 171, 45
-
-
- 75
-
-
- tracklog
-
-
- System.Windows.Forms.TrackBar, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tabTLogs
-
-
- 3
-
-
- NoControl
-
-
- 89, 3
-
-
- 80, 23
-
-
- 73
-
-
- Play/Pause
-
-
- BUT_playlog
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabTLogs
-
-
- 4
-
-
- NoControl
-
-
- 3, 3
-
-
- 80, 23
-
-
- 71
-
-
- Load Log
-
-
- BUT_loadtelem
-
-
- ArdupilotMega.MyButton, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc
-
-
- tabTLogs
-
-
- 5
-
Bottom, Left
@@ -2173,6 +1651,96 @@
6
+
+ Fill
+
+
+ 1, 428
+
+
+ 0, 0, 0, 0
+
+
+ 583, 30
+
+
+ 0
+
+
+ panel1
+
+
+ System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableMap
+
+
+ 1
+
+
+ Fill
+
+
+ 0, 0
+
+
+ 2
+
+
+ 585, 459
+
+
+ 75
+
+
+ tableMap
+
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ MainH.Panel2
+
+
+ 0
+
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="splitContainer1" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="panel1" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="Percent,100,Absolute,30,Absolute,20" /></TableLayoutSettings>
+
+
+ MainH.Panel2
+
+
+ System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ MainH
+
+
+ 1
+
+
+ 1008, 461
+
+
+ 417
+
+
+ 68
+
+
+ MainH
+
+
+ System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 2
+
Up
@@ -2188,9 +1756,6 @@
17, 17
-
- 445, 17
-
NoControl
diff --git a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs
index 3e16841cef..a58792385c 100644
--- a/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs
+++ b/Tools/ArdupilotMegaPlanner/GCSViews/FlightPlanner.cs
@@ -2609,7 +2609,7 @@ namespace ArdupilotMega.GCSViews
}
else
{
- MessageBox.Show("Please Connect/wait for lock, and click here to set your home to your current location");
+ MessageBox.Show("If you're at the field, connect to your APM and wait for GPS lock. Then click 'Home Location' link to set home to your location");
}
}
@@ -2865,7 +2865,7 @@ namespace ArdupilotMega.GCSViews
private void BUT_zoomto_Click(object sender, EventArgs e)
{
- string place = "Perth, Australia";
+ string place = "Perth Airport, Australia";
if (DialogResult.OK == Common.InputBox("Location", "Enter your location", ref place))
{
@@ -2932,6 +2932,9 @@ namespace ArdupilotMega.GCSViews
{
routes.Markers.Clear();
+ if (MainV2.cs.lat == 0 || MainV2.cs.lng == 0)
+ return;
+
PointLatLng currentloc = new PointLatLng(MainV2.cs.lat, MainV2.cs.lng);
if (MainV2.cs.firmware == MainV2.Firmwares.ArduPlane)
diff --git a/Tools/ArdupilotMegaPlanner/MAVLink.cs b/Tools/ArdupilotMegaPlanner/MAVLink.cs
index 2ddca32b5f..5482c776a3 100644
--- a/Tools/ArdupilotMegaPlanner/MAVLink.cs
+++ b/Tools/ArdupilotMegaPlanner/MAVLink.cs
@@ -2073,7 +2073,7 @@ namespace ArdupilotMega
if (bpstime.Second != DateTime.Now.Second && !logreadmode)
{
- Console.WriteLine("bps {0} loss {1} left {2} mem {3}", bps1, synclost, BaseStream.BytesToRead, System.GC.GetTotalMemory(false));
+ Console.Write("bps {0} loss {1} left {2} mem {3} \n", bps1, synclost, BaseStream.BytesToRead, System.GC.GetTotalMemory(false));
bps2 = bps1; // prev sec
bps1 = 0; // current sec
bpstime = DateTime.Now;
diff --git a/Tools/ArdupilotMegaPlanner/MavlinkLog.cs b/Tools/ArdupilotMegaPlanner/MavlinkLog.cs
index e9b3058020..cb60509b09 100644
--- a/Tools/ArdupilotMegaPlanner/MavlinkLog.cs
+++ b/Tools/ArdupilotMegaPlanner/MavlinkLog.cs
@@ -39,12 +39,22 @@ namespace ArdupilotMega
private void writeKML(string filename)
{
+ SharpKml.Dom.AltitudeMode altmode = SharpKml.Dom.AltitudeMode.Absolute;
+
+ if (MainV2.cs.firmware == MainV2.Firmwares.ArduPlane)
+ {
+ altmode = SharpKml.Dom.AltitudeMode.Absolute;
+ }
+ else if (MainV2.cs.firmware == MainV2.Firmwares.ArduCopter2)
+ {
+ altmode = SharpKml.Dom.AltitudeMode.RelativeToGround;
+ }
+
Color[] colours = { Color.Red, Color.Orange, Color.Yellow, Color.Green, Color.Blue, Color.Indigo, Color.Violet, Color.Pink };
Document kml = new Document();
- Tour tour = new Tour();
- tour.Name = "First Person View";
+ Tour tour = new Tour() { Name = "First Person View" };
Playlist tourplaylist = new Playlist();
AddNamespace(kml, "gx", "http://www.google.com/kml/ext/2.2");
@@ -64,10 +74,12 @@ namespace ArdupilotMega
Style stylet = new Style();
stylet.Id = "track";
SharpKml.Dom.IconStyle ico = new SharpKml.Dom.IconStyle();
+ LabelStyle lst = new LabelStyle();
+ lst.Scale = 0;
stylet.Icon = ico;
ico.Icon = new IconStyle.IconLink(new Uri("http://earth.google.com/images/kml-icons/track-directional/track-none.png"));
stylet.Icon.Scale = 0.5;
- //stylet.Label.Scale = 0;
+ stylet.Label = lst;
kml.AddStyle(stylet);
@@ -110,7 +122,7 @@ namespace ArdupilotMega
c++;
LineString ls = new LineString();
- ls.AltitudeMode = SharpKml.Dom.AltitudeMode.Absolute;
+ ls.AltitudeMode = altmode;
ls.Extrude = true;
ls.Coordinates = coords;
@@ -154,7 +166,7 @@ namespace ArdupilotMega
flyto.Mode = FlyToMode.Smooth;
SharpKml.Dom.Camera cam = new SharpKml.Dom.Camera();
- cam.AltitudeMode = SharpKml.Dom.AltitudeMode.Absolute;
+ cam.AltitudeMode = altmode;
cam.Latitude = cs.lat;
cam.Longitude = cs.lng;
cam.Altitude = cs.alt;
@@ -203,7 +215,7 @@ namespace ArdupilotMega
Model model = new Model();
model.Location = loc;
model.Orientation = ori;
- model.AltitudeMode = SharpKml.Dom.AltitudeMode.Absolute;
+ model.AltitudeMode = altmode;
model.Scale = sca;
try
@@ -236,7 +248,7 @@ namespace ArdupilotMega
Placemark pmt = new Placemark();
SharpKml.Dom.Point pnt = new SharpKml.Dom.Point();
- pnt.AltitudeMode = SharpKml.Dom.AltitudeMode.Absolute;
+ pnt.AltitudeMode = altmode;
pnt.Coordinate = new Vector(cs.lat,cs.lng,cs.alt);
pmt.Name = "" + a;
diff --git a/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs b/Tools/ArdupilotMegaPlanner/Properties/AssemblyInfo.cs
index d921a5af50..506a52024a 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.0.0.0")]
-[assembly: AssemblyFileVersion("1.1.4")]
+[assembly: AssemblyFileVersion("1.1.5")]
[assembly: NeutralResourcesLanguageAttribute("")]
diff --git a/Tools/ArdupilotMegaPlanner/georefimage.cs b/Tools/ArdupilotMegaPlanner/georefimage.cs
index fa4caec8c0..2b5060b7e3 100644
--- a/Tools/ArdupilotMegaPlanner/georefimage.cs
+++ b/Tools/ArdupilotMegaPlanner/georefimage.cs
@@ -6,6 +6,8 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Windows.Forms;
+using com.drew.imaging.jpg;
+using com.drew.metadata;
namespace ArdupilotMega
{
@@ -21,6 +23,7 @@ namespace ArdupilotMega
private FolderBrowserDialog folderBrowserDialog1;
private Label label1;
private TextBox TXT_outputlog;
+ private MyButton BUT_estoffset;
internal georefimage() {
InitializeComponent();
@@ -32,6 +35,38 @@ namespace ArdupilotMega
try
{
+
+ Metadata lcMetadata = null;
+ try
+ {
+ FileInfo lcImgFile = new FileInfo(fn);
+ // Loading all meta data
+ lcMetadata = JpegMetadataReader.ReadMetadata(lcImgFile);
+ }
+ catch (JpegProcessingException e)
+ {
+ Console.Error.WriteLine(e.Message);
+ return dtaken;
+ }
+
+ foreach (AbstractDirectory lcDirectory in lcMetadata)
+ {
+
+ if (lcDirectory.ContainsTag(0x9003))
+ {
+ dtaken = lcDirectory.GetDate(0x9003);
+ Console.WriteLine("does " + lcDirectory.GetTagName(0x9003) + " " + dtaken);
+ break;
+ }
+
+ }
+
+
+
+
+
+ ////// old method, works, just slow
+ /*
Image myImage = Image.FromFile(fn);
PropertyItem propItem = myImage.GetPropertyItem(36867); // 36867 // 306
@@ -44,6 +79,7 @@ namespace ArdupilotMega
dtaken = DateTime.Parse(sdate);
myImage.Dispose();
+ */
}
catch { }
@@ -81,7 +117,7 @@ namespace ArdupilotMega
return list;
}
- public void dowork(string logFile, string dirWithImages, float offsetseconds)
+ public void dowork(string logFile, string dirWithImages, float offsetseconds,bool dooffset)
{
DateTime localmin = DateTime.MaxValue;
DateTime localmax = DateTime.MinValue;
@@ -104,6 +140,7 @@ namespace ArdupilotMega
sw.WriteLine("#name utc longitude latitude height");
int first = 0;
+ int matchs = 0;
foreach (string file in files)
{
@@ -133,7 +170,7 @@ namespace ArdupilotMega
foreach (string[] arr in list)
{
- Application.DoEvents();
+ //Application.DoEvents();
DateTime crap = startTime.AddMilliseconds(int.Parse(arr[1])).AddSeconds(offsetseconds);
@@ -144,15 +181,20 @@ namespace ArdupilotMega
TXT_outputlog.AppendText("offset should be about " + (dt -crap).TotalSeconds + "\r\n");
+ if (dooffset)
+ return;
+
first++;
}
- Console.Write("ph " + dt + " log " + crap + " \r");
+ //Console.Write("ph " + dt + " log " + crap + " \r");
if (dt.Equals(crap))
{
TXT_outputlog.AppendText("MATCH Photo " + Path.GetFileNameWithoutExtension(file) + " " + dt + "\r\n");
+ matchs++;
+
sw2.WriteLine(Path.GetFileNameWithoutExtension(file) + " " + arr[5] + " " + arr[4] + " " + arr[7]);
sw.WriteLine(Path.GetFileNameWithoutExtension(file) + "\t" + crap.ToString("yyyy:MM:dd HH:mm:ss") +"\t"+ arr[5] + "\t" + arr[4] + "\t" + arr[7]);
sw.Flush();
@@ -170,7 +212,7 @@ namespace ArdupilotMega
sw2.Close();
sw.Close();
- MessageBox.Show("Done");
+ MessageBox.Show("Done " + matchs + " matchs");
}
@@ -186,6 +228,7 @@ namespace ArdupilotMega
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.TXT_outputlog = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
+ this.BUT_estoffset = new ArdupilotMega.MyButton();
this.SuspendLayout();
//
// openFileDialog1
@@ -268,9 +311,20 @@ namespace ArdupilotMega
this.label1.TabIndex = 7;
this.label1.Text = "Seconds offset";
//
+ // BUT_estoffset
+ //
+ this.BUT_estoffset.Location = new System.Drawing.Point(286, 67);
+ this.BUT_estoffset.Name = "BUT_estoffset";
+ this.BUT_estoffset.Size = new System.Drawing.Size(75, 23);
+ this.BUT_estoffset.TabIndex = 8;
+ this.BUT_estoffset.Text = "Estimate Offset";
+ this.BUT_estoffset.UseVisualStyleBackColor = true;
+ this.BUT_estoffset.Click += new System.EventHandler(this.BUT_estoffset_Click);
+ //
// georefimage
//
this.ClientSize = new System.Drawing.Size(453, 299);
+ this.Controls.Add(this.BUT_estoffset);
this.Controls.Add(this.label1);
this.Controls.Add(this.TXT_outputlog);
this.Controls.Add(this.BUT_doit);
@@ -319,10 +373,15 @@ namespace ArdupilotMega
BUT_doit.Enabled = false;
try
{
- dowork(TXT_logfile.Text, TXT_jpgdir.Text, seconds);
+ dowork(TXT_logfile.Text, TXT_jpgdir.Text, seconds, false);
}
catch { }
BUT_doit.Enabled = true;
}
+
+ private void BUT_estoffset_Click(object sender, EventArgs e)
+ {
+ dowork(TXT_logfile.Text, TXT_jpgdir.Text, 0, true);
+ }
}
}