Searching, please wait...

libhomeradar

easy collect aircraft information
~50,000,000 registered contacts
303894 unique aircraft records, 28.78% unresolved records
 ACARS DECODER Planespotting Network Kinetic Avionics AirNav Systems Airframes.org Atlas Tracking
libhomeradar - easy collect aircraft informations

libhomeradar is an easy to use library for all type of programming language which can use libraries. libhomeradar can connect to different sources to collect aircraft informations arround the world with extended informations, powerful filtering and structured data access.

libhomeradar is written in C and is available for Linux and Windows (2003, XP, NT, Vista).

Currently libhomeradar works with the Kinetic Avionics SBS-1 base station and the Airnav Systems Radarbox.


Yahoo! My Web  Google Bookmarks  Windows Live  Facebook  Ask  del.icio.us  Furl 
 

ICAO24-address resolving functions

Since libhomeradar 1.003 you can use the ICAO24-address resolving functions. For every contact you can get the country where the aircraft is registered and if you wish, you can also compare the aircraft registration and home of the airline against the resolved country and if they will not match, you can use the onmismatch event to inform your program.

The ICAO24-address resolver can be activated during the initialization of libhomeradar (Flag: LHR_ICAO24_DECODER) or with the libhomeradar_config() function. If you enable the ICAO24-address check with the config flag LHR_ICAO24_CCHECK the ICAO24-address resolver will automatically be activated.

/* Activating of ICAO24-address resolver */
int i = 1;
(void)homeradar_config(H, LHR_ICAO24_DECODER, &i);

/* Resolver will be enabled because the ICAO24 check is active */
int i = 1;
(void)homeradar_config(H, LHR_ICAO24_CCHECK, &i);

The resolved country will be written to the LHR_CONTACT element country and the countrycode (ICAO code) is available in the countrycode element.


 

Using ONMISMATCH event

With the ONMISMATCH event you can catch all contacts where the airline is not located in the same country as where the aircraft is registered.
Please note: You'll need an airline database where the country is available as third field within the textfile (as ICAO countyr code).

Example for the onmismatch callback:


/* Show contact if country of airline doesnt match a/c reg. country */
void mismatch(void *handle, const int *id, LHR_CONTACT *C) {
  printf("COUNTRY MISMATCH!\n");
  printf("Reg: %s [Expected %s for country %s but got %s]",
         C->reg,C->countrycode,C->country,C->al_country);
}

/* Init callback function for the onmismatch event */
(void)homeradar_onhandler(H, LHR_ONMISMATCH, serverid, mismatch);

Do not free the LHR_CONTACT memory within this callback function!
This is different from all the other callback functions!

Testing your translation file Docu
Table of contents
Running a local webserver to display contacts