public Airplane(string hexCode, string flightName, AltitudeMetric altitude, double latitude, double longitude, SpeedMetric speed, double verticalSpeed, double direction, string from, string to, string model, string registration, bool isOnGround) { var airplaneDatabaseData = AircraftDatabase.GetByICAO(hexCode); this.ID = hexCode; this.Model = airplaneDatabaseData != null?AircraftModel.GetByICAO(airplaneDatabaseData.AircraftModelName) : null; this.Direction = direction; this.From = Airport.GetAirportByIata(from); this.Name = flightName.Trim(); this.Airline = Airline.GetAirlineByFlight(flightName); this.Position = new GeoPosition(latitude, longitude, altitude); this.Registration = new AircraftRegistration(registration); this.Speed = speed; this.To = Airport.GetAirportByIata(to); this.VerticalSpeed = verticalSpeed; this.DateCreation = DateTime.Now; this.IsOnGround = isOnGround; this.DateExpiration = DateTime.Now.AddHours(1); }