#include <simgear/structure/exception.hxx>
#include <simgear/debug/logstream.hxx>
-#include "Navaids/markerbeacon.hxx"
-#include "Airports/runways.hxx"
-#include "Navaids/navdb.hxx"
+#include <Navaids/markerbeacon.hxx>
+#include <Airports/runways.hxx>
+#include <Navaids/navdb.hxx>
using std::string;
{
Type fgpTy = mapType(aTy);
FGRunway* runway = getRunwayFromName(aName);
+ if (!runway)
+ {
+ SG_LOG(SG_GENERAL, SG_WARN, "Failed to create beacon for unknown runway '" << aName << "'.");
+ return NULL;
+ }
SGGeod pos(aPos);
// fudge elevation to the runway elevation if it's not specified
if (fabs(pos.getElevationFt()) < 0.01) {
FGPositioned(aTy, string(), aPos),
_runway(aRunway)
{
+ init(true); // init FGPositioned
}