Exemplo n.º 1
0
        private void CalcAndSetShifts_HeightHold(int tracker, Shifts shifts = null)
        {
            var directShift = GetShiftXY();

            SetShifts(shifts,
                      directShift * Math.Cos(Path[tracker].ShiftsData[TrackId][0]),
                      directShift * Math.Sin(Path[tracker].ShiftsData[TrackId][0]),
                      0);
        }
Exemplo n.º 2
0
        private void CalcAndSetShifts_Maneuver(int tracker, Shifts shifts = null)
        {
            var directShift = GetShiftXY();

            SetShifts(shifts,
                      directShift * Math.Cos(Path[tracker].ShiftsData[TrackId][0]),
                      directShift * Math.Sin(Path[tracker].ShiftsData[TrackId][0]),
                      GetHeightManeuverShift(HeightToGain, AircraftOptions.TimeToGainHeight));
        }
Exemplo n.º 3
0
        private void CalcAndSetShifts_Ordinary(int tracker, Shifts shifts = null)
        {
            var shiftXY = GetShiftXY();
            var shiftZ  = shiftXY / Math.Cos(Path[tracker].ShiftsData[TrackId][1]);

            SetShifts(shifts,
                      shiftXY * Math.Cos(Path[tracker].ShiftsData[TrackId][0]),
                      shiftXY * Math.Sin(Path[tracker].ShiftsData[TrackId][0]),
                      shiftZ * Math.Sin(Path[tracker].ShiftsData[TrackId][1]));
        }
Exemplo n.º 4
0
 private void SetShifts(Shifts shifts, double dx, double dy, double dz)
 {
     if (shifts != null)
     {
         shifts.Dx = dx;
         shifts.Dy = dy;
         shifts.Dz = dz;
     }
     else
     {
         Shifts.Dx = dx;
         Shifts.Dy = dy;
         Shifts.Dz = dz;
     }
 }
Exemplo n.º 5
0
 private void Invoke_CalculationShifts(int tracker, Shifts shifts = null)
 {
     CalcAndSetShifts(tracker, shifts);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Изменяет метод в делегате для расчёта смещений. Относится к обработчику
 /// события изменения стадии полёта
 /// </summary>
 /// <param name="action">Метод для расчёта смещений</param>
 private void ChangeAndInvoke_Shifts(Action <int, Shifts> action, int tracker_, Shifts shifts_ = null)
 {
     CalcAndSetShifts = (tracker, shifts) => action(tracker, shifts);
     Invoke_CalculationShifts(tracker_, shifts_);
 }