예제 #1
0
 public override void Update(float throttle, AircraftPrincipalAxes output)
 {
     _frontMotor.Update(throttle + output.Pitch - output.Yaw);
     _rearMotor.Update(throttle - output.Pitch - output.Yaw);
     _leftMotor.Update(throttle + output.Roll + output.Yaw);
     _rightMotor.Update(throttle - output.Roll + output.Yaw);
 }
예제 #2
0
 public void Update(AircraftPrincipalAxes gyroAxes, AircraftPrincipalAxes radioAxes, AircraftPrincipalAxes pidAxes, long currentTime)
 {
     _gyroAxes    = gyroAxes;
     _radioAxes   = radioAxes;
     _pidAxes     = gyroAxes;
     _currentTime = currentTime;
 }
예제 #3
0
 public void Update(AircraftPrincipalAxes radio, AircraftPrincipalAxes gyro, float deltaTimeGain)
 {
     _pitchController.Update(radio.Pitch, gyro.Pitch, deltaTimeGain);
     _rollController.Update(radio.Roll, gyro.Roll, deltaTimeGain);
     _yawController.Update(radio.Yaw, gyro.Yaw, deltaTimeGain);
     Axes.Pitch = _pitchController.Output;
     Axes.Roll = _rollController.Output;
     Axes.Yaw = _yawController.Output;
 }
예제 #4
0
 public TelemetryData()
 {
     _gyroAxes = new AircraftPrincipalAxes {
         Pitch = 0, Roll = 0, Yaw = 0
     };
     _radioAxes = new AircraftPrincipalAxes {
         Pitch = 0, Roll = 0, Yaw = 0
     };
     _pidAxes = new AircraftPrincipalAxes {
         Pitch = 0, Roll = 0, Yaw = 0
     };
     _currentTime = DateTime.Now.Ticks;
     _buffer      = new byte[44];
 }
예제 #5
0
 public AxesController(PIDSettings pitchSettings, PIDSettings rollSettings, PIDSettings yawSettings, bool useWindup)
 {
     if (useWindup)
     {
         _pitchController = new PIDWindup(pitchSettings);
         _rollController = new PIDWindup(rollSettings);
         _yawController = new PIDWindup(yawSettings);
     }
     else
     {
         _pitchController = new ControlAlgorithms.Implementations.PID.PID(pitchSettings);
         _rollController = new ControlAlgorithms.Implementations.PID.PID(rollSettings);
         _yawController = new ControlAlgorithms.Implementations.PID.PID(yawSettings);
     }
     Axes = new AircraftPrincipalAxes(){Pitch = 0, Roll = 0, Yaw = 0};
 }
예제 #6
0
 public Gyro(AircraftPrincipalAxes axes)
 {
     Axes = axes;
 }
예제 #7
0
 public Radio(float throttle, AircraftPrincipalAxes axes, bool gear)
 {
     Throttle = throttle;
     Axes     = axes;
     Gear     = gear;
 }
예제 #8
0
 public DefaultGyro(AircraftPrincipalAxes axes) : base(axes)
 {
 }
예제 #9
0
 public abstract void Update(float throttle, AircraftPrincipalAxes output);