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); }
public void Update(AircraftPrincipalAxes gyroAxes, AircraftPrincipalAxes radioAxes, AircraftPrincipalAxes pidAxes, long currentTime) { _gyroAxes = gyroAxes; _radioAxes = radioAxes; _pidAxes = gyroAxes; _currentTime = currentTime; }
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; }
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]; }
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}; }
public Gyro(AircraftPrincipalAxes axes) { Axes = axes; }
public Radio(float throttle, AircraftPrincipalAxes axes, bool gear) { Throttle = throttle; Axes = axes; Gear = gear; }
public DefaultGyro(AircraftPrincipalAxes axes) : base(axes) { }
public abstract void Update(float throttle, AircraftPrincipalAxes output);