This repository contains the end-to-end AIS processor developed at ESA–ESTEC for the Copernicus Sentinel-1 C&D mission.
The script process_s1_ais_raw.py
performs the end-to-end AIS processing, starting from the AIS Instrument Source Packets (ISPs) to AIS message content.
Raw AIS data is extracted and demodulated for all frequency channels and polarizations, including linear combinations at ±45 degrees.
Run the main Python script with the following command structure:
python process_s1_ais_raw.py <input_folder> -o <output_folder>
<input_folder>
: Path to the Sentinel-1 AIS SAFE folder containing the binary .dat
file.
<output_folder>
: Path where the processed output files will be saved.
The /Testcase/
folder contains a simulated AIS dataset in Sentinel-1 ISP format. To run the script on this test data, use:
python process_s1_ais_raw.py ./Testcase/S1C_AI_RAW__0____20220531T155630_20220531T155744_000016________2D48.SAFE/ -o ./Testcase/output
The expected output can be found in the directory /Testcase/output
. Note: for the specific testcase no detections are expected to be demodulated from the H-V input channel.
- Extracted ISP headers and de-interleaved raw data (.wav)
- Decoded AIS messages, named:
S1C_AI_L1_YYYYMMDDTHHMM_YYYYMMDDTHHMM.txt
- Binary detections from each AIS channel
- Summary report with statistics for each input stream
- List of invalid message detections
Demodulation of each AIS channel is based on the ESA-patented algorithm, Receiving Method And Receiver For Timing And Frequency Offset Correction Of Continuous Phase Demodulation In Satellite-Based Automatic Identification Systems (PCT/EP2014/051273).
The source code implementing the ESA-patented AIS algorithm is located in the directory /src/ESA_AIS_receiver_code/ and can be compiled using the Makefile
by running:
make
This will generate the AIS_receiver executable used by the Python script. Note: To run the executable within the Sentinel-1 AIS end-to-end processor (process_s1_ais_raw.py), the executable must be located in the main directory.
The compiled ESA AIS receiver can also be run independently from the Python script for a single channel as follows:
./AIS_receiver <data_len> <outputFile> <inputWavfile>
Input parameters are defined as follows:
Parameter | Description |
---|---|
<data_len> |
AIS message bit length: 168 for heritage AIS Channels (162 MHz) or 96 for SAT-AIS Channels (156 MHz) |
<outputFile> |
Output directory and filename (with .txt extension) where the AIS detections will be saved |
<inputWavfile> |
Input two-channel WAV file containing the raw IQ AIS data sampled at 28.8 kHz |
The executable loads the following files which must be present in the main directory before running:
Filename | Description |
---|---|
<h1.dat> |
Low-pass filter coefficients |
<h2.dat> |
Matched-filter coefficients |
<h3.dat> |
Low-pass filter (zonal) coefficients |
<h4.dat> |
Low-pass filter coefficients (mod. Meng-Mor. frequency estimation) |
<pulse.dat> |
GMSK pulse coefficients |
<error_files> |
Directory containing the syndrome error correction files |
The following Python packages are required to run the Sentinel-1 AIS processor:
bitarray==2.9.2
numpy==2.3.1
pandas==2.3.0
pyais==2.6.5
scipy==1.16.0
shapely==2.0.4
To install all dependencies, run:
pip install -r requirements.txt
[1] G. Colavolpe, T. Foggi, A. Ugolini, J. Lizarraga, S. Cioni, and A. Ginesi, A highly efficient receiver for satellite-based Automatic Identification System signal detection, 2014.
Licensed under the Apache License 2.0.