public void SetParameters(float frequency, int sampleRate, PassTypes passType, float resonance) { this.Resonance = resonance; this.Frequency = frequency; this.SampleRate = sampleRate; this.PassType = passType; switch (passType) { case PassTypes.Lowpass: c = 1.0f / (float)Mathf.Tan(Mathf.PI * frequency / sampleRate); a1 = 1.0f / (1.0f + resonance * c + c * c); a2 = 2f * a1; a3 = a1; b1 = 2.0f * (1.0f - c * c) * a1; b2 = (1.0f - resonance * c + c * c) * a1; break; case PassTypes.Highpass: c = (float)Mathf.Tan(Mathf.PI * frequency / sampleRate); a1 = 1.0f / (1.0f + resonance * c + c * c); a2 = -2f * a1; a3 = a1; b1 = 2.0f * (c * c - 1.0f) * a1; b2 = (1.0f - resonance * c + c * c) * a1; break; } }
public VMPassPayment() { PassType = new PassTypes(); Customer = new Model.APIOutPutModel.Customer(); ParkingLotTypes = new ParkingLotTypes(); PaymentReceivedBy = new Operator(); Location = new Location(); VehicleID = new Vehicle(); }
//---------------------------------------------------------------------CONSTRUCTORS: public ButterworthFilter(float frequency, int sampleRate, PassTypes passType, float resonance) { Resonance = resonance; Frequency = frequency; SampleRate = sampleRate; PassType = passType; SetParameters(frequency, sampleRate, passType, resonance); }
/// <summary> /// Получение комиссии а/к для определённого типа пассажира /// </summary> /// <param name="passType">Тип пассажира, для которого требуется получить комиссию а/к</param> /// <returns>Комиссия а/к для указанного типа. null если не задана.</returns> public ServiceCommission GetAirlineCommission(PassTypes passType) { ServiceCommission result = null; if (FinancialInformation != null) { if (FinancialInformation.CustomComission != null && FinancialInformation.CustomComission.ContainsKey(passType)) { result = FinancialInformation.CustomComission[passType].AirlineComission; } else if (FinancialInformation.Comission != null) { result = FinancialInformation.Comission.AirlineComission; } } return result; }
/// <summary> /// Получение комиссии а/к для определённого типа пассажира /// </summary> /// <param name="passType">Тип пассажира, для которого требуется получить комиссию а/к</param> /// <returns>Комиссия а/к для указанного типа. null если не задана.</returns> public ServiceCommission GetAirlineCommission(PassTypes passType) { ServiceCommission result = null; if (FinancialInformation != null) { if (FinancialInformation.CustomComission != null && FinancialInformation.CustomComission.ContainsKey(passType)) { result = FinancialInformation.CustomComission[passType].AirlineComission; } else if (FinancialInformation.Comission != null) { result = FinancialInformation.Comission.AirlineComission; } } return(result); }
public StationPassesReport() { VehicleTypeID = new VehicleType(); PassID = new PassTypes(); }
public VMVehiclePass() { PassType = new PassTypes(); Customer = new Customer(); ParkingLotTypes = new ParkingLotTypes(); }
public VMPassPrice() { PassTypeID = new PassTypes(); PassPriceID = new PassPrice(); }
/// <summary> /// Добавить цену с учетом привязки к допуслуге /// </summary> /// <param name="amount">Стоимость</param> /// <param name="currency">Валюта стоимости</param> /// <param name="serviceRef">Номер допуслуги к которой применима данная цена</param> /// <param name="segmentRef">Номер сегмента к которому применима данная цена</param> /// <param name="travellerType">Тип пассажира к которому применима данная цена</param> public void AddPrice(double amount, string currency, int serviceRef, int segmentRef, PassTypes travellerType) { var price = Prices.Find(p => p.Value.Value == amount && p.Value.Currency == currency); if (price == null) { var money = new Money(amount, currency); price = new AncillaryServicePrice(money); Prices.Add(price); } price.TravellersTypes.Add(travellerType); if (!price.ServiceRef.Contains(serviceRef)) { price.ServiceRef.Add(serviceRef); } if (!price.SegmentRef.Contains(segmentRef)) { price.SegmentRef.Add(segmentRef); } }