Vector, Quaternion - математика для ориентации. AdaptivePID - ПИД-регулятор. DroneOrientation.CalcAttitude() - цикл вычисления положения.

This commit is contained in:
2025-08-04 20:52:20 +03:00
parent 15d4fa5011
commit 1f8bde2370
21 changed files with 3758 additions and 1127 deletions

45
DroneClient/utils/RC.cs Normal file
View File

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DroneClient.utils
{
internal class RC
{
private Vector control = new();
private float throttle = 0;
public void SetControl(float roll, float pitch, float yaw)
{
control.X = roll;
control.Y = pitch;
control.Z = yaw;
}
public void SetRoll(float roll)
{
control.X = roll;
}
public void SetPitch(float pitch)
{
control.Y = pitch;
}
public void SetYaw(float yaw)
{
control.Z = yaw;
}
public void SetThrottle(float throttle)
{
this.throttle = throttle;
}
public Vector GetControl() { return control; }
public float GetThrottle() { return throttle; }
}
}