+
This commit is contained in:
@ -202,8 +202,8 @@ namespace DroneSimulator
|
|||||||
float spd_x = spd.X - SpdXYZ.X;
|
float spd_x = spd.X - SpdXYZ.X;
|
||||||
float spd_y = spd.Y - SpdXYZ.Y;
|
float spd_y = spd.Y - SpdXYZ.Y;
|
||||||
|
|
||||||
wind_x = 0.5f * Area.Wind.Density * Area.Wind.Resist * spd_x;
|
wind_x = 0.5f * Area.Wind.Density * Area.Wind.Resist * (spd_x * MathF.Abs(spd_x));
|
||||||
wind_y = 0.5f * Area.Wind.Density * Area.Wind.Resist * spd_y;
|
wind_y = 0.5f * Area.Wind.Density * Area.Wind.Resist * (spd_y * MathF.Abs(spd_y));
|
||||||
}
|
}
|
||||||
|
|
||||||
Quaternion pow = Quaternion.Inverse(Quat) * new Quaternion(0, 0, flow, 0) * Quat;
|
Quaternion pow = Quaternion.Inverse(Quat) * new Quaternion(0, 0, flow, 0) * Quat;
|
||||||
|
5
DroneSimulator/FormMain.Designer.cs
generated
5
DroneSimulator/FormMain.Designer.cs
generated
@ -1654,12 +1654,13 @@
|
|||||||
// numericUpDown_Area_Wind_Resist
|
// numericUpDown_Area_Wind_Resist
|
||||||
//
|
//
|
||||||
numericUpDown_Area_Wind_Resist.DecimalPlaces = 3;
|
numericUpDown_Area_Wind_Resist.DecimalPlaces = 3;
|
||||||
|
numericUpDown_Area_Wind_Resist.Increment = new decimal(new int[] { 1, 0, 0, 131072 });
|
||||||
numericUpDown_Area_Wind_Resist.Location = new Point(63, 116);
|
numericUpDown_Area_Wind_Resist.Location = new Point(63, 116);
|
||||||
numericUpDown_Area_Wind_Resist.Maximum = new decimal(new int[] { 10, 0, 0, 0 });
|
numericUpDown_Area_Wind_Resist.Maximum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
numericUpDown_Area_Wind_Resist.Name = "numericUpDown_Area_Wind_Resist";
|
numericUpDown_Area_Wind_Resist.Name = "numericUpDown_Area_Wind_Resist";
|
||||||
numericUpDown_Area_Wind_Resist.Size = new Size(60, 23);
|
numericUpDown_Area_Wind_Resist.Size = new Size(60, 23);
|
||||||
numericUpDown_Area_Wind_Resist.TabIndex = 13;
|
numericUpDown_Area_Wind_Resist.TabIndex = 13;
|
||||||
numericUpDown_Area_Wind_Resist.Value = new decimal(new int[] { 1, 0, 0, 65536 });
|
numericUpDown_Area_Wind_Resist.Value = new decimal(new int[] { 1, 0, 0, 131072 });
|
||||||
numericUpDown_Area_Wind_Resist.ValueChanged += numericUpDown_Area_Wind_Update;
|
numericUpDown_Area_Wind_Resist.ValueChanged += numericUpDown_Area_Wind_Update;
|
||||||
//
|
//
|
||||||
// label64
|
// label64
|
||||||
|
@ -105,6 +105,8 @@ namespace DroneSimulator
|
|||||||
g.DrawRectangle(new Pen(Color.Black), new Rectangle { Width = MainArea.Width - 1, Height = MainArea.Height - 1 });
|
g.DrawRectangle(new Pen(Color.Black), new Rectangle { Width = MainArea.Width - 1, Height = MainArea.Height - 1 });
|
||||||
|
|
||||||
foreach (var d in DroneList)
|
foreach (var d in DroneList)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (d.Azimuth >= 360) d.Azimuth -= 360;
|
if (d.Azimuth >= 360) d.Azimuth -= 360;
|
||||||
var bmp = RotateImage(d.Drone, d.Azimuth);
|
var bmp = RotateImage(d.Drone, d.Azimuth);
|
||||||
@ -152,6 +154,8 @@ namespace DroneSimulator
|
|||||||
|
|
||||||
g.DrawImage(bmp, dest);
|
g.DrawImage(bmp, dest);
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drawCallback(MainArea);
|
drawCallback(MainArea);
|
||||||
|
Reference in New Issue
Block a user