Пример #1
0
// ident: returns the runway identifier field
inline void Runway::ident(char ident[], const WhichEnd whichEnd) const
{
   if (whichEnd == LOW_END)
      dsGetString(ident, makePointer(RW_LE_IDENT_POS), RW_XE_IDENT_LEN);
   else
      dsGetString(ident, makePointer(RW_HE_IDENT_POS), RW_XE_IDENT_LEN);
}
Пример #2
0
// radioClass: returns the value of the radio class field
inline void Navaid::radioClass(char rc[]) const
{
   dsGetString( rc, makePointer(NA_RADIO_CLASS_POS), NA_RADIO_CLASS_LEN );
}
Пример #3
0
// airportKey: returns the value of the airport identifier
inline void Runway::airportKey(char apKey[]) const
{
   dsGetString( apKey, makePointer(RW_APKEY_POS), AP_KEY_LEN );
}
Пример #4
0
// wac: returns the World Area Code field
void Record::wac(char code[]) const
{
   dsGetString( code, makePointer(ptbl->wac), ptbl->wacLength );
}
Пример #5
0
// cycleData: returns the Cycle Date field
void Record::cycleDate(char date[]) const
{
   dsGetString( date, makePointer(CYCLE_DATE_POS), CYCLE_DATE_LEN );
}
Пример #6
0
// dafifType: returns the DAFIF Type field
void Record::dafifType(char type[]) const
{
   dsGetString( type, makePointer(ptbl->type), ptbl->typeLength );
}
Пример #7
0
// countryCode: returns the country code field
void Record::countryCode(char country[]) const
{
   dsGetString( country, makePointer(ptbl->countryCode), ptbl->countryLength );
}
Пример #8
0
// name: returns the name field
void Record::name(char nname[]) const
{
   dsGetString( nname, makePointer(ptbl->name), ptbl->nameLength );
}
Пример #9
0
// ident: returns the identifier field
void Record::ident(char id[]) const
{
   dsGetString( id, makePointer(ptbl->ident), ptbl->identLength );
}
Пример #10
0
// key: returns the key field
void Record::key(char k[]) const
{
   dsGetString( k, makePointer(ptbl->key), ptbl->keyLength );
}
Пример #11
0
// icaoCode: returns the ICAO code field
void Record::icaoCode(char code[]) const
{
   dsGetString( code, makePointer(ICAO_CODE_POS), ICAO_CODE_LEN );
}
Пример #12
0
const char* AirportLoader::createIlsRecord(const Key* key)
{
   IlsKey* ilsk = (IlsKey*) key;

// ---
// first record (format == 5)
// ---

   // format code
   dsGetString(&irec[FORMAT_CODE_POS-1], "05", FORMAT_CODE_LEN );

   // transaction code
   fillSpaces(irec,TRANSACTION_CODE_POS-1);
   dsGetString(&irec[TRANSACTION_CODE_POS-1], "1", TRANSACTION_CODE_LEN);

   // key -- Airport id + runway id + component type
   fillSpaces(irec, ILS_KEY_POS-1);
   dsGetString(&irec[ILS_KEY_POS-1], ilsk->key, ILS_KEY_LEN);

   // Name
   fillSpaces(irec, ILS_NAME_POS-1);
   dsGetString(&irec[ILS_NAME_POS-1], ilsk->name, ILS_NAME_LEN);

   // Frequency 
   fillSpaces(irec, ILS_FREQUENCY_POS-1);
   int ifreq = int( ilsk->freq * 1000.0f + 0.5f );
   std::sprintf( &irec[ILS_FREQUENCY_POS-1], "%7dM", ifreq );

   // Channel 
   fillSpaces(irec, ILS_CHANNEL_POS-1);
   std::sprintf( &irec[ILS_CHANNEL_POS-1], "%3dX", ilsk->chan );

   // Glide slope
   fillSpaces(irec, ILS_GSA_POS-1);
   int igs = int( ilsk->gs * 100.0f + 0.5f );
   std::sprintf( &irec[ILS_GSA_POS-1], "%3d", igs );

   // Location of localizer or glide slope
   fillSpaces(irec, ILS_LOC_POS-1);
   if ( ilsk->type == Ils::glideSlope ) {
      irec[ILS_LOC_POS-1] = ' ';
   }
   else {
      irec[ILS_LOC_POS-1] = '+';
   }
   std::sprintf( &irec[ILS_LOC_POS], "%05d", ilsk->loc );

   // Elevation
   fillSpaces(irec, ILS_ELEVATION-1);
   std::sprintf( &irec[ILS_ELEVATION-1], "%5d", ilsk->elev );

   // Latitude
   fillSpaces(irec, ILS_LATITUDE-1);
   printLatitude( &irec[ILS_LATITUDE-1], ilsk->lat );

   // Longitude
   fillSpaces(irec, ILS_LONGITUDE-1);
   printLongitude( &irec[ILS_LONGITUDE-1], ilsk->lon );

// ---
// second record (format == 6)
// ---

   // format code
   fillSpaces(irec,FORMAT_CODE_POS+142-1);
   dsGetString(&irec[FORMAT_CODE_POS+142-1], "06", FORMAT_CODE_LEN );

   // transaction code
   fillSpaces(irec,TRANSACTION_CODE_POS+142-1);
   dsGetString(&irec[TRANSACTION_CODE_POS+142-1], "1", TRANSACTION_CODE_LEN);

   // key -- Airport id + runway id + component type
   fillSpaces(irec, ILS_KEY_POS+142-1);
   dsGetString(&irec[ILS_KEY_POS+142-1], ilsk->key, ILS_KEY_LEN);

   // identifier
   fillSpaces(irec, ILS_IDENT_POS-1);
   dsGetString(&irec[ILS_IDENT_POS-1], ilsk->id, ILS_IDENT_LEN);

   // Mag Var
   fillSpaces(irec, ILS_MAGVAR-1);
   printMagvar( &irec[ILS_MAGVAR-1], ilsk->magvar );

   // all finished
   fillSpaces(irec,ILS_RECORD_LEN);

   return irec;
}