libacarsd version 1.40		http://www.acarsd.org/libacarsd.html
--------------------------------------------------------------------

Although there is no warranty provided with libacarsd, I would welcome any
comments, problem reports and other feedback you may have concerning
this software.

You can contact me by email acarsd@acarsd.org


DESCRIPTION:
============
libacarsd translate soundsignals from aircrafts into human readable
format. For more information on this go to www.acarsd.org
You can use libacarsd to create you own ACARS decoder software under
Linux (i can compile libs for other systems on request)

Init
----
The first call should be acarsd_init(buffersize,sampling,passes)
buffersize - is the size of each soundbuffer
sampling   - is the sampling rate. Only 3 rates supported at the moment
passes     - how many passes for each buffer

Destroy
-------
There is a acarsd_destroy function but at the moment you dont have to
call it. 

What makes libacarsd for you?
-----------------------------
libacarsd try to decode the given soundbuffer into a defined structure
(see typedef ACD from libacarsd.h)
Your software should read the sound [call some filter routines] and
than you should call

     ACARS_Decoder(unsigned char *buffer)

where buffer is the adress of your soundbuffer. If libacarsd find a
transmission within your soundstream than ACARS_Decoder exits with
ACD_SUCCESS and you have to read the ACD structure and display the
decoded data.
libacarsd run x passes on each buffer. Therefore you have to check the
global variable acarsd_codepos where you'll find the count of filled
codeholder structures.
See the following example (note: c is a pointer of char to a loaded
soundfile)

    while (ACARS_Decoder(c)) {
	for (i=0;i<acarsd_codepos;i++) {
	    for (j=0;j<=codeholder[i].len;j++) {
		if (codeholder[i].c[j].data < 32) 
		    fprintf(stdout,"<%s>",spec[codeholder[i].c[j].data]);
		else
		    fprintf(stdout,"%c",codeholder[i].c[j].data);
		
	    } 
	    fprintf(stdout,"\n---\n");
	}
    }
    
NOTE: The translation table for characters < 32 is included within
libacarsd. You can use this by referencing to spec[0..31] 

The ACD structure provide you some usefull informations about each
filled codeholder buffer.
Please read the libacarsd.h for these switches.

Features
--------
- libacarsd makes always a CRC/FCB check and if the message is validated
  libacarsd set the crc field within the codeholder structure to 0.

- libacarsd is no single pass decoder. You can set the count of passes
  with the acarsd_init function

- libacarsd uses codetables to improve the results

INSTALL:
========
Copy libacarsd.so and/or libacarsd.a to one of your lib
directories. You can also call libacarsd.* from your local directory
by adding -L./ to your compiler commandline.
Copy libacarsd.h to /usr/include/ or to your local project directory.

Compile you software with the following commandline:
gcc yourproject.c -s -Wall -O3 -o yourproject -L./ -lacarsd
    or
gcc yourproject.c -s -Wall -O3 -o yourproject -lacarsd

TEST:
=====
I have included a soundfile 'sndfile.snd' with some ACARS
transmissions included. You can compile the distributed test.c with
the following commandline:

gcc test.c -s -Wall -O3 -o test -L./ -lacarsd

and than start with: ./test
You should see the following output:

CHECKSUM VALIDATED
*<SYN><SYN><SOH>C.TS-IMH<NAK>Q06<STX>S21ATU0553<ETX>
---
*<SYN><SYN><SOH>}&G,fLAA<NAK>Q03<STX>S<CAN>i>KNf<CAN>[<FS>A<NAK>6 f<NUL>
---
*<SYN><SYN><SOH>}&G,&<CAN><STX><ETX>
---
CHECKSUM VALIDATED
*<SYN><SYN><SOH>E.PH-MCHQ_ 3<STX>S88AMP0383<ETX>
---
CHECKSUM VALIDATED
*<SYN><SYN><SOH>E.PH-BXC<NAK>Q08<STX>S64AKL1581<ETX>
---

THANKS:
=======
Thanks to 
       Kjell Fuglestad for information about uplinks and squitters
       Franois Guillet for informations about the CRC/FCB


COMMERCIAL:
===========
For commercial use of libacarsd you have to pay for a license. 
Please contact me: acarsd@acarsd.org
