// slope: returns the value of the runway end slope field inline float Runway::slope(const WhichEnd whichEnd) const { if (whichEnd == LOW_END) return static_cast<float>(dsAtoln( makePointer(RW_LE_SLOPE_POS), RW_XE_SLOPE_LEN )); else return static_cast<float>(dsAtoln( makePointer(RW_HE_SLOPE_POS), RW_XE_SLOPE_LEN )); }
//------------------------------------------------------------------------------ // dsFrequency() -- convert string to frequency (MHz) //------------------------------------------------------------------------------ float Record::dsFrequency(const char* const p) { long freq = 0; if (*p != 'U') { int i; for (i = 0; i < 7 && p[i] == ' '; i++) if (i < 7) { freq = dsAtoln(p, 7); if (*(p+7) == 'M') freq *= 1000; } } return static_cast<float>(freq)/1000000.0f; }
// channel: returns the value of the channel field inline int Navaid::channel() const { return dsAtoln( makePointer(NA_CHANNEL_POS), NA_CHANNEL_LEN ); }
// keyCode: returns the value of the NAVAID Key Code field inline int Navaid::keyCode() const { return dsAtoln( makePointer(NA_KEY_CODE_POS), NA_KEY_CODE_LEN ); }
// length: returns the value of the runway length field inline int Runway::length() const { return dsAtoln( makePointer(RW_LENGTH_POS), RW_LENGTH_LEN ); }
// width: returns the value of the runway width field inline int Runway::width() const { return dsAtoln( makePointer(RW_WIDTH_POS), RW_WIDTH_LEN ); }
// formatCode: returns the value of the Format Code field int Record::formatCode() const { return dsAtoln( makePointer(FORMAT_CODE_POS), FORMAT_CODE_LEN ); }
// dafifRecordNumber: returns the value of the DAFIF Record Number field int Record::dafifRecordNumber() const { return dsAtoln( makePointer(RECORD_NUMBER_POS), RECORD_NUMBER_LEN ); }
// stateCode: returns the value of the State/Province Code field int Record::stateCode() const { return dsAtoln( makePointer(ptbl->stateCode), ptbl->stateLength ); }