This commit is contained in:
2025-07-15 02:16:03 +03:00
parent f6cdc57e7b
commit 771440f642
3 changed files with 119 additions and 1 deletions

View File

@ -49,6 +49,12 @@ namespace DroneSimulator
static public float MaxPower; // Максимальная Тяга всех двигателей (КГ)
}
public struct Propeller
{
static public float Diameter; // Диаметр лопостей
static public float MaxRotate; // Максимальнные обороты в секунду
}
private RealMode.Accelerometer RealAcc = new RealMode.Accelerometer();
private RealMode.Gyroscope RealGyr = new RealMode.Gyroscope();
private RealMode.Position RealPos = new RealMode.Position();
@ -376,6 +382,13 @@ namespace DroneSimulator
{
ul = Range(ul); ur = Range(ur); dl = Range(dl); dr = Range(dr);
float coef = Area.Wind.Density * MathF.Pow(Propeller.Diameter, 4);
//ul = MathF.Pow(ul * Propeller.MaxRotate, 2) * coef; // я хз как делать
//ur = MathF.Pow(ur * Propeller.MaxRotate, 2) * coef;
//dl = MathF.Pow(dl * Propeller.MaxRotate, 2) * coef;
//dr = MathF.Pow(dr * Propeller.MaxRotate, 2) * coef;
Power = (ul + ur + dl + dr) / 4;
AccPRY.Y = ((ul + dl) - (ur + dr));