Ejemplo n.º 1
0
        public override void ExamineFlight(ExaminerFlightRow cfr)
        {
            if (cfr == null)
            {
                throw new ArgumentNullException("cfr");
            }

            // Must be real aircraft or FFS
            if (!cfr.fIsCertifiedLanding)
            {
                return;
            }

            int cNightTakeoffs = cfr.TotalCountForPredicate(cfp => cfp.PropTypeID == (int)CustomPropertyType.KnownProperties.IDPropNightTakeoff);
            int cNightLandings = cfr.cFullStopNightLandings + cfr.TotalCountForPredicate(cfp => cfp.PropTypeID == (int)CustomPropertyType.KnownProperties.IDPropNightTouchAndGo);

            if (cNightTakeoffs > 0)
            {
                fcNightTakeoff.AddRecentFlightEvents(cfr.dtFlight, cNightTakeoffs);
            }
            if (cNightLandings > 0)
            {
                fcNightLanding.AddRecentFlightEvents(cfr.dtFlight, cNightLandings);
            }
        }
Ejemplo n.º 2
0
        public override void ExamineFlight(ExaminerFlightRow cfr)
        {
            if (cfr == null)
            {
                throw new ArgumentNullException(nameof(cfr));
            }

            if (!cfr.fIsCertifiedLanding || cfr.fIsCertifiedSinglePilot || cfr.szType.CompareCurrentCultureIgnoreCase(typeName) != 0)
            {
                return;
            }

            fHasSICTime = fHasSICTime || (cfr.SIC > 0);

            fcFSLandings.AddRecentFlightEvents(cfr.dtFlight, cfr.cFullStopLandings);
            int cNightTakeoffs = cfr.FlightProps.IntValueForProperty(CustomPropertyType.KnownProperties.IDPropNightTakeoff);
            int cTakeoffs      = cfr.FlightProps.IntValueForProperty(CustomPropertyType.KnownProperties.IDPropTakeoffAny);

            fcTakeoffs.AddRecentFlightEvents(cfr.dtFlight, Math.Max(cNightTakeoffs, cTakeoffs));

            if (cfr.FlightProps.PropertyExistsWithID(CustomPropertyType.KnownProperties.IDProp6155SICCheck))
            {
                lstDatesOfCurrencyChecks.Add(cfr.dtFlight);
            }
        }
Ejemplo n.º 3
0
        public override void ExamineFlight(ExaminerFlightRow cfr)
        {
            if (cfr == null)
            {
                throw new ArgumentNullException("cfr");
            }
            m_fCacheValid = false;

            // 401.05(3)(a) - IPC or equivalent
            cfr.ForEachEvent((pfe) =>
            {
                // add any IPC or IPC equivalents
                if (pfe.PropertyType.IsIPC)
                {
                    fc401_05_3_a.AddRecentFlightEvents(cfr.dtFlight, 1.0M);
                }
            });

            decimal IFRTime    = cfr.IMC + cfr.IMCSim;
            decimal IFRCFITime = Math.Min(IFRTime, cfr.CFI);

            // 401.05(3)(b) - flight in a real aircraft or sim
            fc401_05_3_bTime.AddRecentFlightEvents(cfr.dtFlight, Math.Max(0, IFRTime - IFRCFITime));
            fc401_05_3_bApproaches.AddRecentFlightEvents(cfr.dtFlight, cfr.cApproaches);

            // 401.05(3)(c) - IFR instruction in a real aircraft
            if (cfr.fIsRealAircraft)
            {
                fc401_05_3_cTime.AddRecentFlightEvents(cfr.dtFlight, IFRCFITime);
                fc401_05_3_cApproaches.AddRecentFlightEvents(cfr.dtFlight, cfr.CFI > 0 ? cfr.cApproaches : 0);
            }
        }
 /// <summary>
 /// Adds a decayable event as of the specified date
 /// </summary>
 /// <param name="dt">The date of the event</param>
 /// <param name="x">Quantity of the event</param>
 /// <param name="fCountTowardsRating">True if it counts towards the rating (e.g., an old training event counts towards decayable currency but NOT towards ability to take a practical test)</param>
 public void AddDecayableEvent(DateTime dt, decimal x, bool fCountTowardsRating)
 {
     if (fCountTowardsRating)
     {
         base.AddEvent(x);
     }
     if (x > 0)
     {
         DecayingCurrency.AddRecentFlightEvents(dt, x);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Adds night-time landing(s) to the currency.
 /// </summary>
 /// <param name="dt">The date of the landing(s)</param>
 /// <param name="cEvents">The number of landings</param>
 /// <param name="nco">Indicates whether 61.57(e) applies, and if so, whether it is sim or real aircraft</param>
 private void AddNighttimeLandingEvent(DateTime dt, decimal cEvents, NightCurrencyOptions nco)
 {
     AddRecentFlightEvents(dt, cEvents);
     if (nco == NightCurrencyOptions.FAR6157eAirplane)
     {
         m_fc6157ei.AddRecentFlightEvents(dt, cEvents);
     }
     else if (nco == NightCurrencyOptions.FAR6157eSim)
     {
         m_fc6157eii.AddRecentFlightEvents(dt, cEvents);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Adds night-time takeoff(s) to the currency.  This is mostly informative - we don't currently require these to be logged
 /// </summary>
 /// <param name="dt">The date of the takeoff(s)</param>
 /// <param name="cEvents">The number of takeoffs</param>
 /// <param name="nco">Indicates whether 61.57(e) applies, and if so, whether it is sim or real aircraft</param>
 private void AddNighttimeTakeOffEvent(DateTime dt, decimal cEvents, NightCurrencyOptions nco)
 {
     NightTakeoffCurrency.AddRecentFlightEvents(dt, cEvents);
     if (nco == NightCurrencyOptions.FAR6157eAirplane)
     {
         m_fc6157eiTakeoffs.AddRecentFlightEvents(dt, cEvents);
     }
     else if (nco == NightCurrencyOptions.FAR6157eSim)
     {
         m_fc6157eiiTakeoffs.AddRecentFlightEvents(dt, cEvents);
     }
 }
Ejemplo n.º 7
0
        public override void ExamineFlight(ExaminerFlightRow cfr)
        {
            if (cfr == null)
            {
                throw new ArgumentNullException(nameof(cfr));
            }
            base.ExamineFlight(cfr);

            if (!cfr.fIsCertifiedLanding)
            {
                return;
            }

            // 61.57(e) only applies if turbine and type rated.  Everything else must be in certified landing, or turbine airplane, or not type rated, or not in the type for this aircraft
            bool fIsMatchingType     = !String.IsNullOrEmpty(TypeDesignator) && cfr.szType.CompareCurrentCultureIgnoreCase(cfr.szType) == 0 && CategoryClass.IsAirplane(cfr.idCatClassOverride) && cfr.turbineLevel.IsTurbine() && !cfr.fIsCertifiedSinglePilot;
            NightCurrencyOptions nco = fIsMatchingType ? (cfr.fIsRealAircraft ? NightCurrencyOptions.FAR6157eAirplane : NightCurrencyOptions.FAR6157eSim) : NightCurrencyOptions.FAR6157bOnly;

            // 61.57(e)(4)(i/ii)(A) - 1500 hrs - comes into play after finalize

            // 61.57(e)(4)(i/ii)(C) - 15 hours in this type in the last 90 days.  Only if in an actual aircraft, since it doesn't seem to allow sim time.
            // Do this first because we'll exclude others if you were pilot monitoring
            if (nco == NightCurrencyOptions.FAR6157eAirplane)
            {
                m_fc6157TimeInType.AddRecentFlightEvents(cfr.dtFlight, cfr.Total);
            }

            if (!cfr.FlightProps.PropertyExistsWithID(CustomPropertyType.KnownProperties.IDPropPilotMonitoring))
            {
                // we need to subtract out monitored landings, or ignore all if you were monitoring for the whole flight
                int cMonitoredLandings = cfr.FlightProps.IntValueForProperty(CustomPropertyType.KnownProperties.IDPropMonitoredNightLandings);
                int cMonitoredTakeoffs = cfr.FlightProps.IntValueForProperty(CustomPropertyType.KnownProperties.IDPropMonitoredNightTakeoffs);
                int cNightLandings     = cfr.cFullStopNightLandings + (AllowTouchAndGo ? cfr.FlightProps.IntValueForProperty(CustomPropertyType.KnownProperties.IDPropNightTouchAndGo) : 0);

                // 61.57(e)(4)(i/ii)(B) - passenger currency in this type
                m_fc6157Passenger.ExamineFlight(cfr);

                // 61.57(b), 61.57(e)(4)(i/ii)(D) - Night takeoffs/landings
                if (cNightLandings > 0)
                {
                    AddNighttimeLandingEvent(cfr.dtFlight, Math.Max(cNightLandings - cMonitoredLandings, 0), nco);
                }

                // Night-time take-offs are also technically required for night currency
                int cNightTakeoffs = cfr.FlightProps.TotalCountForPredicate(cfp => cfp.PropertyType.IsNightTakeOff);
                if (cNightTakeoffs > 0)
                {
                    AddNighttimeTakeOffEvent(cfr.dtFlight, Math.Max(cNightTakeoffs - cMonitoredTakeoffs, 0), nco);
                }
            }
        }
Ejemplo n.º 8
0
        public override void ExamineFlight(ExaminerFlightRow cfr)
        {
            if (cfr == null)
            {
                throw new ArgumentNullException(nameof(cfr));
            }

            if (cfr.idCatClassOverride != CategoryClass.CatClassID.Glider || !cfr.fIsRealAircraft || cfr.CFI == 0.0M)
            {
                return;
            }

            fcHours.AddRecentFlightEvents(cfr.dtFlight, cfr.CFI);

            fcLandings.AddRecentFlightEvents(cfr.dtFlight, Math.Max(cfr.cLandingsThisFlight, cfr.FlightProps.TotalCountForPredicate(cfp => cfp.PropertyType.IsGliderGroundLaunch)));
        }
Ejemplo n.º 9
0
        public override void ExamineFlight(ExaminerFlightRow cfr)
        {
            if (cfr == null)
            {
                throw new ArgumentNullException(nameof(cfr));
            }
            Invalidate();

            // must be a real aircraft or certified IFR
            if (!cfr.fIsCertifiedIFR)
            {
                return;
            }

            // 401.05(3)(a) - IPC or equivalent
            cfr.FlightProps.ForEachEvent((pfe) =>
            {
                // add any IPC or IPC equivalents
                if (pfe.PropertyType.IsIPC)
                {
                    fc401_05_3_a_c_24month.AddRecentFlightEvents(cfr.dtFlight, 1.0M);
                    fc401_05_3_a_c_12month.AddRecentFlightEvents(cfr.dtFlight, 1.0M);
                }
                if (pfe.PropertyType.IsBFR)
                {
                    fc401_05_1b.AddRecentFlightEvents(cfr.dtFlight, 1.0M);
                }
            });

            if (cfr.fIsRealAircraft)
            {
                // 401.05(1) - Acted as PIC or SIC within the previous 5 years
                fc401_05_1a.AddRecentFlightEvents(cfr.dtFlight, cfr.PIC + cfr.SIC);
            }

            // 401.05(3.1)(a) Instrument time
            fc401_05_3_1_aTime.AddRecentFlightEvents(cfr.dtFlight, cfr.IMC + cfr.IMCSim);

            // 401.05(3.1)(b) - 6 approaches (can be in a sim)
            fc401_05_3_1_bApproaches.AddRecentFlightEvents(cfr.dtFlight, cfr.cApproaches);
        }
Ejemplo n.º 10
0
 /// <summary>
 /// Add holds in an FTD
 /// </summary>
 /// <param name="dt">Date of the hold</param>
 /// <param name="cHolds"># of holds</param>
 public void AddFTDHold(DateTime dt, int cHolds)
 {
     fcFTDHold.AddRecentFlightEvents(dt, cHolds);
     m_fCacheValid = false;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Add an IPC or equivalent (e.g., instrument check ride)
 /// </summary>
 /// <param name="dt">Date of the IPC</param>
 public void AddIPC(DateTime dt)
 {
     fcIPCOrCheckride.AddRecentFlightEvents(dt, 1);
     Invalidate();
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Add instrument time in an ATD
 /// </summary>
 /// <param name="dt">Date of the instrument time</param>
 /// <param name="time">Amount of time</param>
 public void AddATDInstrumentTime(DateTime dt, Decimal time)
 {
     fcInstrumentHours.AddRecentFlightEvents(dt, time);
     m_fCacheValid = false;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Add approaches in a real plane
 /// </summary>
 /// <param name="dt">Date of the approaches</param>
 /// <param name="cApproaches"># of approaches</param>
 public void AddApproaches(DateTime dt, int cApproaches)
 {
     fcIFRApproach.AddRecentFlightEvents(dt, cApproaches);
     Invalidate();
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Add holds in a real plane or certified flight simulator
 /// </summary>
 /// <param name="dt">Date of the hold</param>
 /// <param name="cHolds"># of holds</param>
 public void AddHolds(DateTime dt, int cHolds)
 {
     fcIFRHold.AddRecentFlightEvents(dt, cHolds);
     Invalidate();
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Add approaches in a real plane
 /// </summary>
 /// <param name="dt">Date of the approaches</param>
 /// <param name="cApproaches"># of approaches</param>
 public void AddApproaches(DateTime dt, int cApproaches)
 {
     fcIFRApproach.AddRecentFlightEvents(dt, cApproaches);
     fcAirplaneApproach6Month.AddRecentFlightEvents(dt, cApproaches);
     m_fCacheValid = false;
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Add performance maneuvers for part 61.57(c)(6)(ii)(B) => (c)(3)(ii)(B).  Does NOT appear to need to have been in a glider.
 /// </summary>
 /// <param name="dt"></param>
 public void AddPerformanceManeuvers(DateTime dt)
 {
     fcGliderInstrumentPassengers.AddRecentFlightEvents(dt, 1);
     m_fCacheValid = false;
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Add an IPC or equivalent (e.g., instrument check ride)
 /// </summary>
 /// <param name="dt">Date of the IPC</param>
 public void AddIPC(DateTime dt)
 {
     fcGliderIPC.AddRecentFlightEvents(dt, 1);
     m_fCacheValid = false;
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Add IFR time for part 61.57(c)(6)(ii)(A) => (c)(3)(ii)(A).  MUST BE IN A GLIDER
 /// </summary>
 /// <param name="dt">Date of the time</param>
 /// <param name="time">Amount of time to add</param>
 public void AddIFRTimePassengers(DateTime dt, Decimal time)
 {
     fcGliderIFRTimePassengers.AddRecentFlightEvents(dt, time);
     m_fCacheValid = false;
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Add maneuvering time for part 61.57(c)(6)(i)(B) => (c)(3)(i)(B).  Can be in a glider or single-engine airplane simulated IMC.
 /// </summary>
 /// <param name="dt">Date of the time</param>
 /// <param name="time">Amount of time to add</param>
 public void AddManeuverTime(DateTime dt, Decimal time)
 {
     fcGliderInstrumentManeuvers.AddRecentFlightEvents(dt, time);
     Invalidate();
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Add performance maneuvers for part 61.57(c)(6)(ii)(B) => (c)(3)(ii)(B).  Does NOT appear to need to have been in a glider.
 /// </summary>
 /// <param name="dt"></param>
 public void AddPerformanceManeuvers(DateTime dt)
 {
     fcGliderInstrumentPassengers.AddRecentFlightEvents(dt, 1);
     Invalidate();
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Add an IPC or equivalent (e.g., instrument check ride)
 /// </summary>
 /// <param name="dt">Date of the IPC</param>
 public void AddIPC(DateTime dt)
 {
     fcIPCOrCheckride.AddRecentFlightEvents(dt, 1);
     m_fCacheValid = false;
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Add an IPC or equivalent (e.g., instrument check ride)
 /// </summary>
 /// <param name="dt">Date of the IPC</param>
 public void AddIPC(DateTime dt)
 {
     fcGliderIPC.AddRecentFlightEvents(dt, 1);
     Invalidate();
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Add unusual attitude recoveres in an ATD - Descending, Vne condition
 /// </summary>
 /// <param name="dt">Date of the recoveries</param>
 /// <param name="cRecoveries"># of recoveries</param>
 public void AddUARecoveryDesc(DateTime dt, int cRecoveries)
 {
     fcUnusualAttitudesDesc.AddRecentFlightEvents(dt, cRecoveries);
     m_fCacheValid = false;
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Add approaches in an FTD
 /// </summary>
 /// <param name="dt">Date of the approaches</param>
 /// <param name="cApproaches"># of approaches</param>
 public void AddFTDApproaches(DateTime dt, int cApproaches)
 {
     fcFTDApproach.AddRecentFlightEvents(dt, cApproaches);
     fcFTDApproach6Month.AddRecentFlightEvents(dt, cApproaches);
     m_fCacheValid = false;
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Add maneuvering time for part 61.57(c)(6)(i)(B) => (c)(3)(i)(B).  Can be in a glider or single-engine airplane simulated IMC.
 /// </summary>
 /// <param name="dt">Date of the time</param>
 /// <param name="time">Amount of time to add</param>
 public void AddManeuverTime(DateTime dt, Decimal time)
 {
     fcGliderInstrumentManeuvers.AddRecentFlightEvents(dt, time);
     m_fCacheValid = false;
 }
Ejemplo n.º 26
0
 /// <summary>
 /// Add IFR time for part 61.57(c)(6)(ii)(A) => (c)(3)(ii)(A).  MUST BE IN A GLIDER
 /// </summary>
 /// <param name="dt">Date of the time</param>
 /// <param name="time">Amount of time to add</param>
 public void AddIFRTimePassengers(DateTime dt, Decimal time)
 {
     fcGliderIFRTimePassengers.AddRecentFlightEvents(dt, time);
     Invalidate();
 }
Ejemplo n.º 27
0
 public override void Finalize(decimal totalTime, decimal picTime)
 {
     base.Finalize(totalTime, picTime);
     m_fc6157eTotalTime.AddRecentFlightEvents(DateTime.Now, totalTime);
 }