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 
 

Predefined datatypes

Here you'll see all in libhomeradar.h defined datatypes and structs. Main types are LHR_CONTACT and LHR_STATS. All other types will be used for special database lookups only.


 

libhomeradar datatypes

/* Structure for airport resolver */
typedef struct {
  char *iata;		// IATA code
  char *icao;		// ICAO code
  char *name;		// Airport name
  char *country; 	// Country where the airport is located
  double LAT, LON;	// GPS coordinates 
} LHR_AP;

/* All airports of a contacted flight */
typedef struct {
  LHR_AP *airport;
  char apcode[6];       // Only available if airport lookup failed
                        // Will contain IATA or ICAO code of the unknown airport
  void *next;
} LHR_AIRPORTS;

/* Structure which will be filled with contacted aircrafts */
typedef struct {
  char icao24[7];	// ICAO24 code of the contacted aircraft
  char callsign[13];    // Transmitted callsign of this aircraft
  int newcontact;       // TRUE on AIR and FALSE on any other message
  double lat, lon;	// Current position (if available)
  int flightlevel;	// Current flightlevel (if available)
  int squawk;           // Current squawk for this aircraft
  int hostid;           // Contacted on this host
  int msgtype;          // Type of message (see MSG_* flags)
  int sbs1input;        // TRUE if based on SBS-1 socket, FALSE if from RB socket
  time_t contacted;     // Time when aircraft was contacted

  /* Translations or lookups */
  char *reg;		// Human readable registration (if lookup is enabled)
  char *manufacturer;   // Aircraft manufacturer
  char *model;          // Aircraft model
  char *details;        // Aircraft details
  char *cn;             // Aircraft construction number

  char flightnum[13];   // Current flightnumber
  char *route;          // Flight routing as DEP-ARR or DEP-VIA-VIA-ARR
  
  char *airline;        // Name of this airline
  char iata[3];         // IATA Code of this airline
  char icao[4];         // ICAO Code of this airline

  /* --------------------------------- */
  /* Available from libhomeradar 1.003 */
  /* --------------------------------- */
  char al_country[5];   // Country where the airline is registered
  char *country;        // Country where the aircraft registered
                        // Country lookup must be enabled with LHR_ICAO24_DECODER
  char *countrycode;    // Assigned country code (D=Germany, PH=Netherlands, SE=Sweden ...)

  LHR_AIRPORTS *airports; // All airports
} LHR_CONTACT;

/* Structure which will be returned by homeradar_stats function */
typedef struct {
  unsigned long bytes;  	// KBytes read from this host
  unsigned long messages;	// Extracted messages from this host
  unsigned long validmsgs;      // Messages which are used by libhomeradar
  unsigned long uniqueacs;      // How many unique aircrafts are contacted on this host
  int connected;        	// 1 = currently connected, 0 = not connected, -1 host deleted
  time_t online;		// How many seconds we are connected to this host

  // Lost contacts because of blocking or slow callback functions
  int lostcontacts;

  /* --------------------------------- */
  /* Available from libhomeradar 1.002 */
  /* --------------------------------- */
  // How many entries are replaced based on the translation table
  int translated;

  // Some stats about this handle
  int icao24_db_items;     	// How many icao24 are known
  int aircraft_db_items; 	// How many different aircrafts are known
  int airline_db_items; 	// How many different airlines are known
  int flight_db_items; 		// How many different flights are known
  int airport_db_items;		// How many different airports are known

  /* --------------------------------- */
  /* Available from libhomeradar 1.003 */
  /* --------------------------------- */
  double maxrange;              // Range leader (km)
  double maxrange_lat;          // Max range LAT position
  double maxrange_lon;          // Max range LON position
  char flightnum[13];           // Flightnumber of range leader

  /* --------------------------------- */
  /* Available from libhomeradar 1.004 */
  /* --------------------------------- */
  unsigned long pubitems;       // How many contacts send to public database
  unsigned long pubbytes;       // How many bytes send to public database
} LHR_STATS;

/* Structure for the hostlist functions */
typedef struct {
  char *hostname;		// Hostname of this host
  int hostid;			// Hostid of this host
  int port;			// Configured port for this host

  /* --------------------------------- */
  /* Available from libhomeradar 1.004 */
  /* --------------------------------- */
  int connected;                // TRUE (1) if this host is connected, FALSE (0) if not
  int hosttype;                 // LHR_RADARBOX or LHR_SBS1
} LHR_HOST;