mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
Mission Planner 1.2.9
add est distance traveled add est flight time AP_Mount now updated add expermental firmware options. fix hud avi record framerate add 2 direction wp circle tweak gridv2
This commit is contained in:
parent
ccc659e8a9
commit
bd180bcd3d
@ -126,6 +126,9 @@
|
||||
<Reference Include="alglibnet2, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="AStar">
|
||||
<HintPath>..\..\..\..\..\Desktop\DIYDrones\myquadgit\astar\AStar\bin\Release\AStar.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BSE.Windows.Forms">
|
||||
</Reference>
|
||||
<Reference Include="Core">
|
||||
@ -637,6 +640,7 @@
|
||||
<Compile Include="SerialOutput.Designer.cs">
|
||||
<DependentUpon>SerialOutput.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utilities\PathFind.cs" />
|
||||
<Compile Include="Utilities\Speech.cs" />
|
||||
<Compile Include="Splash.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
@ -1,4 +1,72 @@
|
||||
* Mission Planner 1.2
|
||||
* Mission Planner 1.2.8
|
||||
fix mjpeg stream from VLC.
|
||||
add grid mode V2
|
||||
fix hdop scaling
|
||||
|
||||
|
||||
* Mission Planner 1.2.7
|
||||
add wind from ap
|
||||
add wp every x m in grid mode
|
||||
fix hil problem
|
||||
fix control-s
|
||||
update mavlink format
|
||||
|
||||
* Mission Planner 1.2.6
|
||||
add tracker location option.
|
||||
fix current sensor screen
|
||||
add more right click flight planner options.
|
||||
make some connecting error messages more detailed.
|
||||
add partial microdrones protocol output
|
||||
|
||||
* Mission Planner 1.2.5
|
||||
add experimental antenna tracker find
|
||||
add new apparam eeprom reader
|
||||
add ground alt display to hud
|
||||
mod stats
|
||||
modify guided mode alt selection.
|
||||
test flight planner tab on flight data tab
|
||||
move some functions to the right click menu
|
||||
add xplanes data in/out setup to be automatic.
|
||||
add better mission upload handeling.
|
||||
|
||||
* Mission Planner 1.2.4
|
||||
remove geofence tab
|
||||
add guided alt remeber
|
||||
change wp upload retry to 200 ms
|
||||
|
||||
|
||||
* Mission Planner 1.2.3
|
||||
hud font move
|
||||
add progress bar lock
|
||||
add quickview mono fix
|
||||
fix centi-degree/degree units
|
||||
fix mnt config camera tab
|
||||
fix some meters/feet scaling issues
|
||||
|
||||
|
||||
* Mission Planner 1.2.2
|
||||
add DegreeTracker
|
||||
fix popout tab on config page
|
||||
add remember last config tab
|
||||
fix bytes send count
|
||||
fix deactivate bug
|
||||
fix ap_limits bug
|
||||
fix ap_mount bug
|
||||
|
||||
|
||||
* Mission Planner 1.2.1
|
||||
add enable/disable to mavlinkcheckbox
|
||||
modify my button to curved
|
||||
add delay to progress reporter dialog. to ensure correct parent
|
||||
Fix Mount screen for AP
|
||||
Fix Hardware screen Text
|
||||
display roi difrently
|
||||
modify HIL/Quad Hil
|
||||
update dataflashlog format (thanks randy)
|
||||
update mavcmd format for roi
|
||||
|
||||
|
||||
* Mission Planner 1.2
|
||||
Enable Mount config screen
|
||||
Add Quick View (double click to change)
|
||||
fix mono updater issue
|
||||
|
@ -124,7 +124,7 @@ namespace ArdupilotMega.Controls
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.lblProgressMessage);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ProgressReporterDialogue";
|
||||
|
@ -28,6 +28,8 @@ namespace ArdupilotMega
|
||||
/// time over target in seconds
|
||||
/// </summary>
|
||||
public int tot { get { if (groundspeed <= 0) return 0; return (int)(wp_dist / groundspeed); } }
|
||||
public float distTraveled { get; set; }
|
||||
public float timeInAir { get; set; }
|
||||
|
||||
// speeds
|
||||
public float airspeed { get { return _airspeed * multiplierspeed; } set { _airspeed = value; } }
|
||||
@ -35,7 +37,7 @@ namespace ArdupilotMega
|
||||
float _airspeed;
|
||||
float _groundspeed;
|
||||
float _verticalspeed;
|
||||
public float verticalspeed { get { if (float.IsNaN(_verticalspeed)) _verticalspeed = 0; return _verticalspeed; } set { _verticalspeed = _verticalspeed * 0.8f + value * 0.2f; } }
|
||||
public float verticalspeed { get { if (float.IsNaN(_verticalspeed)) _verticalspeed = 0; return _verticalspeed; } set { _verticalspeed = _verticalspeed * 0.4f + value * 0.6f; } }
|
||||
public float wind_dir { get; set; }
|
||||
public float wind_vel { get; set; }
|
||||
/// <summary>
|
||||
@ -108,6 +110,8 @@ namespace ArdupilotMega
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ch3percent != -1)
|
||||
return _ch3percent;
|
||||
try
|
||||
{
|
||||
if (MainV2.comPort.param.ContainsKey("RC3_MIN"))
|
||||
@ -116,7 +120,7 @@ namespace ArdupilotMega
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
return (int)((ch3out - 1100) / (1900 - 1100) * 100);
|
||||
}
|
||||
}
|
||||
catch
|
||||
@ -124,8 +128,12 @@ namespace ArdupilotMega
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
set { _ch3percent = value; }
|
||||
}
|
||||
|
||||
float _ch3percent = -1;
|
||||
|
||||
//nav state
|
||||
public float nav_roll { get; set; }
|
||||
public float nav_pitch { get; set; }
|
||||
@ -334,6 +342,7 @@ namespace ArdupilotMega
|
||||
|
||||
private object locker = new object();
|
||||
bool useLocation = false;
|
||||
bool gotwind = false;
|
||||
|
||||
public CurrentState()
|
||||
{
|
||||
@ -352,7 +361,8 @@ namespace ArdupilotMega
|
||||
|
||||
private DateTime lastupdate = DateTime.Now;
|
||||
|
||||
private DateTime lastwindcalc = DateTime.Now;
|
||||
private DateTime lastsecondcounter = DateTime.Now;
|
||||
private PointLatLngAlt lastpos = new PointLatLngAlt();
|
||||
|
||||
public void UpdateCurrentSettings(System.Windows.Forms.BindingSource bs)
|
||||
{
|
||||
@ -372,12 +382,29 @@ namespace ArdupilotMega
|
||||
{
|
||||
lastupdate = DateTime.Now;
|
||||
|
||||
|
||||
|
||||
if (DateTime.Now.Second != lastwindcalc.Second)
|
||||
if (DateTime.Now.Second != lastsecondcounter.Second)
|
||||
{
|
||||
lastwindcalc = DateTime.Now;
|
||||
// dowindcalc();
|
||||
lastsecondcounter = DateTime.Now;
|
||||
|
||||
if (lastpos.Lat != 0 && lastpos.Lng != 0)
|
||||
{
|
||||
if (!MainV2.comPort.BaseStream.IsOpen && !MainV2.comPort.logreadmode)
|
||||
distTraveled = 0;
|
||||
|
||||
distTraveled += (float)lastpos.GetDistance(new PointLatLngAlt(lat, lng, 0, "")) * multiplierdist;
|
||||
lastpos = new PointLatLngAlt(lat, lng, 0, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
lastpos = new PointLatLngAlt(lat, lng, 0, "");
|
||||
}
|
||||
|
||||
// cant use gs, cant use alt,
|
||||
if (ch3percent > 12)
|
||||
timeInAir++;
|
||||
|
||||
if (!gotwind)
|
||||
dowindcalc();
|
||||
}
|
||||
|
||||
if (mavinterface.packets[MAVLink.MAVLINK_MSG_ID_STATUSTEXT] != null) // status text
|
||||
@ -451,6 +478,8 @@ namespace ArdupilotMega
|
||||
{
|
||||
var wind = bytearray.ByteArrayToStructure<MAVLink.mavlink_wind_t>(6);
|
||||
|
||||
gotwind = true;
|
||||
|
||||
wind_dir = wind.direction;
|
||||
wind_vel = wind.speed;
|
||||
|
||||
@ -810,6 +839,8 @@ namespace ArdupilotMega
|
||||
|
||||
useLocation = true;
|
||||
|
||||
|
||||
|
||||
//alt = loc.alt / 1000.0f;
|
||||
lat = loc.lat / 10000000.0f;
|
||||
lng = loc.lon / 10000000.0f;
|
||||
@ -962,6 +993,8 @@ namespace ArdupilotMega
|
||||
|
||||
alt = vfr.alt; // this might include baro
|
||||
|
||||
ch3percent = vfr.throttle;
|
||||
|
||||
//Console.WriteLine(alt);
|
||||
|
||||
//climbrate = vfr.climb;
|
||||
|
@ -127,27 +127,33 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
|
||||
void updatePitch()
|
||||
{
|
||||
// pitch
|
||||
if (mavlinkComboBoxTilt.Text == "")
|
||||
return;
|
||||
|
||||
if (mavlinkComboBoxTilt.Text != "Disable")
|
||||
{
|
||||
MainV2.comPort.setParam(mavlinkComboBoxTilt.Text + "_FUNCTION", 7);
|
||||
MainV2.comPort.setParam("MNT_STAB_PITCH", 1);
|
||||
MainV2.comPort.setParam("MNT_STAB_TILT", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
MainV2.comPort.setParam("MNT_STAB_PITCH", 0);
|
||||
MainV2.comPort.setParam("MNT_STAB_TILT", 0);
|
||||
ensureDisabled(mavlinkComboBoxTilt,7);
|
||||
}
|
||||
|
||||
mavlinkNumericUpDownTSM.setup(800, 2200, 1, 1, mavlinkComboBoxTilt.Text +"_MIN", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownTSMX.setup(800, 2200, 1, 1, mavlinkComboBoxTilt.Text + "_MAX", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownTAM.setup(-90, 0, 100, 1, mavlinkComboBoxTilt.Text + "_ANGLE_MIN", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownTAMX.setup(0, 90, 100, 1, mavlinkComboBoxTilt.Text + "_ANGLE_MAX", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownTAM.setup(-90, 0, 100, 1, "MNT_ANGMIN_TIL", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownTAMX.setup(0, 90, 100, 1, "MNT_ANGMAX_TIL", MainV2.comPort.param);
|
||||
mavlinkCheckBoxTR.setup(-1, 1, mavlinkComboBoxTilt.Text + "_REV", MainV2.comPort.param);
|
||||
}
|
||||
|
||||
void updateRoll()
|
||||
{
|
||||
// roll
|
||||
if (mavlinkComboBoxRoll.Text == "")
|
||||
return;
|
||||
|
||||
if (mavlinkComboBoxRoll.Text != "Disable")
|
||||
{
|
||||
MainV2.comPort.setParam(mavlinkComboBoxRoll.Text + "_FUNCTION", 8);
|
||||
@ -161,29 +167,32 @@ namespace ArdupilotMega.GCSViews.ConfigurationView
|
||||
|
||||
mavlinkNumericUpDownRSM.setup(800, 2200, 1, 1, mavlinkComboBoxRoll.Text +"_MIN", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownRSMX.setup(800, 2200, 1, 1, mavlinkComboBoxRoll.Text + "_MAX", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownRAM.setup(-90, 0, 100, 1, mavlinkComboBoxRoll.Text + "_ANGLE_MIN", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownRAMX.setup(0, 90, 100, 1, mavlinkComboBoxRoll.Text + "_ANGLE_MAX", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownRAM.setup(-90, 0, 100, 1, "MNT_ANGMIN_ROL", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownRAMX.setup(0, 90, 100, 1, "MNT_ANGMAX_ROL", MainV2.comPort.param);
|
||||
mavlinkCheckBoxRR.setup(-1, 1, mavlinkComboBoxRoll.Text + "_REV", MainV2.comPort.param);
|
||||
}
|
||||
|
||||
void updateYaw()
|
||||
{
|
||||
// yaw
|
||||
if (mavlinkComboBoxPan.Text == "")
|
||||
return;
|
||||
|
||||
if (mavlinkComboBoxPan.Text != "Disable")
|
||||
{
|
||||
MainV2.comPort.setParam(mavlinkComboBoxPan.Text + "_FUNCTION", 6);
|
||||
MainV2.comPort.setParam("MNT_STAB_YAW", 1);
|
||||
MainV2.comPort.setParam("MNT_STAB_PAN", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
MainV2.comPort.setParam("MNT_STAB_YAW", 0);
|
||||
MainV2.comPort.setParam("MNT_STAB_PAN", 0);
|
||||
ensureDisabled(mavlinkComboBoxPan,6);
|
||||
}
|
||||
|
||||
mavlinkNumericUpDownPSM.setup(800, 2200, 1, 1, mavlinkComboBoxPan.Text + "_MIN", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownPSMX.setup(800, 2200, 1, 1, mavlinkComboBoxPan.Text + "_MAX", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownPAM.setup(-90, 0, 100, 1, mavlinkComboBoxPan.Text + "_ANGLE_MIN", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownPAMX.setup(0, 90, 100, 1, mavlinkComboBoxPan.Text + "_ANGLE_MAX", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownPAM.setup(-90, 0, 100, 1, "MNT_ANGMIN_PAN", MainV2.comPort.param);
|
||||
mavlinkNumericUpDownPAMX.setup(0, 90, 100, 1, "MNT_ANGMAX_PAN", MainV2.comPort.param);
|
||||
mavlinkCheckBoxPR.setup(-1, 1, mavlinkComboBoxPan.Text + "_REV", MainV2.comPort.param);
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,7 @@ namespace ArdupilotMega.GCSViews
|
||||
this.pictureBoxOcta = new ArdupilotMega.Controls.ImageLabel();
|
||||
this.pictureBoxOctav = new ArdupilotMega.Controls.ImageLabel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.CMB_history = new System.Windows.Forms.ComboBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxHilimage)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxAPHil)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBoxACHil)).BeginInit();
|
||||
@ -214,10 +215,19 @@ namespace ArdupilotMega.GCSViews
|
||||
resources.ApplyResources(this.label1, "label1");
|
||||
this.label1.Name = "label1";
|
||||
//
|
||||
// CMB_history
|
||||
//
|
||||
this.CMB_history.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CMB_history.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.CMB_history, "CMB_history");
|
||||
this.CMB_history.Name = "CMB_history";
|
||||
this.CMB_history.SelectedIndexChanged += new System.EventHandler(this.CMB_history_SelectedIndexChanged);
|
||||
//
|
||||
// Firmware
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.CMB_history);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.BUT_setup);
|
||||
this.Controls.Add(this.label2);
|
||||
@ -247,5 +257,7 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
}
|
||||
|
||||
private ComboBox CMB_history;
|
||||
|
||||
}
|
||||
}
|
@ -9,6 +9,7 @@ using System.Net;
|
||||
using log4net;
|
||||
using ArdupilotMega.Arduino;
|
||||
using ArdupilotMega.Utilities;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace ArdupilotMega.GCSViews
|
||||
{
|
||||
@ -16,6 +17,8 @@ namespace ArdupilotMega.GCSViews
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
string firmwareurl = "http://ardupilot-mega.googlecode.com/git/Tools/ArdupilotMegaPlanner/Firmware/firmware2.xml";
|
||||
|
||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||
{
|
||||
if (keyData == (Keys.Control | Keys.C))
|
||||
@ -35,9 +38,26 @@ namespace ArdupilotMega.GCSViews
|
||||
return true;
|
||||
}
|
||||
|
||||
if (keyData == (Keys.Control | Keys.O))
|
||||
{
|
||||
CMB_history.Enabled = false;
|
||||
|
||||
CMB_history.DataSource = oldurls;
|
||||
|
||||
CMB_history.Enabled = true;
|
||||
CMB_history.Visible = true;
|
||||
}
|
||||
|
||||
return base.ProcessCmdKey(ref msg, keyData);
|
||||
}
|
||||
|
||||
// ap 2.5 - ac 2.7
|
||||
//"https://meee146-planner.googlecode.com/git-history/dfc5737c5efc1e7b78e908829a097624c273d9d7/Tools/ArdupilotMegaPlanner/Firmware/firmware2.xml";
|
||||
//"http://meee146-planner.googlecode.com/git/Tools/ArdupilotMegaPlanner/Firmware/AC2-Y6-1280.hex"
|
||||
readonly string oldurl = ("https://meee146-planner.googlecode.com/git-history/!Hash!/Tools/ArdupilotMegaPlanner/Firmware/firmware2.xml");
|
||||
readonly string oldfirmwareurl = ("https://meee146-planner.googlecode.com/git-history/!Hash!/Tools/ArdupilotMegaPlanner/Firmware/!Firmware!");
|
||||
string[] oldurls = new string[] { "26305d5790333f730cd396afcd08c165cde33ed7", "bc1f26ca40b076e3d06f173adad772fb25aa6512", "dfc5737c5efc1e7b78e908829a097624c273d9d7", "682065db449b6c79d89717908ed8beea1ed6a03a", "b21116847d35472b9ab770408cbeb88ed2ed0a95", "511e00bc89a554aea8768a274bff28af532cd335", "1da56714aa1ed88dcdb078a90d33bcef4eb4315f", "8aa4c7a1ed07648f31335926cc6bcc06c87dc536" };
|
||||
|
||||
List<software> softwares = new List<software>();
|
||||
bool flashing = false;
|
||||
|
||||
@ -90,7 +110,7 @@ namespace ArdupilotMega.GCSViews
|
||||
try
|
||||
{
|
||||
|
||||
using (XmlTextReader xmlreader = new XmlTextReader("http://ardupilot-mega.googlecode.com/git/Tools/ArdupilotMegaPlanner/Firmware/firmware2.xml"))
|
||||
using (XmlTextReader xmlreader = new XmlTextReader(firmwareurl))
|
||||
{
|
||||
while (xmlreader.Read())
|
||||
{
|
||||
@ -348,6 +368,14 @@ namespace ArdupilotMega.GCSViews
|
||||
return;
|
||||
}
|
||||
|
||||
// use the git-history url
|
||||
if (CMB_history.Visible == true)
|
||||
{
|
||||
string fn = Path.GetFileName(baseurl);
|
||||
baseurl = oldfirmwareurl.Replace("!Hash!", CMB_history.Text);
|
||||
baseurl = baseurl.Replace("!Firmware!", fn);
|
||||
}
|
||||
|
||||
log.Info("Using " + baseurl);
|
||||
|
||||
// Create a request using a URL that can receive a post.
|
||||
@ -728,5 +756,12 @@ namespace ArdupilotMega.GCSViews
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void CMB_history_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
firmwareurl = oldurl.Replace("!Hash!", CMB_history.Text);
|
||||
|
||||
Firmware_Load(null, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -136,13 +136,13 @@
|
||||
<value>pictureBoxAPM</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxAPM.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxAPM.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxAPM.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="pictureBoxQuad.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -160,13 +160,13 @@
|
||||
<value>pictureBoxQuad</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxQuad.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxQuad.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxQuad.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="pictureBoxHexa.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -184,13 +184,13 @@
|
||||
<value>pictureBoxHexa</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxHexa.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxHexa.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxHexa.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="pictureBoxTri.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -208,13 +208,13 @@
|
||||
<value>pictureBoxTri</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxTri.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxTri.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxTri.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="pictureBoxY6.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -232,13 +232,13 @@
|
||||
<value>pictureBoxY6</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxY6.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxY6.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxY6.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="lbl_status.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -268,7 +268,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>lbl_status.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="progress.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -292,7 +292,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>progress.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -322,7 +322,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="pictureBoxHeli.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -340,13 +340,13 @@
|
||||
<value>pictureBoxHeli</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxHeli.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxHeli.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxHeli.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="BUT_setup.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -367,13 +367,13 @@
|
||||
<value>BUT_setup</value>
|
||||
</data>
|
||||
<data name=">>BUT_setup.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_setup.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>BUT_setup.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="pictureBoxHilimage.ImageLocation" xml:space="preserve">
|
||||
<value />
|
||||
@ -400,7 +400,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxHilimage.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="pictureBoxAPHil.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -427,7 +427,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxAPHil.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="pictureBoxACHil.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -454,7 +454,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxACHil.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="pictureBoxACHHil.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
@ -481,7 +481,7 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxACHHil.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="pictureBoxOcta.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>696, 176</value>
|
||||
@ -496,13 +496,13 @@
|
||||
<value>pictureBoxOcta</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxOcta.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxOcta.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxOcta.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="pictureBoxOctav.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>696, 0</value>
|
||||
@ -517,13 +517,13 @@
|
||||
<value>pictureBoxOctav</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxOctav.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.ImageLabel, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxOctav.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>pictureBoxOctav.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
@ -550,6 +550,30 @@
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>label1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="CMB_history.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>878, 387</value>
|
||||
</data>
|
||||
<data name="CMB_history.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>121, 21</value>
|
||||
</data>
|
||||
<data name="CMB_history.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>27</value>
|
||||
</data>
|
||||
<data name="CMB_history.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>CMB_history.Name" xml:space="preserve">
|
||||
<value>CMB_history</value>
|
||||
</data>
|
||||
<data name=">>CMB_history.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CMB_history.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>CMB_history.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
@ -565,6 +589,6 @@
|
||||
<value>Firmware</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner, Version=1.1.4516.33895, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4620.38627, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
</root>
|
@ -554,7 +554,7 @@
|
||||
""};
|
||||
this.Gvspeed.CapText = "VSI";
|
||||
this.Gvspeed.Center = new System.Drawing.Point(75, 75);
|
||||
this.Gvspeed.DataBindings.Add(new System.Windows.Forms.Binding("Value0", this.bindingSource1, "climbrate", true));
|
||||
this.Gvspeed.DataBindings.Add(new System.Windows.Forms.Binding("Value0", this.bindingSource1, "verticalspeed", true));
|
||||
this.Gvspeed.MaxValue = 10F;
|
||||
this.Gvspeed.MinValue = -10F;
|
||||
this.Gvspeed.Name = "Gvspeed";
|
||||
|
@ -219,12 +219,15 @@ namespace ArdupilotMega.GCSViews
|
||||
if (CB_tuning.Checked)
|
||||
ZedGraphTimer.Start();
|
||||
|
||||
if (!hud1.Visible)
|
||||
hud1.Visible = true;
|
||||
if (!hud1.Enabled)
|
||||
hud1.Enabled = true;
|
||||
if (MainV2.MONO)
|
||||
{
|
||||
if (!hud1.Visible)
|
||||
hud1.Visible = true;
|
||||
if (!hud1.Enabled)
|
||||
hud1.Enabled = true;
|
||||
|
||||
hud1.Dock = DockStyle.Fill;
|
||||
hud1.Dock = DockStyle.Fill;
|
||||
}
|
||||
|
||||
foreach (Control ctl in splitContainer1.Panel2.Controls)
|
||||
{
|
||||
@ -234,11 +237,13 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
public void Deactivate()
|
||||
{
|
||||
|
||||
hud1.Dock = DockStyle.None;
|
||||
hud1.Size = new System.Drawing.Size(5,5);
|
||||
hud1.Enabled = false;
|
||||
hud1.Visible = false;
|
||||
if (MainV2.MONO)
|
||||
{
|
||||
hud1.Dock = DockStyle.None;
|
||||
hud1.Size = new System.Drawing.Size(5, 5);
|
||||
hud1.Enabled = false;
|
||||
hud1.Visible = false;
|
||||
}
|
||||
// hud1.Location = new Point(-1000,-1000);
|
||||
|
||||
ZedGraphTimer.Stop();
|
||||
@ -315,7 +320,7 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
if (MainV2.giveComport == true)
|
||||
{
|
||||
System.Threading.Thread.Sleep(100);
|
||||
System.Threading.Thread.Sleep(50);
|
||||
continue;
|
||||
}
|
||||
if (!comPort.BaseStream.IsOpen)
|
||||
@ -957,7 +962,7 @@ namespace ArdupilotMega.GCSViews
|
||||
{
|
||||
((Button)sender).Enabled = false;
|
||||
#if MAVLINK10
|
||||
comPort.doCommand((MAVLink.MAV_CMD)Enum.Parse(typeof(MAVLink.MAV_CMD), CMB_action.Text),1,0,0,0,0,0,0);
|
||||
comPort.doCommand((MAVLink.MAV_CMD)Enum.Parse(typeof(MAVLink.MAV_CMD), CMB_action.Text),1,1,1,0,0,0,0);
|
||||
#else
|
||||
comPort.doAction((MAVLink.MAV_ACTION)Enum.Parse(typeof(MAVLink.MAV_ACTION), "MAV_ACTION_" + CMB_action.Text));
|
||||
#endif
|
||||
|
@ -238,7 +238,7 @@
|
||||
<value>hud1</value>
|
||||
</data>
|
||||
<data name=">>hud1.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.HUD, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.HUD, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>hud1.Parent" xml:space="preserve">
|
||||
<value>SubMainLeft.Panel1</value>
|
||||
@ -274,7 +274,7 @@
|
||||
<value>quickView6</value>
|
||||
</data>
|
||||
<data name=">>quickView6.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>quickView6.Parent" xml:space="preserve">
|
||||
<value>tabQuick</value>
|
||||
@ -295,7 +295,7 @@
|
||||
<value>quickView5</value>
|
||||
</data>
|
||||
<data name=">>quickView5.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>quickView5.Parent" xml:space="preserve">
|
||||
<value>tabQuick</value>
|
||||
@ -316,7 +316,7 @@
|
||||
<value>quickView4</value>
|
||||
</data>
|
||||
<data name=">>quickView4.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>quickView4.Parent" xml:space="preserve">
|
||||
<value>tabQuick</value>
|
||||
@ -337,7 +337,7 @@
|
||||
<value>quickView3</value>
|
||||
</data>
|
||||
<data name=">>quickView3.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>quickView3.Parent" xml:space="preserve">
|
||||
<value>tabQuick</value>
|
||||
@ -358,7 +358,7 @@
|
||||
<value>quickView2</value>
|
||||
</data>
|
||||
<data name=">>quickView2.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>quickView2.Parent" xml:space="preserve">
|
||||
<value>tabQuick</value>
|
||||
@ -379,7 +379,7 @@
|
||||
<value>quickView1</value>
|
||||
</data>
|
||||
<data name=">>quickView1.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.QuickView, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>quickView1.Parent" xml:space="preserve">
|
||||
<value>tabQuick</value>
|
||||
@ -433,7 +433,7 @@
|
||||
<value>BUT_script</value>
|
||||
</data>
|
||||
<data name=">>BUT_script.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_script.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -466,7 +466,7 @@
|
||||
<value>BUT_joystick</value>
|
||||
</data>
|
||||
<data name=">>BUT_joystick.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_joystick.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -496,7 +496,7 @@
|
||||
<value>BUT_quickmanual</value>
|
||||
</data>
|
||||
<data name=">>BUT_quickmanual.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_quickmanual.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -526,7 +526,7 @@
|
||||
<value>BUT_quickrtl</value>
|
||||
</data>
|
||||
<data name=">>BUT_quickrtl.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_quickrtl.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -556,7 +556,7 @@
|
||||
<value>BUT_quickauto</value>
|
||||
</data>
|
||||
<data name=">>BUT_quickauto.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_quickauto.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -610,7 +610,7 @@
|
||||
<value>BUT_setwp</value>
|
||||
</data>
|
||||
<data name=">>BUT_setwp.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_setwp.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -661,7 +661,7 @@
|
||||
<value>BUT_setmode</value>
|
||||
</data>
|
||||
<data name=">>BUT_setmode.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_setmode.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -691,7 +691,7 @@
|
||||
<value>BUT_clear_track</value>
|
||||
</data>
|
||||
<data name=">>BUT_clear_track.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_clear_track.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -742,7 +742,7 @@
|
||||
<value>BUT_Homealt</value>
|
||||
</data>
|
||||
<data name=">>BUT_Homealt.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_Homealt.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -772,7 +772,7 @@
|
||||
<value>BUT_RAWSensor</value>
|
||||
</data>
|
||||
<data name=">>BUT_RAWSensor.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_RAWSensor.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -802,7 +802,7 @@
|
||||
<value>BUTrestartmission</value>
|
||||
</data>
|
||||
<data name=">>BUTrestartmission.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUTrestartmission.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -832,7 +832,7 @@
|
||||
<value>BUTactiondo</value>
|
||||
</data>
|
||||
<data name=">>BUTactiondo.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUTactiondo.Parent" xml:space="preserve">
|
||||
<value>tabActions</value>
|
||||
@ -886,7 +886,7 @@
|
||||
<value>Gvspeed</value>
|
||||
</data>
|
||||
<data name=">>Gvspeed.Type" xml:space="preserve">
|
||||
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>Gvspeed.Parent" xml:space="preserve">
|
||||
<value>tabGauges</value>
|
||||
@ -916,7 +916,7 @@
|
||||
<value>Gheading</value>
|
||||
</data>
|
||||
<data name=">>Gheading.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.HSI, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.HSI, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>Gheading.Parent" xml:space="preserve">
|
||||
<value>tabGauges</value>
|
||||
@ -946,7 +946,7 @@
|
||||
<value>Galt</value>
|
||||
</data>
|
||||
<data name=">>Galt.Type" xml:space="preserve">
|
||||
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>Galt.Parent" xml:space="preserve">
|
||||
<value>tabGauges</value>
|
||||
@ -979,7 +979,7 @@
|
||||
<value>Gspeed</value>
|
||||
</data>
|
||||
<data name=">>Gspeed.Type" xml:space="preserve">
|
||||
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>AGaugeApp.AGauge, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>Gspeed.Parent" xml:space="preserve">
|
||||
<value>tabGauges</value>
|
||||
@ -1063,7 +1063,7 @@
|
||||
<value>lbl_playbackspeed</value>
|
||||
</data>
|
||||
<data name=">>lbl_playbackspeed.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>lbl_playbackspeed.Parent" xml:space="preserve">
|
||||
<value>tabTLogs</value>
|
||||
@ -1090,7 +1090,7 @@
|
||||
<value>lbl_logpercent</value>
|
||||
</data>
|
||||
<data name=">>lbl_logpercent.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>lbl_logpercent.Parent" xml:space="preserve">
|
||||
<value>tabTLogs</value>
|
||||
@ -1117,7 +1117,7 @@
|
||||
<value>NUM_playbackspeed</value>
|
||||
</data>
|
||||
<data name=">>NUM_playbackspeed.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>NUM_playbackspeed.Parent" xml:space="preserve">
|
||||
<value>tabTLogs</value>
|
||||
@ -1144,7 +1144,7 @@
|
||||
<value>BUT_log2kml</value>
|
||||
</data>
|
||||
<data name=">>BUT_log2kml.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_log2kml.Parent" xml:space="preserve">
|
||||
<value>tabTLogs</value>
|
||||
@ -1198,7 +1198,7 @@
|
||||
<value>BUT_playlog</value>
|
||||
</data>
|
||||
<data name=">>BUT_playlog.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_playlog.Parent" xml:space="preserve">
|
||||
<value>tabTLogs</value>
|
||||
@ -1225,7 +1225,7 @@
|
||||
<value>BUT_loadtelem</value>
|
||||
</data>
|
||||
<data name=">>BUT_loadtelem.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_loadtelem.Parent" xml:space="preserve">
|
||||
<value>tabTLogs</value>
|
||||
@ -1411,7 +1411,7 @@
|
||||
<value>lbl_winddir</value>
|
||||
</data>
|
||||
<data name=">>lbl_winddir.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>lbl_winddir.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
@ -1441,7 +1441,7 @@
|
||||
<value>lbl_windvel</value>
|
||||
</data>
|
||||
<data name=">>lbl_windvel.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>lbl_windvel.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
@ -1474,7 +1474,7 @@
|
||||
<value>lbl_hdop</value>
|
||||
</data>
|
||||
<data name=">>lbl_hdop.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>lbl_hdop.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
@ -1507,7 +1507,7 @@
|
||||
<value>lbl_sats</value>
|
||||
</data>
|
||||
<data name=">>lbl_sats.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>lbl_sats.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
@ -1679,7 +1679,7 @@
|
||||
<value>gMapControl1</value>
|
||||
</data>
|
||||
<data name=">>gMapControl1.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>gMapControl1.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
@ -1742,7 +1742,7 @@
|
||||
<value>TXT_lat</value>
|
||||
</data>
|
||||
<data name=">>TXT_lat.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>TXT_lat.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -1799,7 +1799,7 @@
|
||||
<value>label1</value>
|
||||
</data>
|
||||
<data name=">>label1.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>label1.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -1829,7 +1829,7 @@
|
||||
<value>TXT_long</value>
|
||||
</data>
|
||||
<data name=">>TXT_long.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>TXT_long.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -1859,7 +1859,7 @@
|
||||
<value>TXT_alt</value>
|
||||
</data>
|
||||
<data name=">>TXT_alt.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>TXT_alt.Parent" xml:space="preserve">
|
||||
<value>panel1</value>
|
||||
@ -2060,7 +2060,7 @@
|
||||
<value>label6</value>
|
||||
</data>
|
||||
<data name=">>label6.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyLabel, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>label6.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -2168,6 +2168,6 @@
|
||||
<value>FlightData</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4611.31905, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4621.15928, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
</root>
|
@ -141,6 +141,7 @@
|
||||
this.panelBASE = new System.Windows.Forms.Panel();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.reverseWPsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Commands)).BeginInit();
|
||||
this.panel5.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
@ -868,7 +869,8 @@
|
||||
this.prefetchToolStripMenuItem,
|
||||
this.kMLOverlayToolStripMenuItem,
|
||||
this.elevationGraphToolStripMenuItem,
|
||||
this.cameraToolStripMenuItem});
|
||||
this.cameraToolStripMenuItem,
|
||||
this.reverseWPsToolStripMenuItem});
|
||||
this.mapToolToolStripMenuItem.Name = "mapToolToolStripMenuItem";
|
||||
resources.ApplyResources(this.mapToolToolStripMenuItem, "mapToolToolStripMenuItem");
|
||||
//
|
||||
@ -980,6 +982,12 @@
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// reverseWPsToolStripMenuItem
|
||||
//
|
||||
this.reverseWPsToolStripMenuItem.Name = "reverseWPsToolStripMenuItem";
|
||||
resources.ApplyResources(this.reverseWPsToolStripMenuItem, "reverseWPsToolStripMenuItem");
|
||||
this.reverseWPsToolStripMenuItem.Click += new System.EventHandler(this.reverseWPsToolStripMenuItem_Click);
|
||||
//
|
||||
// FlightPlanner
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -1113,5 +1121,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem trackerHomeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem flyToHereToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem gridV2ToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem reverseWPsToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -227,7 +227,9 @@ namespace ArdupilotMega.GCSViews
|
||||
if (pass == false)
|
||||
{
|
||||
CustomMessageBox.Show("You must have a home altitude");
|
||||
return;
|
||||
string homealt = "100";
|
||||
Common.InputBox("Home Alt", "Home Altitude", ref homealt);
|
||||
TXT_homealt.Text = homealt;
|
||||
}
|
||||
int results1;
|
||||
if (!int.TryParse(TXT_DefaultAlt.Text, out results1))
|
||||
@ -3119,8 +3121,12 @@ namespace ArdupilotMega.GCSViews
|
||||
string Pointsin = "20";
|
||||
Common.InputBox("Points", "Number of points to generate Circle", ref Pointsin);
|
||||
|
||||
string Directionin = "1";
|
||||
Common.InputBox("Points", "Direction of circle (-1 or 1)", ref Directionin);
|
||||
|
||||
int Points = 0;
|
||||
int Radius = 0;
|
||||
int Direction = 1;
|
||||
|
||||
if (!int.TryParse(RadiusIn, out Radius))
|
||||
{
|
||||
@ -3134,9 +3140,23 @@ namespace ArdupilotMega.GCSViews
|
||||
return;
|
||||
}
|
||||
|
||||
if (!int.TryParse(Directionin, out Direction) )
|
||||
{
|
||||
CustomMessageBox.Show("Bad Direction value");
|
||||
return;
|
||||
}
|
||||
|
||||
double a = 0;
|
||||
double step = 360.0f / Points;
|
||||
if (Direction == -1)
|
||||
{
|
||||
a = 360;
|
||||
step *= -1;
|
||||
}
|
||||
|
||||
for (double a = 0; a <= 360; a += 360.0f / Points)
|
||||
quickadd = true;
|
||||
|
||||
for (; a <= 360 && a >= 0; a += step)
|
||||
{
|
||||
|
||||
selectedrow = Commands.Rows.Add();
|
||||
@ -3159,12 +3179,24 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
}
|
||||
|
||||
quickadd = false;
|
||||
writeKML();
|
||||
|
||||
//drawnpolygon.Points.Add(new PointLatLng(start.Lat, start.Lng));
|
||||
}
|
||||
|
||||
public void Activate()
|
||||
{
|
||||
timer1.Start();
|
||||
|
||||
if (MainV2.cs.firmware == MainV2.Firmwares.ArduCopter2)
|
||||
{
|
||||
CHK_altmode.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
CHK_altmode.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Deactivate()
|
||||
@ -3282,11 +3314,10 @@ namespace ArdupilotMega.GCSViews
|
||||
int altitude = (int)(double.Parse(alt) / MainV2.cs.multiplierdist);
|
||||
|
||||
// draw a grid
|
||||
double x = bottomleft.Lng - 0.00001;
|
||||
double y = bottomleft.Lat;
|
||||
|
||||
newpos(ref y, ref x, double.Parse(angle) - 90, diagdist);
|
||||
double x = arearect.LocationMiddle.Lng;
|
||||
double y = arearect.LocationMiddle.Lat;
|
||||
|
||||
newpos(ref y, ref x, double.Parse(angle) - 135, diagdist);
|
||||
|
||||
List<linelatlng> grid = new List<linelatlng>();
|
||||
|
||||
@ -3301,12 +3332,12 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
quickadd = true;
|
||||
|
||||
while (lines * double.Parse(distance) < diagdist * 3) //x < topright.Lat && y < topright.Lng)
|
||||
while (lines * double.Parse(distance) < diagdist * 1.5) //x < topright.Lat && y < topright.Lng)
|
||||
{
|
||||
//callMe(y, x, 0);
|
||||
// callMe(y, x, 0);
|
||||
double nx = x;
|
||||
double ny = y;
|
||||
newpos(ref ny, ref nx, double.Parse(angle), diagdist);
|
||||
newpos(ref ny, ref nx, double.Parse(angle), diagdist * 1.5);
|
||||
|
||||
//callMe(ny, nx, 0);
|
||||
|
||||
@ -3325,6 +3356,8 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
quickadd = false;
|
||||
|
||||
// writeKML();
|
||||
|
||||
// return;
|
||||
|
||||
// find intersections
|
||||
@ -3386,27 +3419,7 @@ namespace ArdupilotMega.GCSViews
|
||||
line.p1 = closestlatlong;
|
||||
line.p2 = farestlatlong;
|
||||
grid[a] = line;
|
||||
}/*
|
||||
else if (crosses == 4)
|
||||
{
|
||||
linelatlng line = grid[a];
|
||||
line.p1 = closestlatlong;
|
||||
|
||||
PointLatLng far = farestlatlong;
|
||||
|
||||
matchs.Remove(closestlatlong);
|
||||
matchs.Remove(farestlatlong);
|
||||
|
||||
farestlatlong = findClosestPoint(line.p1, matchs);
|
||||
|
||||
matchs.Remove(farestlatlong);
|
||||
|
||||
line.p2 = farestlatlong;
|
||||
grid[a] = line;
|
||||
|
||||
grid.Add(new linelatlng() { p1 = matchs[0], p2 = far, basepnt = line.basepnt });
|
||||
|
||||
}*/
|
||||
}
|
||||
else
|
||||
{
|
||||
linelatlng line = grid[a];
|
||||
@ -3456,11 +3469,29 @@ namespace ArdupilotMega.GCSViews
|
||||
grid.Remove(line);
|
||||
}
|
||||
|
||||
// int fixme;
|
||||
|
||||
// foreach (PointLatLng pnt in PathFind.FindPath(MainV2.cs.HomeLocation.Point(),grid))
|
||||
// {
|
||||
// callMe(pnt.Lat, pnt.Lng, altitude);
|
||||
// }
|
||||
|
||||
// return;
|
||||
|
||||
quickadd = true;
|
||||
|
||||
linelatlng closest = findClosestLine(MainV2.cs.HomeLocation.Point(),grid);
|
||||
|
||||
PointLatLng lastpnt = closest.p1;
|
||||
PointLatLng lastpnt;
|
||||
|
||||
if (MainMap.Manager.GetDistance(closest.p1, MainV2.cs.HomeLocation.Point()) < MainMap.Manager.GetDistance(closest.p2, MainV2.cs.HomeLocation.Point()))
|
||||
{
|
||||
lastpnt = closest.p1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastpnt = closest.p2;
|
||||
}
|
||||
|
||||
while (grid.Count > 0)
|
||||
{
|
||||
@ -3528,6 +3559,7 @@ namespace ArdupilotMega.GCSViews
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PointLatLng findClosestPoint(PointLatLng start, List<PointLatLng> list)
|
||||
{
|
||||
PointLatLng answer = PointLatLng.Zero;
|
||||
@ -4127,5 +4159,26 @@ namespace ArdupilotMega.GCSViews
|
||||
{
|
||||
gridv2();
|
||||
}
|
||||
|
||||
private void reverseWPsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataGridViewRowCollection rows = Commands.Rows;
|
||||
//Commands.Rows.Clear();
|
||||
|
||||
int count = rows.Count;
|
||||
|
||||
quickadd = true;
|
||||
|
||||
for (int a = count; a > 0; a--)
|
||||
{
|
||||
DataGridViewRow row = Commands.Rows[a-1];
|
||||
Commands.Rows.Remove(row);
|
||||
Commands.Rows.Add(row);
|
||||
}
|
||||
|
||||
quickadd = false;
|
||||
|
||||
writeKML();
|
||||
}
|
||||
}
|
||||
}
|
@ -556,7 +556,7 @@
|
||||
<value>BUT_write</value>
|
||||
</data>
|
||||
<data name=">>BUT_write.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4615.38724, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4620.29750, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_write.Parent" xml:space="preserve">
|
||||
<value>panel5</value>
|
||||
@ -583,7 +583,7 @@
|
||||
<value>BUT_read</value>
|
||||
</data>
|
||||
<data name=">>BUT_read.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4615.38724, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4620.29750, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_read.Parent" xml:space="preserve">
|
||||
<value>panel5</value>
|
||||
@ -1147,7 +1147,7 @@
|
||||
<value>BUT_Add</value>
|
||||
</data>
|
||||
<data name=">>BUT_Add.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4615.38724, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyButton, ArdupilotMegaPlanner10, Version=1.1.4620.29750, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>BUT_Add.Parent" xml:space="preserve">
|
||||
<value>panelWaypoints</value>
|
||||
@ -1542,6 +1542,12 @@
|
||||
<data name="cameraToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Camera</value>
|
||||
</data>
|
||||
<data name="reverseWPsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>167, 22</value>
|
||||
</data>
|
||||
<data name="reverseWPsToolStripMenuItem.Text" xml:space="preserve">
|
||||
<value>Reverse WPs</value>
|
||||
</data>
|
||||
<data name="mapToolToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>152, 22</value>
|
||||
</data>
|
||||
@ -1748,7 +1754,7 @@
|
||||
<value>MainMap</value>
|
||||
</data>
|
||||
<data name=">>MainMap.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4615.38724, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.myGMAP, ArdupilotMegaPlanner10, Version=1.1.4620.29750, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>MainMap.Parent" xml:space="preserve">
|
||||
<value>panelMap</value>
|
||||
@ -1778,7 +1784,7 @@
|
||||
<value>trackBar1</value>
|
||||
</data>
|
||||
<data name=">>trackBar1.Type" xml:space="preserve">
|
||||
<value>ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4615.38724, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>ArdupilotMega.Controls.MyTrackBar, ArdupilotMegaPlanner10, Version=1.1.4620.29750, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>trackBar1.Parent" xml:space="preserve">
|
||||
<value>panelMap</value>
|
||||
@ -2227,10 +2233,16 @@
|
||||
<data name=">>timer1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Timer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>reverseWPsToolStripMenuItem.Name" xml:space="preserve">
|
||||
<value>reverseWPsToolStripMenuItem</value>
|
||||
</data>
|
||||
<data name=">>reverseWPsToolStripMenuItem.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>FlightPlanner</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4615.38724, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>System.Windows.Forms.MyUserControl, ArdupilotMegaPlanner10, Version=1.1.4620.29750, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
</root>
|
@ -3,14 +3,16 @@
|
||||
DIR=$(cd "$(dirname "$0")"; pwd)
|
||||
|
||||
#change these values to match your app
|
||||
EXE_PATH="$DIR/ArdupilotMegaPlanner.exe"
|
||||
PROCESS_NAME=ArdupilotMegaPlanner
|
||||
APPNAME="ArdupilotMegaPlanner"
|
||||
EXE_PATH="$DIR/ArdupilotMegaPlanner10.exe"
|
||||
PROCESS_NAME=ArdupilotMegaPlanner10
|
||||
APPNAME="ArdupilotMegaPlanner10"
|
||||
|
||||
#set up environment
|
||||
MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
|
||||
export DYLD_FALLBACK_LIBRARY_PATH="$DIR:$MONO_FRAMEWORK_PATH/lib:/lib:/usr/lib"
|
||||
export PATH="$MONO_FRAMEWORK_PATH/bin:$PATH"
|
||||
|
||||
#export MONO_MWF_MAC_FORCE_X11=true
|
||||
|
||||
#mono version check
|
||||
REQUIRED_MAJOR=2
|
||||
|
@ -2,14 +2,14 @@
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" xmlns:difx="http://schemas.microsoft.com/wix/DifxAppExtension">
|
||||
|
||||
|
||||
<Product Id="*" Name="APM Planner" Language="1033" Version="1.2.6" Manufacturer="Michael Oborne" UpgradeCode="{625389D7-EB3C-4d77-A5F6-A285CF99437D}">
|
||||
<Product Id="*" Name="APM Planner" Language="1033" Version="1.2.8" Manufacturer="Michael Oborne" UpgradeCode="{625389D7-EB3C-4d77-A5F6-A285CF99437D}">
|
||||
|
||||
<Package Description="APM Planner Installer" Comments="Apm Planner Installer" Manufacturer="Michael Oborne" InstallerVersion="200" Compressed="yes" />
|
||||
|
||||
|
||||
<Upgrade Id="{625389D7-EB3C-4d77-A5F6-A285CF99437D}">
|
||||
<UpgradeVersion OnlyDetect="yes" Minimum="1.2.6" Property="NEWERVERSIONDETECTED" IncludeMinimum="no" />
|
||||
<UpgradeVersion OnlyDetect="no" Maximum="1.2.6" Property="OLDERVERSIONBEINGUPGRADED" IncludeMaximum="no" />
|
||||
<UpgradeVersion OnlyDetect="yes" Minimum="1.2.8" Property="NEWERVERSIONDETECTED" IncludeMinimum="no" />
|
||||
<UpgradeVersion OnlyDetect="no" Maximum="1.2.8" Property="OLDERVERSIONBEINGUPGRADED" IncludeMaximum="no" />
|
||||
</Upgrade>
|
||||
|
||||
<InstallExecuteSequence>
|
||||
@ -31,7 +31,7 @@
|
||||
<Permission User="Everyone" GenericAll="yes" />
|
||||
</CreateFolder>
|
||||
</Component>
|
||||
<Component Id="_comp1" Guid="2682a639-9b2c-49ae-8fc0-97a69b4f2bd2">
|
||||
<Component Id="_comp1" Guid="9ffca6e2-5272-4c99-a10a-fb99b0a2bc9e">
|
||||
<File Id="_2" Source="..\bin\release\.gdbinit" />
|
||||
<File Id="_3" Source="..\bin\release\.gitignore" />
|
||||
<File Id="_4" Source="..\bin\release\aerosim3.91.txt" />
|
||||
@ -95,164 +95,162 @@
|
||||
<File Id="_62" Source="..\bin\release\quadhil.xml" />
|
||||
<File Id="_63" Source="..\bin\release\runme" />
|
||||
<File Id="_64" Source="..\bin\release\serialsent.raw" />
|
||||
<File Id="_65" Source="..\bin\release\Sharp3D.Math.dll" />
|
||||
<File Id="_66" Source="..\bin\release\Sharp3D.Math.xml" />
|
||||
<File Id="_67" Source="..\bin\release\SharpKml.dll" />
|
||||
<File Id="_68" Source="..\bin\release\SharpKml.pdb" />
|
||||
<File Id="_69" Source="..\bin\release\SharpKml.xml" />
|
||||
<File Id="_70" Source="..\bin\release\System.Data.SQLite.dll" />
|
||||
<File Id="_71" Source="..\bin\release\System.Reactive.dll" />
|
||||
<File Id="_72" Source="..\bin\release\System.Reactive.xml" />
|
||||
<File Id="_73" Source="..\bin\release\System.Speech.dll" />
|
||||
<File Id="_74" Source="..\bin\release\Transitions.dll" />
|
||||
<File Id="_75" Source="..\bin\release\Updater.exe" />
|
||||
<File Id="_76" Source="..\bin\release\Updater.exe.config" />
|
||||
<File Id="_77" Source="..\bin\release\Updater.pdb" />
|
||||
<File Id="_78" Source="..\bin\release\version.exe" />
|
||||
<File Id="_79" Source="..\bin\release\version.txt" />
|
||||
<File Id="_80" Source="..\bin\release\ZedGraph.dll" />
|
||||
<File Id="_65" Source="..\bin\release\SharpKml.dll" />
|
||||
<File Id="_66" Source="..\bin\release\SharpKml.pdb" />
|
||||
<File Id="_67" Source="..\bin\release\SharpKml.xml" />
|
||||
<File Id="_68" Source="..\bin\release\System.Data.SQLite.dll" />
|
||||
<File Id="_69" Source="..\bin\release\System.Reactive.dll" />
|
||||
<File Id="_70" Source="..\bin\release\System.Reactive.xml" />
|
||||
<File Id="_71" Source="..\bin\release\System.Speech.dll" />
|
||||
<File Id="_72" Source="..\bin\release\Transitions.dll" />
|
||||
<File Id="_73" Source="..\bin\release\Updater.exe" />
|
||||
<File Id="_74" Source="..\bin\release\Updater.exe.config" />
|
||||
<File Id="_75" Source="..\bin\release\Updater.pdb" />
|
||||
<File Id="_76" Source="..\bin\release\version.exe" />
|
||||
<File Id="_77" Source="..\bin\release\version.txt" />
|
||||
<File Id="_78" Source="..\bin\release\ZedGraph.dll" />
|
||||
</Component>
|
||||
<Directory Id="aircraft80" Name="aircraft">
|
||||
<Component Id="_comp81" Guid="937e663c-1477-41c3-8db9-28421c35edf8">
|
||||
<File Id="_82" Source="..\bin\release\aircraft\placeholder.txt" />
|
||||
<Directory Id="aircraft78" Name="aircraft">
|
||||
<Component Id="_comp79" Guid="df6ce645-ec84-4f3e-a498-3c333976ab92">
|
||||
<File Id="_80" Source="..\bin\release\aircraft\placeholder.txt" />
|
||||
</Component>
|
||||
<Directory Id="arducopter82" Name="arducopter">
|
||||
<Component Id="_comp83" Guid="79e4b778-df2d-4b85-9b30-330377b54e81">
|
||||
<File Id="_84" Source="..\bin\release\aircraft\arducopter\arducopter-set.xml" />
|
||||
<File Id="_85" Source="..\bin\release\aircraft\arducopter\arducopter.jpg" />
|
||||
<File Id="_86" Source="..\bin\release\aircraft\arducopter\arducopter.xml" />
|
||||
<File Id="_87" Source="..\bin\release\aircraft\arducopter\initfile.xml" />
|
||||
<File Id="_88" Source="..\bin\release\aircraft\arducopter\plus_quad2-set.xml" />
|
||||
<File Id="_89" Source="..\bin\release\aircraft\arducopter\plus_quad2.xml" />
|
||||
<File Id="_90" Source="..\bin\release\aircraft\arducopter\quad.nas" />
|
||||
<File Id="_91" Source="..\bin\release\aircraft\arducopter\README" />
|
||||
<Directory Id="arducopter80" Name="arducopter">
|
||||
<Component Id="_comp81" Guid="4845bf66-01c9-4601-bee7-b226c8046bf4">
|
||||
<File Id="_82" Source="..\bin\release\aircraft\arducopter\arducopter-set.xml" />
|
||||
<File Id="_83" Source="..\bin\release\aircraft\arducopter\arducopter.jpg" />
|
||||
<File Id="_84" Source="..\bin\release\aircraft\arducopter\arducopter.xml" />
|
||||
<File Id="_85" Source="..\bin\release\aircraft\arducopter\initfile.xml" />
|
||||
<File Id="_86" Source="..\bin\release\aircraft\arducopter\plus_quad2-set.xml" />
|
||||
<File Id="_87" Source="..\bin\release\aircraft\arducopter\plus_quad2.xml" />
|
||||
<File Id="_88" Source="..\bin\release\aircraft\arducopter\quad.nas" />
|
||||
<File Id="_89" Source="..\bin\release\aircraft\arducopter\README" />
|
||||
</Component>
|
||||
<Directory Id="data91" Name="data">
|
||||
<Component Id="_comp92" Guid="44cf39a9-71df-492f-9b83-c2c2076f79bc">
|
||||
<File Id="_93" Source="..\bin\release\aircraft\arducopter\data\arducopter_half_step.txt" />
|
||||
<File Id="_94" Source="..\bin\release\aircraft\arducopter\data\arducopter_step.txt" />
|
||||
<File Id="_95" Source="..\bin\release\aircraft\arducopter\data\rw_generic_pylon.ac" />
|
||||
<Directory Id="data89" Name="data">
|
||||
<Component Id="_comp90" Guid="4bc20931-aa71-42f4-af95-8a4879d3b83e">
|
||||
<File Id="_91" Source="..\bin\release\aircraft\arducopter\data\arducopter_half_step.txt" />
|
||||
<File Id="_92" Source="..\bin\release\aircraft\arducopter\data\arducopter_step.txt" />
|
||||
<File Id="_93" Source="..\bin\release\aircraft\arducopter\data\rw_generic_pylon.ac" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="Engines95" Name="Engines">
|
||||
<Component Id="_comp96" Guid="354ecdad-7339-4361-b0fc-e1c264c4b9c5">
|
||||
<File Id="_97" Source="..\bin\release\aircraft\arducopter\Engines\a2830-12.xml" />
|
||||
<File Id="_98" Source="..\bin\release\aircraft\arducopter\Engines\prop10x4.5.xml" />
|
||||
<Directory Id="Engines93" Name="Engines">
|
||||
<Component Id="_comp94" Guid="4ad5527d-c704-460a-a4df-564a8707c9fd">
|
||||
<File Id="_95" Source="..\bin\release\aircraft\arducopter\Engines\a2830-12.xml" />
|
||||
<File Id="_96" Source="..\bin\release\aircraft\arducopter\Engines\prop10x4.5.xml" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="Models98" Name="Models">
|
||||
<Component Id="_comp99" Guid="fedc8251-7e93-42fe-bf2c-1ca4a9a45a54">
|
||||
<File Id="_100" Source="..\bin\release\aircraft\arducopter\Models\arducopter.ac" />
|
||||
<File Id="_101" Source="..\bin\release\aircraft\arducopter\Models\arducopter.xml" />
|
||||
<File Id="_102" Source="..\bin\release\aircraft\arducopter\Models\plus_quad.ac" />
|
||||
<File Id="_103" Source="..\bin\release\aircraft\arducopter\Models\plus_quad2.ac" />
|
||||
<File Id="_104" Source="..\bin\release\aircraft\arducopter\Models\plus_quad2.xml" />
|
||||
<File Id="_105" Source="..\bin\release\aircraft\arducopter\Models\quad.3ds" />
|
||||
<File Id="_106" Source="..\bin\release\aircraft\arducopter\Models\shareware_output.3ds" />
|
||||
<File Id="_107" Source="..\bin\release\aircraft\arducopter\Models\Untitled.ac" />
|
||||
<File Id="_108" Source="..\bin\release\aircraft\arducopter\Models\Y6_test.ac" />
|
||||
<Directory Id="Models96" Name="Models">
|
||||
<Component Id="_comp97" Guid="35ef65d9-7ee3-4ed2-8a70-c9be8301d98b">
|
||||
<File Id="_98" Source="..\bin\release\aircraft\arducopter\Models\arducopter.ac" />
|
||||
<File Id="_99" Source="..\bin\release\aircraft\arducopter\Models\arducopter.xml" />
|
||||
<File Id="_100" Source="..\bin\release\aircraft\arducopter\Models\plus_quad.ac" />
|
||||
<File Id="_101" Source="..\bin\release\aircraft\arducopter\Models\plus_quad2.ac" />
|
||||
<File Id="_102" Source="..\bin\release\aircraft\arducopter\Models\plus_quad2.xml" />
|
||||
<File Id="_103" Source="..\bin\release\aircraft\arducopter\Models\quad.3ds" />
|
||||
<File Id="_104" Source="..\bin\release\aircraft\arducopter\Models\shareware_output.3ds" />
|
||||
<File Id="_105" Source="..\bin\release\aircraft\arducopter\Models\Untitled.ac" />
|
||||
<File Id="_106" Source="..\bin\release\aircraft\arducopter\Models\Y6_test.ac" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="Rascal108" Name="Rascal">
|
||||
<Component Id="_comp109" Guid="298c761e-59ec-4f67-b2e9-cb0532e31ff5">
|
||||
<File Id="_110" Source="..\bin\release\aircraft\Rascal\Rascal-keyboard.xml" />
|
||||
<File Id="_111" Source="..\bin\release\aircraft\Rascal\Rascal-submodels.xml" />
|
||||
<File Id="_112" Source="..\bin\release\aircraft\Rascal\Rascal.xml" />
|
||||
<File Id="_113" Source="..\bin\release\aircraft\Rascal\Rascal110-JSBSim-set.xml" />
|
||||
<File Id="_114" Source="..\bin\release\aircraft\Rascal\Rascal110-JSBSim.xml" />
|
||||
<File Id="_115" Source="..\bin\release\aircraft\Rascal\Rascal110-splash.rgb" />
|
||||
<File Id="_116" Source="..\bin\release\aircraft\Rascal\README.Rascal" />
|
||||
<File Id="_117" Source="..\bin\release\aircraft\Rascal\reset_CMAC.xml" />
|
||||
<File Id="_118" Source="..\bin\release\aircraft\Rascal\thumbnail.jpg" />
|
||||
<Directory Id="Rascal106" Name="Rascal">
|
||||
<Component Id="_comp107" Guid="e12705ad-9a87-4402-8215-a1f516298b82">
|
||||
<File Id="_108" Source="..\bin\release\aircraft\Rascal\Rascal-keyboard.xml" />
|
||||
<File Id="_109" Source="..\bin\release\aircraft\Rascal\Rascal-submodels.xml" />
|
||||
<File Id="_110" Source="..\bin\release\aircraft\Rascal\Rascal.xml" />
|
||||
<File Id="_111" Source="..\bin\release\aircraft\Rascal\Rascal110-JSBSim-set.xml" />
|
||||
<File Id="_112" Source="..\bin\release\aircraft\Rascal\Rascal110-JSBSim.xml" />
|
||||
<File Id="_113" Source="..\bin\release\aircraft\Rascal\Rascal110-splash.rgb" />
|
||||
<File Id="_114" Source="..\bin\release\aircraft\Rascal\README.Rascal" />
|
||||
<File Id="_115" Source="..\bin\release\aircraft\Rascal\reset_CMAC.xml" />
|
||||
<File Id="_116" Source="..\bin\release\aircraft\Rascal\thumbnail.jpg" />
|
||||
</Component>
|
||||
<Directory Id="Engines118" Name="Engines">
|
||||
<Component Id="_comp119" Guid="9ea00190-d9e9-4241-8e46-43f4ab3e218c">
|
||||
<File Id="_120" Source="..\bin\release\aircraft\Rascal\Engines\18x8.xml" />
|
||||
<File Id="_121" Source="..\bin\release\aircraft\Rascal\Engines\Zenoah_G-26A.xml" />
|
||||
<Directory Id="Engines116" Name="Engines">
|
||||
<Component Id="_comp117" Guid="54175779-45d8-4321-bb6a-d996f8e93a55">
|
||||
<File Id="_118" Source="..\bin\release\aircraft\Rascal\Engines\18x8.xml" />
|
||||
<File Id="_119" Source="..\bin\release\aircraft\Rascal\Engines\Zenoah_G-26A.xml" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="Models121" Name="Models">
|
||||
<Component Id="_comp122" Guid="6f7543bb-4fdf-4753-9ca5-32060bfe1931">
|
||||
<File Id="_123" Source="..\bin\release\aircraft\Rascal\Models\Rascal.rgb" />
|
||||
<File Id="_124" Source="..\bin\release\aircraft\Rascal\Models\Rascal110-000-013.ac" />
|
||||
<File Id="_125" Source="..\bin\release\aircraft\Rascal\Models\Rascal110.xml" />
|
||||
<File Id="_126" Source="..\bin\release\aircraft\Rascal\Models\smoke.png" />
|
||||
<File Id="_127" Source="..\bin\release\aircraft\Rascal\Models\smokeW.xml" />
|
||||
<File Id="_128" Source="..\bin\release\aircraft\Rascal\Models\Trajectory-Marker.ac" />
|
||||
<File Id="_129" Source="..\bin\release\aircraft\Rascal\Models\Trajectory-Marker.xml" />
|
||||
<Directory Id="Models119" Name="Models">
|
||||
<Component Id="_comp120" Guid="2d5f3c62-07d7-4bd4-9475-e65bdd47974d">
|
||||
<File Id="_121" Source="..\bin\release\aircraft\Rascal\Models\Rascal.rgb" />
|
||||
<File Id="_122" Source="..\bin\release\aircraft\Rascal\Models\Rascal110-000-013.ac" />
|
||||
<File Id="_123" Source="..\bin\release\aircraft\Rascal\Models\Rascal110.xml" />
|
||||
<File Id="_124" Source="..\bin\release\aircraft\Rascal\Models\smoke.png" />
|
||||
<File Id="_125" Source="..\bin\release\aircraft\Rascal\Models\smokeW.xml" />
|
||||
<File Id="_126" Source="..\bin\release\aircraft\Rascal\Models\Trajectory-Marker.ac" />
|
||||
<File Id="_127" Source="..\bin\release\aircraft\Rascal\Models\Trajectory-Marker.xml" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="Systems129" Name="Systems">
|
||||
<Component Id="_comp130" Guid="98eec223-3d58-493d-b3ca-86b87bf15b7b">
|
||||
<File Id="_131" Source="..\bin\release\aircraft\Rascal\Systems\110-autopilot.xml" />
|
||||
<File Id="_132" Source="..\bin\release\aircraft\Rascal\Systems\airdata.nas" />
|
||||
<File Id="_133" Source="..\bin\release\aircraft\Rascal\Systems\electrical.xml" />
|
||||
<File Id="_134" Source="..\bin\release\aircraft\Rascal\Systems\main.nas" />
|
||||
<File Id="_135" Source="..\bin\release\aircraft\Rascal\Systems\ugear.nas" />
|
||||
<Directory Id="Systems127" Name="Systems">
|
||||
<Component Id="_comp128" Guid="e3eafd18-aabe-42ad-9bd0-85abb070cc8b">
|
||||
<File Id="_129" Source="..\bin\release\aircraft\Rascal\Systems\110-autopilot.xml" />
|
||||
<File Id="_130" Source="..\bin\release\aircraft\Rascal\Systems\airdata.nas" />
|
||||
<File Id="_131" Source="..\bin\release\aircraft\Rascal\Systems\electrical.xml" />
|
||||
<File Id="_132" Source="..\bin\release\aircraft\Rascal\Systems\main.nas" />
|
||||
<File Id="_133" Source="..\bin\release\aircraft\Rascal\Systems\ugear.nas" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
<Directory Id="Driver135" Name="Driver">
|
||||
<Component Id="_comp136" Guid="726d716b-4f59-4279-b3b8-d3a4feedd955">
|
||||
<File Id="_137" Source="..\bin\release\Driver\Arduino MEGA 2560.inf" />
|
||||
<Directory Id="Driver133" Name="Driver">
|
||||
<Component Id="_comp134" Guid="55169111-e676-4f85-b41c-a31db018ea72">
|
||||
<File Id="_135" Source="..\bin\release\Driver\Arduino MEGA 2560.inf" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="es_ES137" Name="es-ES">
|
||||
<Component Id="_comp138" Guid="742f0915-4703-4fc2-83f0-b7d0a26818d1">
|
||||
<File Id="_139" Source="..\bin\release\es-ES\ArdupilotMegaPlanner10.resources.dll" />
|
||||
<Directory Id="es_ES135" Name="es-ES">
|
||||
<Component Id="_comp136" Guid="71eba501-12fa-4e9a-822d-86aa58b2948f">
|
||||
<File Id="_137" Source="..\bin\release\es-ES\ArdupilotMegaPlanner10.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="fr139" Name="fr">
|
||||
<Component Id="_comp140" Guid="338b72e0-a18c-416c-92b8-69258b7076b7">
|
||||
<File Id="_141" Source="..\bin\release\fr\ArdupilotMegaPlanner10.resources.dll" />
|
||||
<Directory Id="fr137" Name="fr">
|
||||
<Component Id="_comp138" Guid="4c38c69a-5d19-444c-8b1d-a06aeec16c70">
|
||||
<File Id="_139" Source="..\bin\release\fr\ArdupilotMegaPlanner10.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="it_IT141" Name="it-IT">
|
||||
<Component Id="_comp142" Guid="e83b71ed-67c7-42c2-b8b5-588e8511c2ca">
|
||||
<File Id="_143" Source="..\bin\release\it-IT\ArdupilotMegaPlanner10.resources.dll" />
|
||||
<Directory Id="it_IT139" Name="it-IT">
|
||||
<Component Id="_comp140" Guid="987445fe-8357-4e16-86bb-2bbad83996bb">
|
||||
<File Id="_141" Source="..\bin\release\it-IT\ArdupilotMegaPlanner10.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="jsbsim143" Name="jsbsim">
|
||||
<Component Id="_comp144" Guid="70619133-00c7-4e8e-ba27-d95e45e59174">
|
||||
<File Id="_145" Source="..\bin\release\jsbsim\fgout.xml" />
|
||||
<File Id="_146" Source="..\bin\release\jsbsim\rascal_test.xml" />
|
||||
<Directory Id="jsbsim141" Name="jsbsim">
|
||||
<Component Id="_comp142" Guid="d50d8011-0236-494c-9081-b9b0127f6001">
|
||||
<File Id="_143" Source="..\bin\release\jsbsim\fgout.xml" />
|
||||
<File Id="_144" Source="..\bin\release\jsbsim\rascal_test.xml" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="m3u146" Name="m3u">
|
||||
<Component Id="_comp147" Guid="09d6c520-34e5-4320-8696-158b122b4ef9">
|
||||
<File Id="_148" Source="..\bin\release\m3u\both.m3u" />
|
||||
<File Id="_149" Source="..\bin\release\m3u\GeoRefnetworklink.kml" />
|
||||
<File Id="_150" Source="..\bin\release\m3u\hud.m3u" />
|
||||
<File Id="_151" Source="..\bin\release\m3u\map.m3u" />
|
||||
<File Id="_152" Source="..\bin\release\m3u\networklink.kml" />
|
||||
<Directory Id="m3u144" Name="m3u">
|
||||
<Component Id="_comp145" Guid="38eb3420-35be-4736-9089-ae935db0d957">
|
||||
<File Id="_146" Source="..\bin\release\m3u\both.m3u" />
|
||||
<File Id="_147" Source="..\bin\release\m3u\GeoRefnetworklink.kml" />
|
||||
<File Id="_148" Source="..\bin\release\m3u\hud.m3u" />
|
||||
<File Id="_149" Source="..\bin\release\m3u\map.m3u" />
|
||||
<File Id="_150" Source="..\bin\release\m3u\networklink.kml" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="pl152" Name="pl">
|
||||
<Component Id="_comp153" Guid="a18e7331-9eec-40a5-a159-242c4b94f34e">
|
||||
<File Id="_154" Source="..\bin\release\pl\ArdupilotMegaPlanner10.resources.dll" />
|
||||
<Directory Id="pl150" Name="pl">
|
||||
<Component Id="_comp151" Guid="0f77a481-bd50-477c-8e58-c88beb432150">
|
||||
<File Id="_152" Source="..\bin\release\pl\ArdupilotMegaPlanner10.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="Resources154" Name="Resources">
|
||||
<Component Id="_comp155" Guid="6bdbafb9-758f-4d9c-a05d-c141444e2606">
|
||||
<File Id="_156" Source="..\bin\release\Resources\MAVCmd.txt" />
|
||||
<File Id="_157" Source="..\bin\release\Resources\Welcome_to_Michael_Oborne.rtf" />
|
||||
<Directory Id="Resources152" Name="Resources">
|
||||
<Component Id="_comp153" Guid="464dcaaa-af87-4e12-b682-adaf6fbafa27">
|
||||
<File Id="_154" Source="..\bin\release\Resources\MAVCmd.txt" />
|
||||
<File Id="_155" Source="..\bin\release\Resources\Welcome_to_Michael_Oborne.rtf" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="ru_RU157" Name="ru-RU">
|
||||
<Component Id="_comp158" Guid="c9e58446-bf33-4d06-82f4-9288c71a3a23">
|
||||
<File Id="_159" Source="..\bin\release\ru-RU\ArdupilotMegaPlanner10.resources.dll" />
|
||||
<Directory Id="ru_RU155" Name="ru-RU">
|
||||
<Component Id="_comp156" Guid="46cb98a1-f305-4671-9e8c-cc3b2c415753">
|
||||
<File Id="_157" Source="..\bin\release\ru-RU\ArdupilotMegaPlanner10.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="zh_Hans159" Name="zh-Hans">
|
||||
<Component Id="_comp160" Guid="d4d2dfdd-1669-4db9-9206-c7b31ca54a37">
|
||||
<File Id="_161" Source="..\bin\release\zh-Hans\ArdupilotMegaPlanner10.resources.dll" />
|
||||
<Directory Id="zh_Hans157" Name="zh-Hans">
|
||||
<Component Id="_comp158" Guid="8c95775f-5d01-48a4-8e9b-3e0453d3f9f3">
|
||||
<File Id="_159" Source="..\bin\release\zh-Hans\ArdupilotMegaPlanner10.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="zh_TW161" Name="zh-TW">
|
||||
<Component Id="_comp162" Guid="29650cfa-23a1-4c74-b963-877104b50f78">
|
||||
<File Id="_163" Source="..\bin\release\zh-TW\ArdupilotMegaPlanner10.resources.dll" />
|
||||
<Directory Id="zh_TW159" Name="zh-TW">
|
||||
<Component Id="_comp160" Guid="5f9fc027-04e8-418a-9b5b-bc6d3046681b">
|
||||
<File Id="_161" Source="..\bin\release\zh-TW\ArdupilotMegaPlanner10.resources.dll" />
|
||||
</Component>
|
||||
</Directory>
|
||||
|
||||
@ -296,26 +294,26 @@
|
||||
<ComponentRef Id="InstallDirPermissions" />
|
||||
|
||||
<ComponentRef Id="_comp1" />
|
||||
<ComponentRef Id="_comp79" />
|
||||
<ComponentRef Id="_comp81" />
|
||||
<ComponentRef Id="_comp83" />
|
||||
<ComponentRef Id="_comp92" />
|
||||
<ComponentRef Id="_comp96" />
|
||||
<ComponentRef Id="_comp99" />
|
||||
<ComponentRef Id="_comp109" />
|
||||
<ComponentRef Id="_comp119" />
|
||||
<ComponentRef Id="_comp122" />
|
||||
<ComponentRef Id="_comp130" />
|
||||
<ComponentRef Id="_comp90" />
|
||||
<ComponentRef Id="_comp94" />
|
||||
<ComponentRef Id="_comp97" />
|
||||
<ComponentRef Id="_comp107" />
|
||||
<ComponentRef Id="_comp117" />
|
||||
<ComponentRef Id="_comp120" />
|
||||
<ComponentRef Id="_comp128" />
|
||||
<ComponentRef Id="_comp134" />
|
||||
<ComponentRef Id="_comp136" />
|
||||
<ComponentRef Id="_comp138" />
|
||||
<ComponentRef Id="_comp140" />
|
||||
<ComponentRef Id="_comp142" />
|
||||
<ComponentRef Id="_comp144" />
|
||||
<ComponentRef Id="_comp147" />
|
||||
<ComponentRef Id="_comp145" />
|
||||
<ComponentRef Id="_comp151" />
|
||||
<ComponentRef Id="_comp153" />
|
||||
<ComponentRef Id="_comp155" />
|
||||
<ComponentRef Id="_comp156" />
|
||||
<ComponentRef Id="_comp158" />
|
||||
<ComponentRef Id="_comp160" />
|
||||
<ComponentRef Id="_comp162" />
|
||||
|
||||
|
||||
<ComponentRef Id="ApplicationShortcut" />
|
||||
|
@ -34,5 +34,5 @@ using System.Resources;
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.1.*")]
|
||||
[assembly: AssemblyFileVersion("1.2.8")]
|
||||
[assembly: AssemblyFileVersion("1.2.9")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("")]
|
||||
|
@ -169,6 +169,8 @@ SizeConst = 4)]
|
||||
static int nframes;
|
||||
static uint totalsize;
|
||||
System.IO.BufferedStream fd;
|
||||
DateTime start = DateTime.MinValue;
|
||||
int targetfps = 10;
|
||||
|
||||
public void avi_close()
|
||||
{
|
||||
@ -187,13 +189,15 @@ SizeConst = 4)]
|
||||
|
||||
nframes = 0;
|
||||
totalsize = 0;
|
||||
start = DateTime.Now;
|
||||
}
|
||||
|
||||
|
||||
/* add a jpeg frame to an AVI file */
|
||||
public void avi_add(u8[] buf, uint size)
|
||||
{
|
||||
Console.WriteLine(DateTime.Now.Millisecond + "avi frame");
|
||||
uint osize = size;
|
||||
Console.WriteLine(DateTime.Now.Millisecond + " avi frame");
|
||||
db_head db = new db_head { db = "00dc".ToCharArray(), size = size };
|
||||
fd.Write(StructureToByteArray(db), 0, Marshal.SizeOf(db));
|
||||
fd.Write(buf, 0, (int)size);
|
||||
@ -204,6 +208,12 @@ SizeConst = 4)]
|
||||
}
|
||||
nframes++;
|
||||
totalsize += size;
|
||||
|
||||
if (((DateTime.Now - start).TotalSeconds * targetfps) > nframes)
|
||||
{
|
||||
avi_add(buf, osize);
|
||||
Console.WriteLine("Extra frame");
|
||||
}
|
||||
}
|
||||
|
||||
void strcpy(ref char[] to,string orig)
|
||||
@ -214,6 +224,8 @@ SizeConst = 4)]
|
||||
/* finish writing the AVI file - filling in the header */
|
||||
public void avi_end(int width, int height, int fps)
|
||||
{
|
||||
targetfps = fps;
|
||||
|
||||
riff_head rh = new riff_head { riff = "RIFF".ToCharArray(), size = 0, avistr = "AVI ".ToCharArray() };
|
||||
list_head lh1 = new list_head { list = "LIST".ToCharArray(), size = 0, type = "hdrl".ToCharArray() };
|
||||
avi_head ah = new avi_head();
|
||||
|
175
Tools/ArdupilotMegaPlanner/Utilities/PathFind.cs
Normal file
175
Tools/ArdupilotMegaPlanner/Utilities/PathFind.cs
Normal file
@ -0,0 +1,175 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using GMap.NET;
|
||||
using AStar;
|
||||
|
||||
namespace ArdupilotMega.Utilities
|
||||
{
|
||||
class PathFind
|
||||
{
|
||||
public static List<PointLatLng> FindPath(PointLatLng start, List<GCSViews.FlightPlanner.linelatlng> list)
|
||||
{
|
||||
|
||||
Graph graph = new Graph();
|
||||
|
||||
Node home = new Node("Home", null, start.Lat, start.Lng);
|
||||
|
||||
Node destination = new Node("End", null, start.Lat, start.Lng);
|
||||
|
||||
graph.AddNode(home);
|
||||
graph.AddNode(destination);
|
||||
|
||||
int a = 0;
|
||||
|
||||
foreach (GCSViews.FlightPlanner.linelatlng line in list)
|
||||
{
|
||||
Node n1 = new Node(a.ToString(), null, line.p1.Lat, line.p1.Lng);
|
||||
a++;
|
||||
Node n2 = new Node(a.ToString(), null, line.p2.Lat, line.p2.Lng);
|
||||
a++;
|
||||
|
||||
graph.AddNode(n1);
|
||||
graph.AddNode(n2);
|
||||
|
||||
// add the home to point initial refrence - 1 way
|
||||
graph.AddDirectedEdge(home, n1, (int)GetDistance(start,line.p1));
|
||||
graph.AddDirectedEdge(home, n2, (int)GetDistance(start, line.p2));
|
||||
|
||||
// add points to destination
|
||||
graph.AddDirectedEdge(n1, destination, (int)GetDistance(start, line.p1));
|
||||
graph.AddDirectedEdge(n2, destination, (int)GetDistance(start, line.p2));
|
||||
|
||||
// 0 cost as it is a line
|
||||
graph.AddUndirectedEdge(n1, n2, 0);
|
||||
|
||||
foreach (GCSViews.FlightPlanner.linelatlng line2 in list)
|
||||
{
|
||||
Node n11 = new Node(a.ToString(), null, line2.p1.Lat, line2.p1.Lng);
|
||||
a++;
|
||||
Node n21 = new Node(a.ToString(), null, line2.p2.Lat, line2.p2.Lng);
|
||||
a++;
|
||||
|
||||
if (line.p1 == line2.p1 && line.p2 == line2.p2)
|
||||
continue;
|
||||
|
||||
graph.AddNode(n11);
|
||||
graph.AddNode(n21);
|
||||
|
||||
graph.AddUndirectedEdge(n1, n11, GetDistance(line.p1, line2.p1));
|
||||
graph.AddUndirectedEdge(n2, n11, GetDistance(line.p2, line2.p1));
|
||||
graph.AddUndirectedEdge(n1, n21, GetDistance(line.p1, line2.p2));
|
||||
graph.AddUndirectedEdge(n2, n21, GetDistance(line.p2, line2.p2));
|
||||
|
||||
// 0 cost
|
||||
graph.AddUndirectedEdge(n11, n21, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Function which tells us the exact distance between two neighbours.
|
||||
Func<Node, Node, double> distance = new Func<Node, Node, double>(PathFind.distance);
|
||||
|
||||
// Estimation/Heuristic function (Haversine distance)
|
||||
// It tells us the estimated distance between the last node on a proposed path and the destination node.
|
||||
Func<Node, double> haversineEstimation =
|
||||
n => Haversine.Distance(n, destination, DistanceType.km);
|
||||
|
||||
// foreach (GCSViews.FlightPlanner.linelatlng line in list)
|
||||
// {
|
||||
|
||||
Path<Node> shortestPath = AStar.AStar.FindPath(home, destination, distance, haversineEstimation);
|
||||
|
||||
// }
|
||||
|
||||
List<PointLatLng> shortest = new List<PointLatLng>();
|
||||
|
||||
foreach (Path<Node> path in shortestPath)
|
||||
{
|
||||
if (path.PreviousSteps != null)
|
||||
{
|
||||
shortest.Add(new PointLatLng(path.PreviousSteps.LastStep.Latitude, path.PreviousSteps.LastStep.Longitude));
|
||||
}
|
||||
}
|
||||
|
||||
return shortest;
|
||||
}
|
||||
|
||||
public static double distance(Node node1, Node node2)
|
||||
{
|
||||
return node1.Neighbors.Cast<EdgeToNeighbor>().Single(
|
||||
etn => etn.Neighbor.Key == node2.Key).Cost;
|
||||
}
|
||||
|
||||
|
||||
static PointLatLng findClosestPoint(PointLatLng start, GCSViews.FlightPlanner.linelatlng line)
|
||||
{
|
||||
List<PointLatLng> list = new List<PointLatLng>();
|
||||
list.Add(line.p1);
|
||||
list.Add(line.p2);
|
||||
|
||||
PointLatLng closest = findClosestPoint(start, list);
|
||||
|
||||
return closest;
|
||||
}
|
||||
|
||||
static PointLatLng findClosestPoint(PointLatLng start, List<PointLatLng> list)
|
||||
{
|
||||
PointLatLng answer = PointLatLng.Zero;
|
||||
double currentbest = double.MaxValue;
|
||||
|
||||
foreach (PointLatLng pnt in list)
|
||||
{
|
||||
double dist1 = GetDistance(start, pnt);
|
||||
|
||||
if (dist1 < currentbest)
|
||||
{
|
||||
answer = pnt;
|
||||
currentbest = dist1;
|
||||
}
|
||||
}
|
||||
|
||||
return answer;
|
||||
}
|
||||
|
||||
static GCSViews.FlightPlanner.linelatlng findClosestLine(PointLatLng start, List<GCSViews.FlightPlanner.linelatlng> list)
|
||||
{
|
||||
GCSViews.FlightPlanner.linelatlng answer = list[0];
|
||||
double shortest = double.MaxValue;
|
||||
|
||||
foreach (GCSViews.FlightPlanner.linelatlng line in list)
|
||||
{
|
||||
double ans1 = GetDistance(start, line.p1);
|
||||
double ans2 = GetDistance(start, line.p2);
|
||||
PointLatLng shorterpnt = ans1 < ans2 ? line.p1 : line.p2;
|
||||
|
||||
if (shortest > GetDistance(start, shorterpnt))
|
||||
{
|
||||
answer = line;
|
||||
shortest = GetDistance(start, shorterpnt);
|
||||
}
|
||||
}
|
||||
|
||||
return answer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calc Distance in M
|
||||
/// </summary>
|
||||
/// <param name="p2"></param>
|
||||
/// <returns>Distance in M</returns>
|
||||
public static double GetDistance(PointLatLng p1, PointLatLng p2)
|
||||
{
|
||||
double d = p1.Lat * 0.017453292519943295;
|
||||
double num2 = p1.Lng * 0.017453292519943295;
|
||||
double num3 = p2.Lat * 0.017453292519943295;
|
||||
double num4 = p2.Lng * 0.017453292519943295;
|
||||
double num5 = num4 - num2;
|
||||
double num6 = num3 - d;
|
||||
double num7 = Math.Pow(Math.Sin(num6 / 2.0), 2.0) + ((Math.Cos(d) * Math.Cos(num3)) * Math.Pow(Math.Sin(num5 / 2.0), 2.0));
|
||||
double num8 = 2.0 * Math.Atan2(Math.Sqrt(num7), Math.Sqrt(1.0 - num7));
|
||||
return (6371 * num8); // M
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user