This commit is contained in:
Chris Anderson 2012-01-11 11:02:32 -08:00
commit 88e7a3ea89
11 changed files with 240 additions and 528 deletions

View File

@ -262,8 +262,9 @@ namespace ArdupilotMega
LOITER = 5, // Hold a single location
RTL = 6, // AUTO control
CIRCLE = 7,
POSITION = 8
}
POSITION = 8,
LAND = 9 // AUTO control
}
public static void linearRegression()
{

View File

@ -440,6 +440,9 @@ namespace ArdupilotMega
case (byte)(100 + Common.ac2modes.CIRCLE):
mode = "Circle";
break;
case (byte)(100 + Common.ac2modes.LAND):
mode = "Land";
break;
case (byte)(100 + Common.ac2modes.POSITION):
mode = "Position";
break;

View File

@ -113,6 +113,7 @@
this.RAD_aerosimrc = new System.Windows.Forms.RadioButton();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.RAD_JSBSim = new System.Windows.Forms.RadioButton();
this.CHK_xplane10 = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.currentStateBindingSource)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
@ -701,10 +702,17 @@
this.RAD_JSBSim.UseVisualStyleBackColor = true;
this.RAD_JSBSim.CheckedChanged += new System.EventHandler(this.RAD_JSBSim_CheckedChanged);
//
// CHK_xplane10
//
resources.ApplyResources(this.CHK_xplane10, "CHK_xplane10");
this.CHK_xplane10.Name = "CHK_xplane10";
this.CHK_xplane10.UseVisualStyleBackColor = true;
//
// Simulation
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.CHK_xplane10);
this.Controls.Add(this.RAD_JSBSim);
this.Controls.Add(this.RAD_aerosimrc);
this.Controls.Add(this.CHK_heli);
@ -836,5 +844,6 @@
private System.Windows.Forms.RadioButton RAD_aerosimrc;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.RadioButton RAD_JSBSim;
private System.Windows.Forms.CheckBox CHK_xplane10;
}
}

View File

@ -793,12 +793,24 @@ namespace ArdupilotMega.GCSViews
count += 36; // 8 * float
}
att.pitch = (DATA[18][0] * deg2rad);
att.roll = (DATA[18][1] * deg2rad);
att.yaw = (DATA[18][2] * deg2rad);
att.pitchspeed = (DATA[17][0]);
att.rollspeed = (DATA[17][1]);
att.yawspeed = (DATA[17][2]);
bool xplane9 = !CHK_xplane10.Checked;
if (xplane9)
{
att.pitch = (DATA[18][0] * deg2rad);
att.roll = (DATA[18][1] * deg2rad);
att.yaw = (DATA[18][2] * deg2rad);
att.pitchspeed = (DATA[17][0]);
att.rollspeed = (DATA[17][1]);
att.yawspeed = (DATA[17][2]);
} else {
att.pitch = (DATA[17][0] * deg2rad);
att.roll = (DATA[17][1] * deg2rad);
att.yaw = (DATA[17][2] * deg2rad);
att.pitchspeed = (DATA[16][0]);
att.rollspeed = (DATA[16][1]);
att.yawspeed = (DATA[16][2]);
}
TimeSpan timediff = DateTime.Now - oldtime;
@ -809,10 +821,19 @@ namespace ArdupilotMega.GCSViews
//Console.WriteLine("{0:0.00000} {1:0.00000} {2:0.00000} \t {3:0.00000} {4:0.00000} {5:0.00000}", pdiff, rdiff, ydiff, DATA[17][0], DATA[17][1], DATA[17][2]);
oldatt = att;
if (xplane9)
{
rdiff = DATA[17][1];
pdiff = DATA[17][0];
ydiff = DATA[17][2];
}
else
{
rdiff = DATA[16][1];
pdiff = DATA[16][0];
ydiff = DATA[16][2];
rdiff = DATA[17][1];
pdiff = DATA[17][0];
ydiff = DATA[17][2];
}
Int16 xgyro = Constrain(rdiff * 1000.0, Int16.MinValue, Int16.MaxValue);
Int16 ygyro = Constrain(pdiff * 1000.0, Int16.MinValue, Int16.MaxValue);
@ -1434,7 +1455,15 @@ namespace ArdupilotMega.GCSViews
{
if (RAD_softXplanes.Checked)
{
updateScreenDisplay(DATA[20][0] * deg2rad, DATA[20][1] * deg2rad, DATA[20][2] * .3048, DATA[18][1] * deg2rad, DATA[18][0] * deg2rad, DATA[19][2] * deg2rad, DATA[18][2] * deg2rad, roll_out, pitch_out, rudder_out, throttle_out);
bool xplane9 = !CHK_xplane10.Checked;
if (xplane9)
{
updateScreenDisplay(DATA[20][0] * deg2rad, DATA[20][1] * deg2rad, DATA[20][2] * .3048, DATA[18][1] * deg2rad, DATA[18][0] * deg2rad, DATA[19][2] * deg2rad, DATA[18][2] * deg2rad, roll_out, pitch_out, rudder_out, throttle_out);
} else {
updateScreenDisplay(DATA[20][0] * deg2rad, DATA[20][1] * deg2rad, DATA[20][2] * .3048, DATA[17][1] * deg2rad, DATA[17][0] * deg2rad, DATA[18][2] * deg2rad, DATA[17][2] * deg2rad, roll_out, pitch_out, rudder_out, throttle_out);
}
}
if (RAD_softFlightGear.Checked || RAD_JSBSim.Checked)
@ -1558,7 +1587,7 @@ namespace ArdupilotMega.GCSViews
Array.Copy(BitConverter.GetBytes((float)(rudder_out * REV_rudder)), 0, Xplane, 53, 4);
Array.Copy(BitConverter.GetBytes((int)-999), 0, Xplane, 57, 4);
Array.Copy(BitConverter.GetBytes((float)(roll_out * REV_roll * 5)), 0, Xplane, 61, 4);
Array.Copy(BitConverter.GetBytes((float)(roll_out * REV_roll * 0.5)), 0, Xplane, 61, 4);
Array.Copy(BitConverter.GetBytes((int)-999), 0, Xplane, 65, 4);
Array.Copy(BitConverter.GetBytes((int)-999), 0, Xplane, 69, 4);
Array.Copy(BitConverter.GetBytes((int)-999), 0, Xplane, 73, 4);

View File

@ -144,7 +144,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHKREV_roll.ZOrder" xml:space="preserve">
<value>30</value>
<value>31</value>
</data>
<data name="CHKREV_pitch.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -171,7 +171,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHKREV_pitch.ZOrder" xml:space="preserve">
<value>29</value>
<value>30</value>
</data>
<data name="CHKREV_rudder.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -198,7 +198,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHKREV_rudder.ZOrder" xml:space="preserve">
<value>28</value>
<value>29</value>
</data>
<data name="GPSrate.Items" xml:space="preserve">
<value>100</value>
@ -243,7 +243,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;GPSrate.ZOrder" xml:space="preserve">
<value>27</value>
<value>28</value>
</data>
<data name="ConnectComPort.Location" type="System.Drawing.Point, System.Drawing">
<value>26, 13</value>
@ -294,7 +294,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;OutputLog.ZOrder" xml:space="preserve">
<value>26</value>
<value>27</value>
</data>
<data name="TXT_roll.Location" type="System.Drawing.Point, System.Drawing">
<value>67, 22</value>
@ -510,11 +510,8 @@
<value>$this</value>
</data>
<data name="&gt;&gt;SaveSettings.ZOrder" xml:space="preserve">
<value>25</value>
<value>26</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>301, 17</value>
</metadata>
<data name="RAD_softXplanes.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -530,6 +527,9 @@
<data name="RAD_softXplanes.Text" xml:space="preserve">
<value>X-plane</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>301, 17</value>
</metadata>
<data name="RAD_softXplanes.ToolTip" xml:space="preserve">
<value>Can Do Plane/Quad with plugin</value>
</data>
@ -543,7 +543,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;RAD_softXplanes.ZOrder" xml:space="preserve">
<value>24</value>
<value>25</value>
</data>
<data name="RAD_softFlightGear.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -573,7 +573,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;RAD_softFlightGear.ZOrder" xml:space="preserve">
<value>23</value>
<value>24</value>
</data>
<data name="TXT_servoroll.Location" type="System.Drawing.Point, System.Drawing">
<value>67, 24</value>
@ -659,75 +659,6 @@
<data name="&gt;&gt;TXT_servothrottle.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="&gt;&gt;label4.Name" xml:space="preserve">
<value>label4</value>
</data>
<data name="&gt;&gt;label4.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label4.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 66</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 100</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>22</value>
</data>
<data name="label4.Location" type="System.Drawing.Point, System.Drawing">
<value>60, 3</value>
</data>
@ -824,98 +755,26 @@
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;label30.Name" xml:space="preserve">
<value>label30</value>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 66</value>
</data>
<data name="&gt;&gt;label30.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 100</value>
</data>
<data name="&gt;&gt;label30.Parent" xml:space="preserve">
<value>panel2</value>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="&gt;&gt;label30.ZOrder" xml:space="preserve">
<value>0</value>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;TXT_yaw.Name" xml:space="preserve">
<value>TXT_yaw</value>
</data>
<data name="&gt;&gt;TXT_yaw.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;TXT_yaw.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;TXT_yaw.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;label11.Name" xml:space="preserve">
<value>label11</value>
</data>
<data name="&gt;&gt;label11.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label11.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;label11.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;label7.Name" xml:space="preserve">
<value>label7</value>
</data>
<data name="&gt;&gt;label7.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label7.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;label7.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="&gt;&gt;label6.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label6.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;label5.Name" xml:space="preserve">
<value>label5</value>
</data>
<data name="&gt;&gt;label5.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label5.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 172</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 116</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>21</value>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>23</value>
</data>
<data name="label30.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 100</value>
@ -1058,6 +917,27 @@
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 172</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 116</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>24</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>22</value>
</data>
<data name="label8.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 27</value>
</data>
@ -1130,87 +1010,6 @@
<data name="&gt;&gt;label10.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;label16.Name" xml:space="preserve">
<value>label16</value>
</data>
<data name="&gt;&gt;label16.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label16.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label16.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;label15.Name" xml:space="preserve">
<value>label15</value>
</data>
<data name="&gt;&gt;label15.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label15.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label15.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;label14.Name" xml:space="preserve">
<value>label14</value>
</data>
<data name="&gt;&gt;label14.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label14.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label14.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;label13.Name" xml:space="preserve">
<value>label13</value>
</data>
<data name="&gt;&gt;label13.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label13.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label13.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;label12.Name" xml:space="preserve">
<value>label12</value>
</data>
<data name="&gt;&gt;label12.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label12.Parent" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;label12.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 294</value>
</data>
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 122</value>
</data>
<data name="panel3.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="&gt;&gt;panel3.Name" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;panel3.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>20</value>
</data>
<data name="label16.Location" type="System.Drawing.Point, System.Drawing">
<value>50, 8</value>
</data>
@ -1331,86 +1130,26 @@
<data name="&gt;&gt;label12.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;label20.Name" xml:space="preserve">
<value>label20</value>
<data name="panel3.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 294</value>
</data>
<data name="&gt;&gt;label20.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label20.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;label20.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;label19.Name" xml:space="preserve">
<value>label19</value>
</data>
<data name="&gt;&gt;label19.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label19.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;label19.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;TXT_control_mode.Name" xml:space="preserve">
<value>TXT_control_mode</value>
</data>
<data name="&gt;&gt;TXT_control_mode.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;TXT_control_mode.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;TXT_control_mode.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;TXT_WP.Name" xml:space="preserve">
<value>TXT_WP</value>
</data>
<data name="&gt;&gt;TXT_WP.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;TXT_WP.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;TXT_WP.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;label18.Name" xml:space="preserve">
<value>label18</value>
</data>
<data name="&gt;&gt;label18.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label18.Parent" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;label18.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="panel4.Location" type="System.Drawing.Point, System.Drawing">
<value>197, 294</value>
</data>
<data name="panel4.Size" type="System.Drawing.Size, System.Drawing">
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 122</value>
</data>
<data name="panel4.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
<data name="panel3.TabIndex" type="System.Int32, mscorlib">
<value>25</value>
</data>
<data name="&gt;&gt;panel4.Name" xml:space="preserve">
<value>panel4</value>
<data name="&gt;&gt;panel3.Name" xml:space="preserve">
<value>panel3</value>
</data>
<data name="&gt;&gt;panel4.Type" xml:space="preserve">
<data name="&gt;&gt;panel3.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel4.Parent" xml:space="preserve">
<data name="&gt;&gt;panel3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel4.ZOrder" xml:space="preserve">
<value>19</value>
<data name="&gt;&gt;panel3.ZOrder" xml:space="preserve">
<value>21</value>
</data>
<data name="label20.Location" type="System.Drawing.Point, System.Drawing">
<value>72, 104</value>
@ -1526,6 +1265,27 @@
<data name="&gt;&gt;label18.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="panel4.Location" type="System.Drawing.Point, System.Drawing">
<value>197, 294</value>
</data>
<data name="panel4.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 122</value>
</data>
<data name="panel4.TabIndex" type="System.Int32, mscorlib">
<value>26</value>
</data>
<data name="&gt;&gt;panel4.Name" xml:space="preserve">
<value>panel4</value>
</data>
<data name="&gt;&gt;panel4.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel4.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel4.ZOrder" xml:space="preserve">
<value>20</value>
</data>
<data name="label17.Location" type="System.Drawing.Point, System.Drawing">
<value>535, 9</value>
</data>
@ -1548,7 +1308,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;label17.ZOrder" xml:space="preserve">
<value>18</value>
<value>19</value>
</data>
<data name="panel5.Location" type="System.Drawing.Point, System.Drawing">
<value>13, 5</value>
@ -1569,7 +1329,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;panel5.ZOrder" xml:space="preserve">
<value>17</value>
<value>18</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="zg1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
@ -1594,176 +1354,11 @@
<value>$this</value>
</data>
<data name="&gt;&gt;zg1.ZOrder" xml:space="preserve">
<value>16</value>
<value>17</value>
</data>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="&gt;&gt;label28.Name" xml:space="preserve">
<value>label28</value>
</data>
<data name="&gt;&gt;label28.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label28.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;label28.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;label29.Name" xml:space="preserve">
<value>label29</value>
</data>
<data name="&gt;&gt;label29.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label29.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;label29.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;label27.Name" xml:space="preserve">
<value>label27</value>
</data>
<data name="&gt;&gt;label27.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label27.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;label27.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;label25.Name" xml:space="preserve">
<value>label25</value>
</data>
<data name="&gt;&gt;label25.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label25.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;label25.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;TXT_throttlegain.Name" xml:space="preserve">
<value>TXT_throttlegain</value>
</data>
<data name="&gt;&gt;TXT_throttlegain.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TXT_throttlegain.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;TXT_throttlegain.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="&gt;&gt;label24.Name" xml:space="preserve">
<value>label24</value>
</data>
<data name="&gt;&gt;label24.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label24.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;label24.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="&gt;&gt;label23.Name" xml:space="preserve">
<value>label23</value>
</data>
<data name="&gt;&gt;label23.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label23.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;label23.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="&gt;&gt;label22.Name" xml:space="preserve">
<value>label22</value>
</data>
<data name="&gt;&gt;label22.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label22.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;label22.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="&gt;&gt;label21.Name" xml:space="preserve">
<value>label21</value>
</data>
<data name="&gt;&gt;label21.Type" xml:space="preserve">
<value>ArdupilotMega.MyLabel, ArdupilotMegaPlanner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=38326cb7e06851fc</value>
</data>
<data name="&gt;&gt;label21.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;label21.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="&gt;&gt;TXT_ruddergain.Name" xml:space="preserve">
<value>TXT_ruddergain</value>
</data>
<data name="&gt;&gt;TXT_ruddergain.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TXT_ruddergain.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;TXT_ruddergain.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="&gt;&gt;TXT_pitchgain.Name" xml:space="preserve">
<value>TXT_pitchgain</value>
</data>
<data name="&gt;&gt;TXT_pitchgain.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TXT_pitchgain.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;TXT_pitchgain.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="&gt;&gt;TXT_rollgain.Name" xml:space="preserve">
<value>TXT_rollgain</value>
</data>
<data name="&gt;&gt;TXT_rollgain.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TXT_rollgain.Parent" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;TXT_rollgain.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="panel6.Location" type="System.Drawing.Point, System.Drawing">
<value>382, 294</value>
</data>
<data name="panel6.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 122</value>
</data>
<data name="panel6.TabIndex" type="System.Int32, mscorlib">
<value>30</value>
</data>
<data name="&gt;&gt;panel6.Name" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;panel6.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel6.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel6.ZOrder" xml:space="preserve">
<value>15</value>
</data>
<data name="label28.Location" type="System.Drawing.Point, System.Drawing">
<value>126, 76</value>
</data>
@ -2052,6 +1647,27 @@
<data name="&gt;&gt;TXT_rollgain.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="panel6.Location" type="System.Drawing.Point, System.Drawing">
<value>382, 294</value>
</data>
<data name="panel6.Size" type="System.Drawing.Size, System.Drawing">
<value>178, 122</value>
</data>
<data name="panel6.TabIndex" type="System.Int32, mscorlib">
<value>30</value>
</data>
<data name="&gt;&gt;panel6.Name" xml:space="preserve">
<value>panel6</value>
</data>
<data name="&gt;&gt;panel6.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel6.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel6.ZOrder" xml:space="preserve">
<value>16</value>
</data>
<data name="label26.Location" type="System.Drawing.Point, System.Drawing">
<value>508, 330</value>
</data>
@ -2074,7 +1690,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;label26.ZOrder" xml:space="preserve">
<value>14</value>
<value>15</value>
</data>
<data name="CHKdisplayall.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -2101,7 +1717,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHKdisplayall.ZOrder" xml:space="preserve">
<value>13</value>
<value>14</value>
</data>
<data name="CHKgraphroll.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
@ -2131,7 +1747,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHKgraphroll.ZOrder" xml:space="preserve">
<value>12</value>
<value>13</value>
</data>
<data name="CHKgraphpitch.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
@ -2161,7 +1777,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHKgraphpitch.ZOrder" xml:space="preserve">
<value>11</value>
<value>12</value>
</data>
<data name="CHKgraphrudder.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
@ -2191,7 +1807,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHKgraphrudder.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="CHKgraphthrottle.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
@ -2221,7 +1837,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHKgraphthrottle.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<data name="but_advsettings.Location" type="System.Drawing.Point, System.Drawing">
<value>566, 368</value>
@ -2245,7 +1861,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;but_advsettings.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<data name="chkSensor.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -2272,7 +1888,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;chkSensor.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="CHK_quad.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -2302,7 +1918,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHK_quad.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="BUT_startfgquad.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@ -2329,7 +1945,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;BUT_startfgquad.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="BUT_startfgplane.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@ -2356,7 +1972,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;BUT_startfgplane.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="BUT_startxplane.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
@ -2383,7 +1999,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;BUT_startxplane.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="CHK_heli.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -2413,7 +2029,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CHK_heli.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="RAD_aerosimrc.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@ -2446,11 +2062,8 @@
<value>$this</value>
</data>
<data name="&gt;&gt;RAD_aerosimrc.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>301, 17</value>
</metadata>
<data name="RAD_JSBSim.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
@ -2482,6 +2095,36 @@
<value>$this</value>
</data>
<data name="&gt;&gt;RAD_JSBSim.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="CHK_xplane10.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="CHK_xplane10.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="CHK_xplane10.Location" type="System.Drawing.Point, System.Drawing">
<value>566, 237</value>
</data>
<data name="CHK_xplane10.Size" type="System.Drawing.Size, System.Drawing">
<value>74, 17</value>
</data>
<data name="CHK_xplane10.TabIndex" type="System.Int32, mscorlib">
<value>50</value>
</data>
<data name="CHK_xplane10.Text" xml:space="preserve">
<value>Xplane 10</value>
</data>
<data name="&gt;&gt;CHK_xplane10.Name" xml:space="preserve">
<value>CHK_xplane10</value>
</data>
<data name="&gt;&gt;CHK_xplane10.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;CHK_xplane10.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;CHK_xplane10.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">

View File

@ -455,6 +455,7 @@ namespace ArdupilotMega
Array.Reverse(datearray);
logfile.Write(datearray, 0, datearray.Length);
logfile.Write(packet, 0, i);
logfile.Flush();
}
}

View File

@ -641,6 +641,14 @@ namespace ArdupilotMega
{
givecomport = false;
if (comPort.BaseStream.IsOpen && cs.groundspeed > 4)
{
if (DialogResult.No == MessageBox.Show("Your model is still moving are you sure you want to disconnect?", "Disconnect", MessageBoxButtons.YesNo))
{
return;
}
}
if (comPort.BaseStream.IsOpen)
{
try

View File

@ -34,5 +34,5 @@ using System.Resources;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.1.19")]
[assembly: AssemblyFileVersion("1.1.20")]
[assembly: NeutralResourcesLanguageAttribute("")]

View File

@ -20,11 +20,11 @@ void sitl_setup(void);
int sitl_gps_pipe(void);
ssize_t sitl_gps_read(int fd, void *buf, size_t count);
void sitl_update_compass(float heading, float roll, float pitch, float yaw);
void sitl_update_gps(float latitude, float longitude, float altitude,
float speedN, float speedE, bool have_lock);
void sitl_update_gps(double latitude, double longitude, float altitude,
double speedN, double speedE, bool have_lock);
void sitl_update_adc(float roll, float pitch, float yaw,
float rollRate, float pitchRate, float yawRate,
float xAccel, float yAccel, float zAccel,
double rollRate, double pitchRate, double yawRate,
double xAccel, double yAccel, double zAccel,
float airspeed);
void sitl_setup_adc(void);
void sitl_update_barometer(float altitude);

View File

@ -40,10 +40,28 @@ static uint16_t airspeed_sensor(float airspeed)
average rates to cope with slow update rates.
inputs are in degrees
phi - roll
theta - pitch
psi - true heading
alpha - angle of attack
beta - side slip
phidot - roll rate
thetadot - pitch rate
psidot - yaw rate
v_north - north velocity in local/body frame
v_east - east velocity in local/body frame
v_down - down velocity in local/body frame
A_X_pilot - X accel in body frame
A_Y_pilot - Y accel in body frame
A_Z_pilot - Z accel in body frame
Note: doubles on high prec. stuff are preserved until the last moment
*/
void sitl_update_adc(float roll, float pitch, float yaw,
float rollRate, float pitchRate, float yawRate,
float xAccel, float yAccel, float zAccel,
void sitl_update_adc(float roll, float pitch, float yaw, // Relative to earth
double rollRate, double pitchRate,double yawRate, // Local to plane
double xAccel, double yAccel, double zAccel, // Local to plane
float airspeed)
{
static const uint8_t sensor_map[6] = { 1, 2, 0, 4, 5, 6 };
@ -55,9 +73,9 @@ void sitl_update_adc(float roll, float pitch, float yaw,
const float _gyro_gain_y = ToRad(0.41);
const float _gyro_gain_z = ToRad(0.41);
const float _accel_scale = 9.80665 / 423.8;
float adc[7];
float phi, theta, phiDot, thetaDot, psiDot;
float p, q, r;
double adc[7];
double phi, theta, phiDot, thetaDot, psiDot;
double p, q, r;
/* convert the angular velocities from earth frame to
body frame. Thanks to James Goppert for the formula

View File

@ -78,8 +78,8 @@ static void gps_send(uint8_t msgid, uint8_t *buf, uint16_t size)
/*
possibly send a new GPS UBLOX packet
*/
void sitl_update_gps(float latitude, float longitude, float altitude,
float speedN, float speedE, bool have_lock)
void sitl_update_gps(double latitude, double longitude, float altitude,
double speedN, double speedE, bool have_lock)
{
struct ubx_nav_posllh {
uint32_t time; // GPS msToW
@ -113,7 +113,7 @@ void sitl_update_gps(float latitude, float longitude, float altitude,
const uint8_t MSG_POSLLH = 0x2;
const uint8_t MSG_STATUS = 0x3;
const uint8_t MSG_VELNED = 0x12;
float lon_scale;
double lon_scale;
// 4Hz
if (millis() - gps_state.last_update < 250) {