FlightGear next
FGNavRecord Class Reference

#include <navrecord.hxx>

Inherits FGPositioned.

Inherited by FGMobileNavRecord.

Public Member Functions

 FGNavRecord (PositionedID aGuid, Type type, const std::string &ident, const std::string &name, const SGGeod &aPos, int freq, int range, double multiuse, PositionedID aRunway)
 
double get_lon () const
 
double get_lat () const
 
double get_elev_ft () const
 
int get_freq () const
 
int get_range () const
 
double get_multiuse () const
 
void set_multiuse (double m)
 
const char * get_ident () const
 
bool get_serviceable () const
 
const char * get_trans_ident () const
 
virtual const std::string & name () const
 Return the name of this positioned.
 
FGRunwayRef runway () const
 Retrieve the runway this navaid is associated with (for ILS/LOC/GS)
 
double localizerWidth () const
 return the localizer width, in degrees computation is based up ICAO stdandard width at the runway threshold see implementation for further details.
 
double glideSlopeAngleDeg () const
 extract the glide slope angle, in degrees, from the multiuse field Return 0.0 for non-GS navaids (including an ILS or LOC - you need to call this on the paired GS record.
 
void bindToNode (SGPropertyNode *nd) const
 
void unbindFromNode (SGPropertyNode *nd) const
 
void setColocatedDME (PositionedID other)
 
bool hasDME () const
 
PositionedID colocatedDME () const
 
bool isVORTAC () const
 
void updateFromXML (const SGGeod &geod, double heading)
 
- Public Member Functions inherited from FGPositioned
virtual ~FGPositioned ()
 
Type type () const
 
const char * typeString () const
 
const std::string & ident () const
 
virtual const SGGeod & geod () const
 
PositionedID guid () const
 
virtual const SGVec3d & cart () const
 The cartesian position associated with this object.
 
double latitude () const
 
double longitude () const
 
double elevation () const
 
double elevationM () const
 

Static Public Member Functions

static bool isType (FGPositioned::Type ty)
 
- Static Public Member Functions inherited from FGPositioned
static bool isAirportType (FGPositioned *pos)
 
static bool isRunwayType (FGPositioned *pos)
 
static bool isNavaidType (FGPositioned *pos)
 
static FGPositionedList findWithinRange (const SGGeod &aPos, double aRangeNm, Filter *aFilter)
 
static FGPositionedList findWithinRangePartial (const SGGeod &aPos, double aRangeNm, Filter *aFilter, bool &aPartial)
 
static FGPositionedRef findClosestWithIdent (const std::string &aIdent, const SGGeod &aPos, Filter *aFilter=NULL)
 
static FGPositionedRef findFirstWithIdent (const std::string &aIdent, Filter *aFilter)
 
static FGPositionedList findAllWithIdent (const std::string &aIdent, Filter *aFilter=NULL, bool aExact=true)
 Find all items with the specified ident.
 
static FGPositionedList findAllWithName (const std::string &aName, Filter *aFilter=NULL, bool aExact=true)
 As above, but searches names instead of idents.
 
static void sortByRange (FGPositionedList &, const SGGeod &aPos)
 Sort an FGPositionedList by distance from a position.
 
static FGPositionedRef findClosest (const SGGeod &aPos, double aCutoffNm, Filter *aFilter=NULL)
 Find the closest item to a position, which pass the specified filter A cutoff range in NM must be specified, to constrain the search acceptably.
 
static FGPositionedList findClosestN (const SGGeod &aPos, unsigned int aN, double aCutoffNm, Filter *aFilter=NULL)
 Find the closest N items to a position, which pass the specified filter A cutoff range in NM must be specified, to constrain the search acceptably.
 
static FGPositionedList findClosestNPartial (const SGGeod &aPos, unsigned int aN, double aCutoffNm, Filter *aFilter, bool &aPartial)
 Same as above, but with a time-bound in msec too.
 
template<class T>
static SGSharedPtr< T > loadById (PositionedID id)
 
template<class T>
static SGSharedPtr< T > loadById (const PositionedIDVec &id_vec, size_t index)
 
template<class T>
static std::vector< SGSharedPtr< T > > loadAllById (const PositionedIDVec &id_vec)
 
static Type typeFromName (const std::string &aName)
 Map a candidate type string to a real type.
 
static const char * nameForType (Type aTy)
 Map a type to a human-readable string.
 
static FGPositionedRef createWaypoint (FGPositioned::Type aType, const std::string &aIdent, const SGGeod &aPos, bool isTemporary=false, const std::string &aName={})
 
static bool deleteWaypoint (FGPositionedRef aWpt)
 

Protected Attributes

bool serviceable
 
- Protected Attributes inherited from FGPositioned
const PositionedID mGuid
 
const Type mType
 
const std::string mIdent
 

Additional Inherited Members

- Public Types inherited from FGPositioned
enum  Type {
  INVALID = 0 , AIRPORT , HELIPORT , SEAPORT ,
  RUNWAY , HELIPAD , TAXIWAY , PAVEMENT ,
  WAYPOINT , FIX , NDB , VOR ,
  ILS , LOC , GS , OM ,
  MM , IM , DME , TACAN ,
  MOBILE_TACAN , OBSTACLE , TOWER , FREQ_GROUND ,
  FREQ_TOWER , FREQ_ATIS , FREQ_AWOS , FREQ_APP_DEP ,
  FREQ_ENROUTE , FREQ_CLEARANCE , FREQ_UNICOM , PARKING ,
  TAXI_NODE , COUNTRY , CITY , TOWN ,
  VILLAGE , VISUAL_REPORTING_POINT , LAST_POI_TYPE , LAST_TYPE
}
 
- Protected Member Functions inherited from FGPositioned
 FGPositioned (PositionedID aGuid, Type ty, const std::string &aIdent, const SGGeod &aPos)
 
void modifyPosition (const SGGeod &newPos)
 
void invalidatePosition ()
 
- Static Protected Member Functions inherited from FGPositioned
static FGPositionedRef loadByIdImpl (PositionedID id)
 

Detailed Description

Definition at line 42 of file navrecord.hxx.

Constructor & Destructor Documentation

◆ FGNavRecord()

FGNavRecord::FGNavRecord ( PositionedID aGuid,
Type type,
const std::string & ident,
const std::string & name,
const SGGeod & aPos,
int freq,
int range,
double multiuse,
PositionedID aRunway )

Definition at line 44 of file navrecord.cxx.

Member Function Documentation

◆ bindToNode()

void FGNavRecord::bindToNode ( SGPropertyNode * nd) const

◆ colocatedDME()

PositionedID FGNavRecord::colocatedDME ( ) const

Definition at line 116 of file navrecord.cxx.

◆ get_elev_ft()

double FGNavRecord::get_elev_ft ( ) const
inline

Definition at line 74 of file navrecord.hxx.

◆ get_freq()

int FGNavRecord::get_freq ( ) const
inline

Definition at line 76 of file navrecord.hxx.

◆ get_ident()

const char * FGNavRecord::get_ident ( ) const
inline

Definition at line 80 of file navrecord.hxx.

◆ get_lat()

double FGNavRecord::get_lat ( ) const
inline

Definition at line 73 of file navrecord.hxx.

◆ get_lon()

double FGNavRecord::get_lon ( ) const
inline

Definition at line 72 of file navrecord.hxx.

◆ get_multiuse()

double FGNavRecord::get_multiuse ( ) const
inline

Definition at line 78 of file navrecord.hxx.

◆ get_range()

int FGNavRecord::get_range ( ) const
inline

Definition at line 77 of file navrecord.hxx.

◆ get_serviceable()

bool FGNavRecord::get_serviceable ( ) const
inline

Definition at line 82 of file navrecord.hxx.

◆ get_trans_ident()

const char * FGNavRecord::get_trans_ident ( ) const
inline

Definition at line 83 of file navrecord.hxx.

◆ glideSlopeAngleDeg()

double FGNavRecord::glideSlopeAngleDeg ( ) const

extract the glide slope angle, in degrees, from the multiuse field Return 0.0 for non-GS navaids (including an ILS or LOC - you need to call this on the paired GS record.

Definition at line 127 of file navrecord.cxx.

◆ hasDME()

bool FGNavRecord::hasDME ( ) const

Definition at line 96 of file navrecord.cxx.

◆ isType()

static bool FGNavRecord::isType ( FGPositioned::Type ty)
inlinestatic

Definition at line 59 of file navrecord.hxx.

◆ isVORTAC()

bool FGNavRecord::isVORTAC ( ) const

Definition at line 103 of file navrecord.cxx.

◆ localizerWidth()

double FGNavRecord::localizerWidth ( ) const

return the localizer width, in degrees computation is based up ICAO stdandard width at the runway threshold see implementation for further details.

Definition at line 63 of file navrecord.cxx.

◆ name()

virtual const std::string & FGNavRecord::name ( ) const
inlinevirtual

Return the name of this positioned.

By default this is the same as the ident, but for many derived classes it's more meaningful - the aiport or navaid name, for example.

Reimplemented from FGPositioned.

Definition at line 85 of file navrecord.hxx.

◆ runway()

FGRunwayRef FGNavRecord::runway ( ) const

Retrieve the runway this navaid is associated with (for ILS/LOC/GS)

Definition at line 58 of file navrecord.cxx.

◆ set_multiuse()

void FGNavRecord::set_multiuse ( double m)
inline

Definition at line 79 of file navrecord.hxx.

◆ setColocatedDME()

void FGNavRecord::setColocatedDME ( PositionedID other)

Definition at line 111 of file navrecord.cxx.

◆ unbindFromNode()

void FGNavRecord::unbindFromNode ( SGPropertyNode * nd) const

◆ updateFromXML()

void FGNavRecord::updateFromXML ( const SGGeod & geod,
double heading )

Definition at line 121 of file navrecord.cxx.

Member Data Documentation

◆ serviceable

bool FGNavRecord::serviceable
mutableprotected

Definition at line 56 of file navrecord.hxx.


The documentation for this class was generated from the following files: