Пример #1
0
// 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 ));
}
Пример #2
0
//------------------------------------------------------------------------------
// 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;
}
Пример #3
0
// channel: returns the value of the channel field
inline int Navaid::channel() const
{
   return dsAtoln( makePointer(NA_CHANNEL_POS), NA_CHANNEL_LEN );
}
Пример #4
0
// 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 );
}
Пример #5
0
// length: returns the value of the runway length field
inline int Runway::length() const
{
   return dsAtoln( makePointer(RW_LENGTH_POS), RW_LENGTH_LEN );
}
Пример #6
0
// width: returns the value of the runway width field
inline int Runway::width() const
{
   return dsAtoln( makePointer(RW_WIDTH_POS), RW_WIDTH_LEN );
}
Пример #7
0
// formatCode: returns the value of the Format Code field
int Record::formatCode() const
{
   return dsAtoln( makePointer(FORMAT_CODE_POS), FORMAT_CODE_LEN );
}
Пример #8
0
// dafifRecordNumber: returns the value of the DAFIF Record Number field
int Record::dafifRecordNumber() const
{
   return dsAtoln( makePointer(RECORD_NUMBER_POS), RECORD_NUMBER_LEN );
}
Пример #9
0
// stateCode: returns the value of the State/Province Code field
int Record::stateCode() const
{
   return dsAtoln( makePointer(ptbl->stateCode), ptbl->stateLength );
}