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 
 

How to use libhomeradar - Examples

Here you'll find some examples on how to use the libhomeradar functions in your own program. For tests you can use our server which is connected to SBS-1 and Radarbox. The server should be up 24/7. ( see our latest news )

SBS-1 address		sbs1.libhomeradar.org		Port 33033
Radarbox address	radarbox.libhomeradar.org	Port 33333

These samples are created for the Linux version of libhomeradar and can be compiled with the following commandline under Linux.
FOR LINUX USERS: If you have the library not in your standard system library path, you should add the library location to your systems path with the following command

export LD_LIBRARY_PATH=<path to the library folder>

To use these examples under Windows (CYGWIN or MINGW) you have to include the Windows headerfile #include <windows.h> and replace the call to sleep(t) to Sleep(t*1000)

FOR WINDOWS USERS: Try our database contribution tool winsend2 - this is the best working example on how to use libhomeradar.dll

gcc -s -Wall -O3 <example.c> -o <output> -lhomeradar -lpthread -L./

 

Connecting to 2 hosts and show contacts This example will connect to two SBS-1 hosts and will show all the contacted aircrafts on stdout. The library will be initialized with the LHR_AUTOCONNECT flag to immediatly connect to added hosts....


Connect to hosts with event handler In this example we try to add 3 hosts to the library handle and for every host we add an event handler for the LHR_ONCONNECT, LHR_ONTIMEOUT, LHR_ONFAILED and LHR_ONLOSS event handler. All contacted...


Show contacts with full database support This example is nearly the same as example #1. Now we try to load the provided databases and now (if successfully loaded) all contacted aircrafts can be written will full type informations, flight ...


Connecting to one host with eventhandler This example will show you how to connect to a single SBS-1 source with an event listener for the LHR_ONCONTACT event. Contacted aircrafts will be written to the terminal. The lib will be initializ...


Show only Lufthansa aircrafts This example will connect to a single SBS-1 host and only aircrafts from the German Carrier 'Lufthansa' will be written to stdout. We use a single filter rule to realize this plan. For some filter ...


Connecting to a single host and get new contacts This example will connect to one SBS-1 host and only the new contacted aircrafts will be written to stdout. All other contacts will be ignored. The library will be initialized with the LHR_AUTOCONN...


Show all aircrafts within 100km from server This short example will try to establish a connection with our SBS-1 box and will set the GPS coordinates of the SBS-1 host location. Only aircrafts will be shown which are within an radius of 100k...


Show only aircrafts from the russian federation This example will establish a connection to our SBS-1 server and will display only aircrafts which are registered in the Russian Federation. This will be done by a filterrule ( see homeradar_addfil...


Extended filter rules in use This short example will connect to our SBS-1 host and will display only aircrafts from the Austrian carrier 'Austrian Airlines' and only aircrafts which are not build by Airbus. This will be realiz...


Connect to two hosts with statistic output Here we try to connect to two SBS-1 hosts. All contacted aircrafts will be written to stdout. New contacts will get a special output format. During shutdown of the program the usage statistics from...


libhomeradar database lookup samples This program will only initialize the libhomeradar handle but we will not add any hosts. Here you see the database lookups which can be made by libhomeradar. To enable database lookups you should l...


FullQueue event listener example This example will connect to our SBS-1 box and will immediatly new contacted aircrafts. All other contacts will be inserted into the libraries internal queue. After the queue has reached the limit ...


Connect to SBS1 and RadarBox This short example will connect to an SBS1 host and to an RadarBox host. There will be a listener on port 10000 installed on which you can see all decoded messages (telnet localhost 10000). After 5...


Connect to a socketserver on port 10000 With this example we will not add any hosts. We try to connect to a running libhomeradar instance which have a listener on port 10000 installed. (See example #13). The mode is LHR_POLL (active mode...


Send contacts to the collector server This example show you how to send your contact data to our collector server at collector.libhomeradar.org on port 8080 . All messages from the connected host will be send to the collector. This is ...


Connect to the Radarbox. Contacts are public This example will only connect to the Airnav Systems Radarbox and will send all contacts to our collector (collector.libhomeradar.org port 8080)


Importing data into libhomeradar libhomeradar provides a lot of possible import functions. You can import contacts as strings (format must be acceptable), as struct (see LHR_CONTACT) or by plain data (all needed input is given wit...


Connect to a server and enable data sharing This short example will demonstrate the data sharing option of libhomeradar. As known from SBS1 and Radarbox, you can also pickup all contacts over TCP/IP sockets. Since version 1.005 libhomeradar ...


libhomeradar's control interface Since version 1.005 libhomeradar comes with a small administration interface which is disabled by default. If the control interface is enabled, you can use a normal telnet session to connect to the...


Writing contact data to disc If you wish to share your data but currently you have no internet access, you can use the homeradar_dump2disc() function to write all contacts to a normal textfile which can later be imported by th...