APM Planner 1.0.89
new camera button in flight planner misc other
This commit is contained in:
parent
3f211121fe
commit
5bda22b805
407
Tools/ArdupilotMegaPlanner/Camera.Designer.cs
generated
407
Tools/ArdupilotMegaPlanner/Camera.Designer.cs
generated
@ -29,48 +29,59 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.num_agl = new System.Windows.Forms.NumericUpDown();
|
||||
this.num_megapixel = new System.Windows.Forms.NumericUpDown();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.num_focallength = new System.Windows.Forms.NumericUpDown();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.num_focalmultip = new System.Windows.Forms.NumericUpDown();
|
||||
this.TXT_fovH = new System.Windows.Forms.TextBox();
|
||||
this.TXT_fovV = new System.Windows.Forms.TextBox();
|
||||
this.TXT_fovD = new System.Windows.Forms.TextBox();
|
||||
this.TXT_fovAD = new System.Windows.Forms.TextBox();
|
||||
this.TXT_fovAV = new System.Windows.Forms.TextBox();
|
||||
this.TXT_fovAH = new System.Windows.Forms.TextBox();
|
||||
this.TXT_cmpixel = new System.Windows.Forms.TextBox();
|
||||
this.TXT_imgwidth = new System.Windows.Forms.TextBox();
|
||||
this.TXT_imgheight = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.TXT_sensheight = new System.Windows.Forms.TextBox();
|
||||
this.TXT_senswidth = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.num_overlap = new System.Windows.Forms.NumericUpDown();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.num_sidelap = new System.Windows.Forms.NumericUpDown();
|
||||
this.CHK_camdirection = new System.Windows.Forms.CheckBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.TXT_distacflphotos = new System.Windows.Forms.TextBox();
|
||||
this.TXT_distflphotos = new System.Windows.Forms.TextBox();
|
||||
this.CMB_camera = new System.Windows.Forms.ComboBox();
|
||||
this.BUT_save = new ArdupilotMega.MyButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_agl)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_megapixel)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_focallength)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_focalmultip)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_overlap)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_sidelap)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// num_agl
|
||||
//
|
||||
this.num_agl.Location = new System.Drawing.Point(12, 12);
|
||||
this.num_agl.Increment = new decimal(new int[] {
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_agl.Location = new System.Drawing.Point(12, 38);
|
||||
this.num_agl.Maximum = new decimal(new int[] {
|
||||
10000,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_agl.Name = "num_agl";
|
||||
this.num_agl.Size = new System.Drawing.Size(120, 20);
|
||||
this.num_agl.Size = new System.Drawing.Size(64, 20);
|
||||
this.num_agl.TabIndex = 1;
|
||||
this.num_agl.Value = new decimal(new int[] {
|
||||
200,
|
||||
@ -79,52 +90,24 @@
|
||||
0});
|
||||
this.num_agl.ValueChanged += new System.EventHandler(this.num_agl_ValueChanged);
|
||||
//
|
||||
// num_megapixel
|
||||
//
|
||||
this.num_megapixel.DecimalPlaces = 1;
|
||||
this.num_megapixel.Increment = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.num_megapixel.Location = new System.Drawing.Point(13, 38);
|
||||
this.num_megapixel.Name = "num_megapixel";
|
||||
this.num_megapixel.Size = new System.Drawing.Size(120, 20);
|
||||
this.num_megapixel.TabIndex = 2;
|
||||
this.num_megapixel.Value = new decimal(new int[] {
|
||||
8,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_megapixel.ValueChanged += new System.EventHandler(this.num_megapixel_ValueChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(140, 19);
|
||||
this.label2.Location = new System.Drawing.Point(82, 40);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(72, 13);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Height m (agl)";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(140, 45);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(95, 13);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "MegaPixel Camera";
|
||||
//
|
||||
// num_focallength
|
||||
//
|
||||
this.num_focallength.DecimalPlaces = 1;
|
||||
this.num_focallength.Increment = new decimal(new int[] {
|
||||
5,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.num_focallength.Location = new System.Drawing.Point(245, 12);
|
||||
this.num_focallength.Location = new System.Drawing.Point(12, 64);
|
||||
this.num_focallength.Maximum = new decimal(new int[] {
|
||||
180,
|
||||
0,
|
||||
@ -136,147 +119,90 @@
|
||||
0,
|
||||
0});
|
||||
this.num_focallength.Name = "num_focallength";
|
||||
this.num_focallength.Size = new System.Drawing.Size(120, 20);
|
||||
this.num_focallength.Size = new System.Drawing.Size(64, 20);
|
||||
this.num_focallength.TabIndex = 6;
|
||||
this.num_focallength.Value = new decimal(new int[] {
|
||||
35,
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_focallength.ValueChanged += new System.EventHandler(this.num_focallength_ValueChanged);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(242, 72);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(99, 13);
|
||||
this.label4.TabIndex = 8;
|
||||
this.label4.Text = "2 x tan-1( l / (2 x f) )";
|
||||
//
|
||||
// num_focalmultip
|
||||
//
|
||||
this.num_focalmultip.DecimalPlaces = 1;
|
||||
this.num_focalmultip.Increment = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.num_focalmultip.Location = new System.Drawing.Point(245, 38);
|
||||
this.num_focalmultip.Maximum = new decimal(new int[] {
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_focalmultip.Minimum = new decimal(new int[] {
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.num_focalmultip.Name = "num_focalmultip";
|
||||
this.num_focalmultip.Size = new System.Drawing.Size(120, 20);
|
||||
this.num_focalmultip.TabIndex = 9;
|
||||
this.num_focalmultip.Value = new decimal(new int[] {
|
||||
15,
|
||||
0,
|
||||
0,
|
||||
65536});
|
||||
this.num_focalmultip.ValueChanged += new System.EventHandler(this.num_focalmultip_ValueChanged);
|
||||
//
|
||||
// TXT_fovH
|
||||
//
|
||||
this.TXT_fovH.Location = new System.Drawing.Point(72, 138);
|
||||
this.TXT_fovH.Location = new System.Drawing.Point(361, 12);
|
||||
this.TXT_fovH.Name = "TXT_fovH";
|
||||
this.TXT_fovH.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_fovH.TabIndex = 10;
|
||||
//
|
||||
// TXT_fovV
|
||||
//
|
||||
this.TXT_fovV.Location = new System.Drawing.Point(72, 165);
|
||||
this.TXT_fovV.Location = new System.Drawing.Point(361, 39);
|
||||
this.TXT_fovV.Name = "TXT_fovV";
|
||||
this.TXT_fovV.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_fovV.TabIndex = 11;
|
||||
//
|
||||
// TXT_fovD
|
||||
//
|
||||
this.TXT_fovD.Location = new System.Drawing.Point(72, 192);
|
||||
this.TXT_fovD.Name = "TXT_fovD";
|
||||
this.TXT_fovD.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_fovD.TabIndex = 12;
|
||||
//
|
||||
// TXT_fovAD
|
||||
//
|
||||
this.TXT_fovAD.Location = new System.Drawing.Point(286, 192);
|
||||
this.TXT_fovAD.Name = "TXT_fovAD";
|
||||
this.TXT_fovAD.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_fovAD.TabIndex = 15;
|
||||
//
|
||||
// TXT_fovAV
|
||||
//
|
||||
this.TXT_fovAV.Location = new System.Drawing.Point(286, 165);
|
||||
this.TXT_fovAV.Location = new System.Drawing.Point(361, 92);
|
||||
this.TXT_fovAV.Name = "TXT_fovAV";
|
||||
this.TXT_fovAV.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_fovAV.TabIndex = 14;
|
||||
//
|
||||
// TXT_fovAH
|
||||
//
|
||||
this.TXT_fovAH.Location = new System.Drawing.Point(286, 138);
|
||||
this.TXT_fovAH.Location = new System.Drawing.Point(361, 65);
|
||||
this.TXT_fovAH.Name = "TXT_fovAH";
|
||||
this.TXT_fovAH.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_fovAH.TabIndex = 13;
|
||||
//
|
||||
// TXT_cmpixel
|
||||
//
|
||||
this.TXT_cmpixel.Location = new System.Drawing.Point(176, 218);
|
||||
this.TXT_cmpixel.Location = new System.Drawing.Point(361, 118);
|
||||
this.TXT_cmpixel.Name = "TXT_cmpixel";
|
||||
this.TXT_cmpixel.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_cmpixel.TabIndex = 16;
|
||||
//
|
||||
// TXT_imgwidth
|
||||
//
|
||||
this.TXT_imgwidth.Location = new System.Drawing.Point(93, 244);
|
||||
this.TXT_imgwidth.Location = new System.Drawing.Point(12, 90);
|
||||
this.TXT_imgwidth.Name = "TXT_imgwidth";
|
||||
this.TXT_imgwidth.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_imgwidth.Size = new System.Drawing.Size(64, 20);
|
||||
this.TXT_imgwidth.TabIndex = 17;
|
||||
this.TXT_imgwidth.Text = "4608";
|
||||
this.TXT_imgwidth.TextChanged += new System.EventHandler(this.TXT_imgwidth_TextChanged);
|
||||
//
|
||||
// TXT_imgheight
|
||||
//
|
||||
this.TXT_imgheight.Location = new System.Drawing.Point(255, 244);
|
||||
this.TXT_imgheight.Location = new System.Drawing.Point(12, 116);
|
||||
this.TXT_imgheight.Name = "TXT_imgheight";
|
||||
this.TXT_imgheight.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_imgheight.Size = new System.Drawing.Size(64, 20);
|
||||
this.TXT_imgheight.TabIndex = 18;
|
||||
this.TXT_imgheight.Text = "3456";
|
||||
this.TXT_imgheight.TextChanged += new System.EventHandler(this.TXT_imgheight_TextChanged);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(371, 19);
|
||||
this.label1.Location = new System.Drawing.Point(82, 71);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(69, 13);
|
||||
this.label1.TabIndex = 19;
|
||||
this.label1.Text = "Focal Length";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(371, 45);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(88, 13);
|
||||
this.label5.TabIndex = 20;
|
||||
this.label5.Text = "Frame Muli factor";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(9, 145);
|
||||
this.label6.Location = new System.Drawing.Point(298, 19);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(36, 13);
|
||||
this.label6.Size = new System.Drawing.Size(56, 13);
|
||||
this.label6.TabIndex = 21;
|
||||
this.label6.Text = "Dist H";
|
||||
this.label6.Text = "FOV H (m)";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(235, 145);
|
||||
this.label7.Location = new System.Drawing.Point(299, 72);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(45, 13);
|
||||
this.label7.TabIndex = 22;
|
||||
@ -285,43 +211,25 @@
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(236, 172);
|
||||
this.label8.Location = new System.Drawing.Point(300, 99);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(44, 13);
|
||||
this.label8.TabIndex = 23;
|
||||
this.label8.Text = "Angle V";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(235, 199);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(45, 13);
|
||||
this.label9.TabIndex = 24;
|
||||
this.label9.Text = "Angle D";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(10, 172);
|
||||
this.label10.Location = new System.Drawing.Point(299, 46);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(35, 13);
|
||||
this.label10.Size = new System.Drawing.Size(55, 13);
|
||||
this.label10.TabIndex = 25;
|
||||
this.label10.Text = "Dist V";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(10, 199);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(36, 13);
|
||||
this.label11.TabIndex = 26;
|
||||
this.label11.Text = "Dist D";
|
||||
this.label10.Text = "FOV V (m)";
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(125, 225);
|
||||
this.label12.Location = new System.Drawing.Point(299, 125);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(50, 13);
|
||||
this.label12.TabIndex = 27;
|
||||
@ -330,59 +238,212 @@
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Location = new System.Drawing.Point(37, 251);
|
||||
this.label13.Location = new System.Drawing.Point(82, 93);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(39, 13);
|
||||
this.label13.Size = new System.Drawing.Size(60, 13);
|
||||
this.label13.TabIndex = 28;
|
||||
this.label13.Text = "Pixel X";
|
||||
this.label13.Text = "Pixel Width";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(199, 253);
|
||||
this.label14.Location = new System.Drawing.Point(82, 119);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(39, 13);
|
||||
this.label14.Size = new System.Drawing.Size(63, 13);
|
||||
this.label14.TabIndex = 29;
|
||||
this.label14.Text = "Pixel Y";
|
||||
this.label14.Text = "Pixel Height";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(82, 171);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(74, 13);
|
||||
this.label3.TabIndex = 33;
|
||||
this.label3.Text = "Sensor Height";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(82, 145);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(71, 13);
|
||||
this.label4.TabIndex = 32;
|
||||
this.label4.Text = "Sensor Width";
|
||||
//
|
||||
// TXT_sensheight
|
||||
//
|
||||
this.TXT_sensheight.Location = new System.Drawing.Point(12, 168);
|
||||
this.TXT_sensheight.Name = "TXT_sensheight";
|
||||
this.TXT_sensheight.Size = new System.Drawing.Size(64, 20);
|
||||
this.TXT_sensheight.TabIndex = 31;
|
||||
this.TXT_sensheight.Text = "4.62";
|
||||
this.TXT_sensheight.TextChanged += new System.EventHandler(this.TXT_sensheight_TextChanged);
|
||||
//
|
||||
// TXT_senswidth
|
||||
//
|
||||
this.TXT_senswidth.Location = new System.Drawing.Point(12, 142);
|
||||
this.TXT_senswidth.Name = "TXT_senswidth";
|
||||
this.TXT_senswidth.Size = new System.Drawing.Size(64, 20);
|
||||
this.TXT_senswidth.TabIndex = 30;
|
||||
this.TXT_senswidth.Text = "6.16";
|
||||
this.TXT_senswidth.TextChanged += new System.EventHandler(this.TXT_senswidth_TextChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(82, 201);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(44, 13);
|
||||
this.label5.TabIndex = 35;
|
||||
this.label5.Text = "Overlap";
|
||||
//
|
||||
// num_overlap
|
||||
//
|
||||
this.num_overlap.DecimalPlaces = 1;
|
||||
this.num_overlap.Location = new System.Drawing.Point(12, 194);
|
||||
this.num_overlap.Name = "num_overlap";
|
||||
this.num_overlap.Size = new System.Drawing.Size(64, 20);
|
||||
this.num_overlap.TabIndex = 34;
|
||||
this.num_overlap.Value = new decimal(new int[] {
|
||||
60,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_overlap.ValueChanged += new System.EventHandler(this.num_overlap_ValueChanged);
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Location = new System.Drawing.Point(82, 227);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(42, 13);
|
||||
this.label15.TabIndex = 37;
|
||||
this.label15.Text = "Sidelap";
|
||||
//
|
||||
// num_sidelap
|
||||
//
|
||||
this.num_sidelap.DecimalPlaces = 1;
|
||||
this.num_sidelap.Location = new System.Drawing.Point(12, 220);
|
||||
this.num_sidelap.Name = "num_sidelap";
|
||||
this.num_sidelap.Size = new System.Drawing.Size(64, 20);
|
||||
this.num_sidelap.TabIndex = 36;
|
||||
this.num_sidelap.Value = new decimal(new int[] {
|
||||
30,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.num_sidelap.ValueChanged += new System.EventHandler(this.num_sidelap_ValueChanged);
|
||||
//
|
||||
// CHK_camdirection
|
||||
//
|
||||
this.CHK_camdirection.AutoSize = true;
|
||||
this.CHK_camdirection.Checked = true;
|
||||
this.CHK_camdirection.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.CHK_camdirection.Location = new System.Drawing.Point(13, 247);
|
||||
this.CHK_camdirection.Name = "CHK_camdirection";
|
||||
this.CHK_camdirection.Size = new System.Drawing.Size(150, 17);
|
||||
this.CHK_camdirection.TabIndex = 38;
|
||||
this.CHK_camdirection.Text = "Camera top facing forward";
|
||||
this.CHK_camdirection.UseVisualStyleBackColor = true;
|
||||
this.CHK_camdirection.CheckedChanged += new System.EventHandler(this.CHK_camdirection_CheckedChanged);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(261, 198);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(86, 13);
|
||||
this.label9.TabIndex = 42;
|
||||
this.label9.Text = "Across Flight line";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(261, 171);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(94, 13);
|
||||
this.label11.TabIndex = 41;
|
||||
this.label11.Text = "Flight line distance";
|
||||
//
|
||||
// TXT_distacflphotos
|
||||
//
|
||||
this.TXT_distacflphotos.Location = new System.Drawing.Point(361, 195);
|
||||
this.TXT_distacflphotos.Name = "TXT_distacflphotos";
|
||||
this.TXT_distacflphotos.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_distacflphotos.TabIndex = 40;
|
||||
//
|
||||
// TXT_distflphotos
|
||||
//
|
||||
this.TXT_distflphotos.Location = new System.Drawing.Point(361, 168);
|
||||
this.TXT_distflphotos.Name = "TXT_distflphotos";
|
||||
this.TXT_distflphotos.Size = new System.Drawing.Size(100, 20);
|
||||
this.TXT_distflphotos.TabIndex = 39;
|
||||
//
|
||||
// CMB_camera
|
||||
//
|
||||
this.CMB_camera.FormattingEnabled = true;
|
||||
this.CMB_camera.Location = new System.Drawing.Point(13, 13);
|
||||
this.CMB_camera.Name = "CMB_camera";
|
||||
this.CMB_camera.Size = new System.Drawing.Size(143, 21);
|
||||
this.CMB_camera.TabIndex = 43;
|
||||
this.CMB_camera.SelectedIndexChanged += new System.EventHandler(this.CMB_camera_SelectedIndexChanged);
|
||||
//
|
||||
// BUT_save
|
||||
//
|
||||
this.BUT_save.Location = new System.Drawing.Point(163, 10);
|
||||
this.BUT_save.Name = "BUT_save";
|
||||
this.BUT_save.Size = new System.Drawing.Size(75, 23);
|
||||
this.BUT_save.TabIndex = 44;
|
||||
this.BUT_save.Text = "Save";
|
||||
this.BUT_save.UseVisualStyleBackColor = true;
|
||||
this.BUT_save.Click += new System.EventHandler(this.BUT_save_Click);
|
||||
//
|
||||
// Camera
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(473, 275);
|
||||
this.Controls.Add(this.BUT_save);
|
||||
this.Controls.Add(this.CMB_camera);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.TXT_distacflphotos);
|
||||
this.Controls.Add(this.TXT_distflphotos);
|
||||
this.Controls.Add(this.CHK_camdirection);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.num_sidelap);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.num_overlap);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.TXT_sensheight);
|
||||
this.Controls.Add(this.TXT_senswidth);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.TXT_imgheight);
|
||||
this.Controls.Add(this.TXT_imgwidth);
|
||||
this.Controls.Add(this.TXT_cmpixel);
|
||||
this.Controls.Add(this.TXT_fovAD);
|
||||
this.Controls.Add(this.TXT_fovAV);
|
||||
this.Controls.Add(this.TXT_fovAH);
|
||||
this.Controls.Add(this.TXT_fovD);
|
||||
this.Controls.Add(this.TXT_fovV);
|
||||
this.Controls.Add(this.TXT_fovH);
|
||||
this.Controls.Add(this.num_focalmultip);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.num_focallength);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.num_megapixel);
|
||||
this.Controls.Add(this.num_agl);
|
||||
this.Name = "Camera";
|
||||
this.Text = "Camera";
|
||||
this.Load += new System.EventHandler(this.Camera_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_agl)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_megapixel)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_focallength)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_focalmultip)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_overlap)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.num_sidelap)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -391,31 +452,37 @@
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.NumericUpDown num_agl;
|
||||
private System.Windows.Forms.NumericUpDown num_megapixel;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.NumericUpDown num_focallength;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.NumericUpDown num_focalmultip;
|
||||
private System.Windows.Forms.TextBox TXT_fovH;
|
||||
private System.Windows.Forms.TextBox TXT_fovV;
|
||||
private System.Windows.Forms.TextBox TXT_fovD;
|
||||
private System.Windows.Forms.TextBox TXT_fovAD;
|
||||
private System.Windows.Forms.TextBox TXT_fovAV;
|
||||
private System.Windows.Forms.TextBox TXT_fovAH;
|
||||
private System.Windows.Forms.TextBox TXT_cmpixel;
|
||||
private System.Windows.Forms.TextBox TXT_imgwidth;
|
||||
private System.Windows.Forms.TextBox TXT_imgheight;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox TXT_sensheight;
|
||||
private System.Windows.Forms.TextBox TXT_senswidth;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.NumericUpDown num_overlap;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.NumericUpDown num_sidelap;
|
||||
private System.Windows.Forms.CheckBox CHK_camdirection;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.TextBox TXT_distacflphotos;
|
||||
private System.Windows.Forms.TextBox TXT_distflphotos;
|
||||
private System.Windows.Forms.ComboBox CMB_camera;
|
||||
private MyButton BUT_save;
|
||||
}
|
||||
}
|
@ -6,114 +6,73 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Collections;
|
||||
|
||||
namespace ArdupilotMega
|
||||
{
|
||||
public partial class Camera : Form
|
||||
{
|
||||
float mm_2_feet = 1 / 304.8f;
|
||||
float feet_2_mm = 304.8f;
|
||||
const float rad2deg = (float)(180 / Math.PI);
|
||||
const float deg2rad = (float)(1.0 / rad2deg);
|
||||
|
||||
Dictionary<string, camerainfo> cameras = new Dictionary<string, camerainfo>();
|
||||
|
||||
public struct camerainfo
|
||||
{
|
||||
public string name;
|
||||
public float focallen;
|
||||
public float sensorwidth;
|
||||
public float sensorheight;
|
||||
public float imagewidth;
|
||||
public float imageheight;
|
||||
}
|
||||
|
||||
public Camera()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
void doCalc()
|
||||
{
|
||||
// entered values
|
||||
float focallen = (float)num_focallength.Value;
|
||||
float flyalt = (float)num_agl.Value;
|
||||
int imagewidth = int.Parse(TXT_imgwidth.Text);
|
||||
int imageheight = int.Parse(TXT_imgheight.Text);
|
||||
|
||||
var film_width = 36.0f;
|
||||
var film_height = 27.0f;
|
||||
var film_diag = 0.0f;
|
||||
float sensorwidth = float.Parse(TXT_senswidth.Text);
|
||||
float sensorheight = float.Parse(TXT_sensheight.Text);
|
||||
|
||||
var flen = (float)num_focallength.Value;
|
||||
var flen_mult = (float)num_focalmultip.Value;
|
||||
var subj_dist = (float)num_agl.Value;
|
||||
int overlap = (int)num_overlap.Value;
|
||||
int sidelap = (int)num_sidelap.Value;
|
||||
|
||||
//if (isNaN(flen_mult) || flen_mult<=0)
|
||||
|
||||
// scale
|
||||
float flscale = 1000 * flyalt / focallen;
|
||||
|
||||
float viewwidth = (sensorwidth * flscale / 1000);
|
||||
float viewheight = (sensorheight * flscale / 1000);
|
||||
|
||||
TXT_fovH.Text = (viewwidth).ToString();
|
||||
TXT_fovV.Text = (viewheight).ToString();
|
||||
|
||||
TXT_fovAH.Text = (Math.Atan(sensorwidth / (2 * focallen)) * rad2deg * 2).ToString();
|
||||
TXT_fovAV.Text = (Math.Atan(sensorheight / (2 * focallen)) * rad2deg * 2).ToString();
|
||||
|
||||
TXT_cmpixel.Text = ((viewheight / imageheight) * 100).ToString("0.00 cm");
|
||||
|
||||
if (CHK_camdirection.Checked)
|
||||
{
|
||||
//f.flen_mult = 1;
|
||||
//flen_mult = 1;
|
||||
TXT_distflphotos.Text = ((1 - (overlap / 100.0f)) * viewheight).ToString();
|
||||
TXT_distacflphotos.Text = ((1 - (sidelap / 100.0f)) * viewwidth).ToString();
|
||||
}
|
||||
|
||||
// convert distance to mm
|
||||
/*
|
||||
if (f.units.value.search(/feet/i) != -1)
|
||||
{
|
||||
//user input in feet
|
||||
subj_dist = subj_dist * feet_2_mm;
|
||||
}
|
||||
else */
|
||||
else
|
||||
{
|
||||
//user input in m
|
||||
subj_dist = subj_dist * 1000;
|
||||
TXT_distflphotos.Text = ((1 - (overlap / 100.0f)) * viewwidth).ToString();
|
||||
TXT_distacflphotos.Text = ((1 - (sidelap / 100.0f)) * viewheight).ToString();
|
||||
}
|
||||
|
||||
//Account for focal length multiplier (actually, a film/sensor size multiplier)
|
||||
film_width = film_width / flen_mult;
|
||||
film_height = film_height / flen_mult;
|
||||
film_diag = (int)(Math.Sqrt((film_width * film_width) + (film_height * film_height)));
|
||||
|
||||
var half_fov_h = (Math.Atan(film_width / (2 * flen)));
|
||||
var fov_h = 2 * (subj_dist * Math.Tan(half_fov_h));
|
||||
|
||||
var half_fov_v = (Math.Atan(film_height / (2 * flen)));
|
||||
var fov_v = 2 * (subj_dist * Math.Tan(half_fov_v));
|
||||
|
||||
var half_fov_d = (Math.Atan(film_diag / (2 * flen)));
|
||||
var fov_d = 2 * (subj_dist * Math.Tan(half_fov_d));
|
||||
|
||||
//convert answer (currently in mm) back to feet
|
||||
fov_h = fov_h * mm_2_feet;
|
||||
fov_v = fov_v * mm_2_feet;
|
||||
fov_d = fov_d * mm_2_feet;
|
||||
/*
|
||||
if (f.units.value.search(/feet/i) != -1)
|
||||
{
|
||||
f.fov_h.value = feet_inches(fov_h);
|
||||
f.fov_v.value = feet_inches(fov_v);
|
||||
f.fov_d.value = feet_inches(fov_d);
|
||||
}
|
||||
else */
|
||||
{
|
||||
TXT_fovH.Text = meters(fov_h);
|
||||
TXT_fovV.Text = meters(fov_v);
|
||||
TXT_fovD.Text = meters(fov_d);
|
||||
|
||||
TXT_fovAH.Text = (half_fov_h * 2 * rad2deg).ToString("0.00");
|
||||
TXT_fovAV.Text = (half_fov_v * 2 * rad2deg).ToString("0.00");
|
||||
TXT_fovAD.Text = (half_fov_d * 2 * rad2deg).ToString("0.00");
|
||||
|
||||
float test1 = (float)Math.Sqrt((float)num_megapixel.Value * 1000000 * (film_height / film_width));
|
||||
|
||||
TXT_imgwidth.Text = test1.ToString("0");
|
||||
TXT_imgheight.Text = (((float)num_megapixel.Value * 1000000) / test1).ToString("0");
|
||||
|
||||
|
||||
TXT_cmpixel.Text = (((fov_h * feet_2_mm) / 10.0) / test1).ToString("0.000 cm");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Takes a distance in feet and converts to string representation in meters/cm
|
||||
string meters(double aNumber)
|
||||
{
|
||||
//if (isNaN(aNumber))
|
||||
//return aNumber;
|
||||
|
||||
var mm = aNumber * feet_2_mm;
|
||||
|
||||
var m = Math.Floor(mm / 1000);
|
||||
var cm = (mm / 10) % 100;
|
||||
|
||||
return m + "m " + cm.ToString("0.00") + "cm";
|
||||
}
|
||||
|
||||
private void num_agl_ValueChanged(object sender, EventArgs e)
|
||||
@ -121,19 +80,209 @@ namespace ArdupilotMega
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void num_megapixel_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void num_focallength_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void num_focalmultip_ValueChanged(object sender, EventArgs e)
|
||||
private void num_overlap_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void num_sidelap_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void CHK_camdirection_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void TXT_imgwidth_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void TXT_imgheight_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void TXT_senswidth_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void TXT_sensheight_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void CMB_camera_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cameras.ContainsKey(CMB_camera.Text))
|
||||
{
|
||||
camerainfo camera = cameras[CMB_camera.Text];
|
||||
|
||||
num_focallength.Value = (decimal)camera.focallen;
|
||||
TXT_imgheight.Text = camera.imageheight.ToString();
|
||||
TXT_imgwidth.Text = camera.imagewidth.ToString();
|
||||
TXT_sensheight.Text = camera.sensorheight.ToString();
|
||||
TXT_senswidth.Text = camera.sensorwidth.ToString();
|
||||
}
|
||||
|
||||
doCalc();
|
||||
}
|
||||
|
||||
private void xmlcamera(bool write)
|
||||
{
|
||||
string filename = "cameras.xml";
|
||||
|
||||
if (write || !File.Exists(Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar + filename))
|
||||
{
|
||||
try
|
||||
{
|
||||
XmlTextWriter xmlwriter = new XmlTextWriter(Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar + filename, Encoding.ASCII);
|
||||
xmlwriter.Formatting = Formatting.Indented;
|
||||
|
||||
xmlwriter.WriteStartDocument();
|
||||
|
||||
xmlwriter.WriteStartElement("Cameras");
|
||||
|
||||
foreach (string key in cameras.Keys)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (key == "")
|
||||
continue;
|
||||
xmlwriter.WriteStartElement("Camera");
|
||||
xmlwriter.WriteElementString("name", cameras[key].name);
|
||||
xmlwriter.WriteElementString("flen", cameras[key].focallen.ToString(new System.Globalization.CultureInfo("en-US")));
|
||||
xmlwriter.WriteElementString("imgh", cameras[key].imageheight.ToString(new System.Globalization.CultureInfo("en-US")));
|
||||
xmlwriter.WriteElementString("imgw", cameras[key].imagewidth.ToString(new System.Globalization.CultureInfo("en-US")));
|
||||
xmlwriter.WriteElementString("senh", cameras[key].sensorheight.ToString(new System.Globalization.CultureInfo("en-US")));
|
||||
xmlwriter.WriteElementString("senw", cameras[key].sensorwidth.ToString(new System.Globalization.CultureInfo("en-US")));
|
||||
xmlwriter.WriteEndElement();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
xmlwriter.WriteEndElement();
|
||||
|
||||
xmlwriter.WriteEndDocument();
|
||||
xmlwriter.Close();
|
||||
|
||||
}
|
||||
catch (Exception ex) { MessageBox.Show(ex.ToString()); }
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
using (XmlTextReader xmlreader = new XmlTextReader(Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar + filename))
|
||||
{
|
||||
while (xmlreader.Read())
|
||||
{
|
||||
xmlreader.MoveToElement();
|
||||
try
|
||||
{
|
||||
switch (xmlreader.Name)
|
||||
{
|
||||
case "Camera":
|
||||
{
|
||||
camerainfo camera = new camerainfo();
|
||||
|
||||
while (xmlreader.Read())
|
||||
{
|
||||
bool dobreak = false;
|
||||
xmlreader.MoveToElement();
|
||||
switch (xmlreader.Name)
|
||||
{
|
||||
case "name":
|
||||
camera.name = xmlreader.ReadString();
|
||||
break;
|
||||
case "imgw":
|
||||
camera.imagewidth = float.Parse(xmlreader.ReadString(), new System.Globalization.CultureInfo("en-US"));
|
||||
break;
|
||||
case "imgh":
|
||||
camera.imageheight = float.Parse(xmlreader.ReadString(), new System.Globalization.CultureInfo("en-US"));
|
||||
break;
|
||||
case "senw":
|
||||
camera.sensorwidth = float.Parse(xmlreader.ReadString(), new System.Globalization.CultureInfo("en-US"));
|
||||
break;
|
||||
case "senh":
|
||||
camera.sensorheight = float.Parse(xmlreader.ReadString(), new System.Globalization.CultureInfo("en-US"));
|
||||
break;
|
||||
case "flen":
|
||||
camera.focallen= float.Parse(xmlreader.ReadString(), new System.Globalization.CultureInfo("en-US"));
|
||||
break;
|
||||
case "Camera":
|
||||
cameras.Add(camera.name,camera);
|
||||
CMB_camera.Items.Add(camera.name);
|
||||
dobreak = true;
|
||||
break;
|
||||
}
|
||||
if (dobreak)
|
||||
break;
|
||||
}
|
||||
string temp = xmlreader.ReadString();
|
||||
}
|
||||
break;
|
||||
case "Config":
|
||||
break;
|
||||
case "xml":
|
||||
break;
|
||||
default:
|
||||
if (xmlreader.Name == "") // line feeds
|
||||
break;
|
||||
//config[xmlreader.Name] = xmlreader.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ee) { Console.WriteLine(ee.Message); } // silent fail on bad entry
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { Console.WriteLine("Bad Camera File: " + ex.ToString()); } // bad config file
|
||||
}
|
||||
}
|
||||
|
||||
private void BUT_save_Click(object sender, EventArgs e)
|
||||
{
|
||||
camerainfo camera = new camerainfo();
|
||||
|
||||
// check if camera exists alreay
|
||||
if (cameras.ContainsKey(CMB_camera.Text))
|
||||
{
|
||||
camera = cameras[CMB_camera.Text];
|
||||
}
|
||||
else
|
||||
{
|
||||
cameras.Add(CMB_camera.Text, camera);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
camera.name = CMB_camera.Text;
|
||||
camera.focallen = (float)num_focallength.Value;
|
||||
camera.imageheight = float.Parse(TXT_imgheight.Text);
|
||||
camera.imagewidth = float.Parse(TXT_imgwidth.Text);
|
||||
camera.sensorheight = float.Parse(TXT_sensheight.Text);
|
||||
camera.sensorwidth = float.Parse(TXT_senswidth.Text);
|
||||
}
|
||||
catch { MessageBox.Show("One of your entries is not a valid number"); return; }
|
||||
|
||||
cameras[CMB_camera.Text] = camera;
|
||||
|
||||
xmlcamera(true);
|
||||
}
|
||||
|
||||
private void Camera_Load(object sender, EventArgs e)
|
||||
{
|
||||
xmlcamera(false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -845,7 +845,10 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
((MyButton)sender).Enabled = true;
|
||||
startup = true;
|
||||
param = MainV2.comPort.param;
|
||||
processToScreen();
|
||||
Configuration_Load(null, null);
|
||||
startup = false;
|
||||
}
|
||||
|
||||
private void CHK_speechbattery_CheckedChanged(object sender, EventArgs e)
|
||||
|
@ -767,7 +767,8 @@ namespace ArdupilotMega.GCSViews
|
||||
}
|
||||
|
||||
string alt = (100 * MainV2.cs.multiplierdist).ToString("0");
|
||||
Common.InputBox("Enter Alt", "Enter Guided Mode Alt", ref alt);
|
||||
if (DialogResult.Cancel == Common.InputBox("Enter Alt", "Enter Guided Mode Alt", ref alt))
|
||||
return;
|
||||
|
||||
int intalt = (int)(100 * MainV2.cs.multiplierdist);
|
||||
if (!int.TryParse(alt, out intalt))
|
||||
@ -784,6 +785,7 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
Locationwp gotohere = new Locationwp();
|
||||
|
||||
gotohere.id = (byte)MAVLink.MAV_CMD.WAYPOINT;
|
||||
gotohere.alt = (int)(intalt / MainV2.cs.multiplierdist * 100); // back to m
|
||||
gotohere.lat = (int)(gotolocation.Lat * 10000000);
|
||||
gotohere.lng = (int)(gotolocation.Lng * 10000000);
|
||||
@ -863,7 +865,7 @@ namespace ArdupilotMega.GCSViews
|
||||
{
|
||||
OpenFileDialog fd = new OpenFileDialog();
|
||||
fd.AddExtension = true;
|
||||
fd.Filter = "Ardupilot Telemtry log (*.tlog)|*.tlog";
|
||||
fd.Filter = "Ardupilot Telemtry log (*.tlog)|*.tlog|Mavlink Log (*.mavlog)|*.mavlog";
|
||||
fd.InitialDirectory = Path.GetDirectoryName(Application.ExecutablePath) + Path.DirectorySeparatorChar + @"logs";
|
||||
fd.DefaultExt = ".tlog";
|
||||
DialogResult result = fd.ShowDialog();
|
||||
|
@ -31,14 +31,14 @@
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlightPlanner));
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.CHK_altmode = new System.Windows.Forms.CheckBox();
|
||||
this.CHK_holdalt = new System.Windows.Forms.CheckBox();
|
||||
this.Commands = new System.Windows.Forms.DataGridView();
|
||||
@ -116,6 +116,7 @@
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.panelBASE = new System.Windows.Forms.Panel();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.BUT_Camera = new ArdupilotMega.MyButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.Commands)).BeginInit();
|
||||
this.panel5.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
@ -147,14 +148,14 @@
|
||||
//
|
||||
this.Commands.AllowUserToAddRows = false;
|
||||
resources.ApplyResources(this.Commands, "Commands");
|
||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Commands.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Commands.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
|
||||
this.Commands.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.Command,
|
||||
this.Param1,
|
||||
@ -165,17 +166,17 @@
|
||||
this.Up,
|
||||
this.Down});
|
||||
this.Commands.Name = "Commands";
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle5.Format = "N0";
|
||||
dataGridViewCellStyle5.NullValue = "0";
|
||||
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
this.Commands.RowHeadersDefaultCellStyle = dataGridViewCellStyle5;
|
||||
dataGridViewCellStyle6.ForeColor = System.Drawing.Color.Black;
|
||||
this.Commands.RowsDefaultCellStyle = dataGridViewCellStyle6;
|
||||
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle13.Format = "N0";
|
||||
dataGridViewCellStyle13.NullValue = "0";
|
||||
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
this.Commands.RowHeadersDefaultCellStyle = dataGridViewCellStyle13;
|
||||
dataGridViewCellStyle14.ForeColor = System.Drawing.Color.Black;
|
||||
this.Commands.RowsDefaultCellStyle = dataGridViewCellStyle14;
|
||||
this.Commands.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.Commands_CellContentClick);
|
||||
this.Commands.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.Commands_CellEndEdit);
|
||||
this.Commands.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.Commands_DefaultValuesNeeded);
|
||||
@ -186,9 +187,9 @@
|
||||
//
|
||||
// Command
|
||||
//
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(68)))), ((int)(((byte)(69)))));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
|
||||
this.Command.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(68)))), ((int)(((byte)(69)))));
|
||||
dataGridViewCellStyle10.ForeColor = System.Drawing.Color.White;
|
||||
this.Command.DefaultCellStyle = dataGridViewCellStyle10;
|
||||
this.Command.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox;
|
||||
resources.ApplyResources(this.Command, "Command");
|
||||
this.Command.Name = "Command";
|
||||
@ -228,7 +229,7 @@
|
||||
//
|
||||
// Up
|
||||
//
|
||||
this.Up.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.Up.DefaultCellStyle = dataGridViewCellStyle11;
|
||||
resources.ApplyResources(this.Up, "Up");
|
||||
this.Up.Image = global::ArdupilotMega.Properties.Resources.up;
|
||||
this.Up.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch;
|
||||
@ -236,8 +237,8 @@
|
||||
//
|
||||
// Down
|
||||
//
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.Down.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.Down.DefaultCellStyle = dataGridViewCellStyle12;
|
||||
resources.ApplyResources(this.Down, "Down");
|
||||
this.Down.Image = global::ArdupilotMega.Properties.Resources.down;
|
||||
this.Down.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch;
|
||||
@ -381,8 +382,8 @@
|
||||
//
|
||||
// dataGridViewImageColumn1
|
||||
//
|
||||
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle7;
|
||||
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.dataGridViewImageColumn1.DefaultCellStyle = dataGridViewCellStyle15;
|
||||
resources.ApplyResources(this.dataGridViewImageColumn1, "dataGridViewImageColumn1");
|
||||
this.dataGridViewImageColumn1.Image = global::ArdupilotMega.Properties.Resources.up;
|
||||
this.dataGridViewImageColumn1.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch;
|
||||
@ -390,8 +391,8 @@
|
||||
//
|
||||
// dataGridViewImageColumn2
|
||||
//
|
||||
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.dataGridViewImageColumn2.DefaultCellStyle = dataGridViewCellStyle8;
|
||||
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.dataGridViewImageColumn2.DefaultCellStyle = dataGridViewCellStyle16;
|
||||
resources.ApplyResources(this.dataGridViewImageColumn2, "dataGridViewImageColumn2");
|
||||
this.dataGridViewImageColumn2.Image = global::ArdupilotMega.Properties.Resources.down;
|
||||
this.dataGridViewImageColumn2.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Stretch;
|
||||
@ -474,6 +475,7 @@
|
||||
this.panelWaypoints.CaptionFont = new System.Drawing.Font("Segoe UI", 11.75F, System.Drawing.FontStyle.Bold);
|
||||
this.panelWaypoints.CaptionHeight = 21;
|
||||
this.panelWaypoints.ColorScheme = BSE.Windows.Forms.ColorScheme.Custom;
|
||||
this.panelWaypoints.Controls.Add(this.BUT_Camera);
|
||||
this.panelWaypoints.Controls.Add(this.BUT_grid);
|
||||
this.panelWaypoints.Controls.Add(this.BUT_Prefetch);
|
||||
this.panelWaypoints.Controls.Add(this.CHK_altmode);
|
||||
@ -788,6 +790,14 @@
|
||||
resources.ApplyResources(this.panelBASE, "panelBASE");
|
||||
this.panelBASE.Name = "panelBASE";
|
||||
//
|
||||
// BUT_Camera
|
||||
//
|
||||
resources.ApplyResources(this.BUT_Camera, "BUT_Camera");
|
||||
this.BUT_Camera.Name = "BUT_Camera";
|
||||
this.toolTip1.SetToolTip(this.BUT_Camera, resources.GetString("BUT_Camera.ToolTip"));
|
||||
this.BUT_Camera.UseVisualStyleBackColor = true;
|
||||
this.BUT_Camera.Click += new System.EventHandler(this.BUT_Camera_Click);
|
||||
//
|
||||
// FlightPlanner
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
@ -895,5 +905,6 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem jumpwPToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem deleteWPToolStripMenuItem;
|
||||
private MyButton BUT_Camera;
|
||||
}
|
||||
}
|
@ -1176,6 +1176,7 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
try
|
||||
{
|
||||
home.id = (byte)MAVLink.MAV_CMD.WAYPOINT;
|
||||
home.lat = (int)(float.Parse(TXT_homelat.Text) * 10000000);
|
||||
home.lng = (int)(float.Parse(TXT_homelng.Text) * 10000000);
|
||||
home.alt = (int)(float.Parse(TXT_homealt.Text) / MainV2.cs.multiplierdist * 100); // use saved home
|
||||
@ -1287,10 +1288,10 @@ namespace ArdupilotMega.GCSViews
|
||||
foreach (Locationwp temp in cmds)
|
||||
{
|
||||
i++;
|
||||
/*if (temp.id == 0 && i != 0) // 0 and not home
|
||||
if (temp.id == 0 && i != 0) // 0 and not home
|
||||
break;
|
||||
if (temp.id == 255 && i != 0) // bad record - never loaded any WP's - but have started the board up.
|
||||
break;*/
|
||||
break;
|
||||
if (i + 1 >= Commands.Rows.Count)
|
||||
{
|
||||
Commands.Rows.Add();
|
||||
@ -2590,5 +2591,11 @@ namespace ArdupilotMega.GCSViews
|
||||
|
||||
setfromGE(end.Lat, end.Lng, (int)float.Parse(TXT_DefaultAlt.Text));
|
||||
}
|
||||
private void BUT_Camera_Click(object sender, EventArgs e)
|
||||
{
|
||||
Camera form = new Camera();
|
||||
MainV2.fixtheme(form);
|
||||
form.Show();
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -553,7 +553,11 @@ namespace ArdupilotMega
|
||||
{
|
||||
MainV2.givecomport = true;
|
||||
List<int> missed = new List<int>();
|
||||
_param[] paramarray = new _param[300];
|
||||
|
||||
// ryan - re start
|
||||
__mavlink_param_request_read_t rereq = new __mavlink_param_request_read_t();
|
||||
rereq.target_system = sysid;
|
||||
rereq.target_component = compid;
|
||||
|
||||
__mavlink_param_request_list_t req = new __mavlink_param_request_list_t();
|
||||
req.target_system = sysid;
|
||||
@ -562,6 +566,7 @@ namespace ArdupilotMega
|
||||
generatePacket(MAVLINK_MSG_ID_PARAM_REQUEST_LIST, req);
|
||||
|
||||
DateTime start = DateTime.Now;
|
||||
DateTime restart = DateTime.Now;
|
||||
|
||||
int retrys = 3;
|
||||
int nextid = 0;
|
||||
@ -582,6 +587,13 @@ namespace ArdupilotMega
|
||||
MainV2.givecomport = false;
|
||||
throw new Exception("Timeout on read - getParamList");
|
||||
}
|
||||
if (!(restart.AddMilliseconds(1000) > DateTime.Now))
|
||||
{
|
||||
rereq.param_index = (short)nextid;
|
||||
generatePacket(MAVLINK_MSG_ID_PARAM_REQUEST_READ, rereq);
|
||||
restart = DateTime.Now;
|
||||
}
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
byte[] buffer = readPacket();
|
||||
if (buffer.Length > 5)
|
||||
{
|
||||
@ -589,6 +601,7 @@ namespace ArdupilotMega
|
||||
//stopwatch.Start();
|
||||
if (buffer[5] == MAVLINK_MSG_ID_PARAM_VALUE)
|
||||
{
|
||||
restart = DateTime.Now;
|
||||
start = DateTime.Now;
|
||||
|
||||
__mavlink_param_value_t par = new __mavlink_param_value_t();
|
||||
|
@ -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.0.88")]
|
||||
[assembly: AssemblyFileVersion("1.0.89")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("")]
|
||||
|
@ -11,7 +11,7 @@
|
||||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
|
||||
</dsig:Transforms>
|
||||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
|
||||
<dsig:DigestValue>wRpim3tDq7ttru3QnVS/G/tNt8A=</dsig:DigestValue>
|
||||
<dsig:DigestValue>nmdAqsMY8QQaIQ5jETLjlb/P7G8=</dsig:DigestValue>
|
||||
</hash>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user