Ejemplo n.º 1
0
 public bool Equals(AircraftConfigItem other, double deltaWt, double deltaFuelBias)
 {
     return
         (other.AC == AC &&
          other.Registration == Registration &&
          other.FuelProfile == FuelProfile &&
          other.TOProfile == TOProfile &&
          other.LdgProfile == LdgProfile &&
          Abs(other.OewKg - OewKg) <= deltaWt &&
          Abs(other.MaxTOWtKg - MaxTOWtKg) <= deltaWt &&
          Abs(other.MaxLdgWtKg - MaxLdgWtKg) <= deltaWt &&
          Abs(other.MaxZfwKg - MaxZfwKg) <= deltaWt &&
          Abs(other.MaxFuelKg - MaxFuelKg) <= deltaWt &&
          Abs(other.FuelBias - FuelBias) <= deltaFuelBias &&
          other.WtUnit == WtUnit);
 }
Ejemplo n.º 2
0
        private static string GetError(AircraftConfigItem item,
                                       bool fuelFound, bool toFound, bool ldgFound)
        {
            var msgs = new List <string>();

            if (!fuelFound)
            {
                msgs.Add("fuel");
            }
            if (!toFound)
            {
                msgs.Add("takeoff");
            }
            if (!ldgFound)
            {
                msgs.Add("landing");
            }
            return((msgs.Count > 0) ? ErrorMessage(item, msgs) : null);
        }
Ejemplo n.º 3
0
 public AircraftConfig(AircraftConfigItem Config, string FilePath)
 {
     this.Config   = Config;
     this.FilePath = FilePath;
 }
Ejemplo n.º 4
0
 private static string ErrorMessage(AircraftConfigItem c, List <string> parts)
 {
     return($"Cannot find {parts.Combined()} profile(s) for {c.Registration} ({c.AC}).");
 }