diff --git a/src/blackmisc/weather/metarset.cpp b/src/blackmisc/weather/metarset.cpp index d4cffeae9..ae0e97456 100644 --- a/src/blackmisc/weather/metarset.cpp +++ b/src/blackmisc/weather/metarset.cpp @@ -17,5 +17,10 @@ namespace BlackMisc CCollection(other) { } + CMetar CMetarSet::getMetarForAirport(const Aviation::CAirportIcaoCode &icao) const + { + return this->findFirstByOrDefault(&CMetar::getAirportIcaoCode, icao); + } + } // namespace } // namespace diff --git a/src/blackmisc/weather/metarset.h b/src/blackmisc/weather/metarset.h index 24dd3726b..b9a883103 100644 --- a/src/blackmisc/weather/metarset.h +++ b/src/blackmisc/weather/metarset.h @@ -34,6 +34,9 @@ namespace BlackMisc //! Construct from a base class object. CMetarSet(const CCollection &other); + + //! METAR for ICAO code + CMetar getMetarForAirport(const Aviation::CAirportIcaoCode &icao) const; }; } //namespace