private void CheckSetTarget(ref Vector3D desiredDir, ref Vector3D currentDir, RotorReferencePair rotor) { if (delayTicks++ > 100) { delayTicks = 0; return; } currentAccuracy = Vector3D.Dot(currentDir, desiredDir); if (currentAccuracy > 0.995) { onTarget?.Invoke(true, rotor); } else { onTarget?.Invoke(false, rotor); } }
public RotorControl(RotorReferencePair azimuth, List<RotorReferencePair> elevationRotors) { this.azimuth = azimuth; this.elevationRotors = elevationRotors; }