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 /tests/ folder contains two simulated AIS datasets in Sentinel-1 ISP format. The first dataset contains a short test with only 2 ISPs and should take a few seconds to run. The run the scripts on this test data, use:
python process_s1_ais_raw.py ./tests/S1C_AI_SHORT.SAFE/ -o ./tests/output_shortNo detection are expected at the output of this test dataset. The second test contains a longer dataset, which will take a couple minutes to run.
python process_s1_ais_raw.py ./tests/S1C_AI_RAW__0____20220531T155630_20220531T155744_000016________2D48.SAFE/ -o ./tests/outputThe expected output can be found in the directory /tests/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 (.asc)
- 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 ESA AIS receiver subfunction takes multiple AIS channels (.asc files) as input demodulates them in parallel.
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_mac <output_path> <input .asc file1>...<input .asc fileN> <data_len1>...<data_len1N>Input parameters are defined as follows:
| Parameter | Description |
|---|---|
<data_len> |
AIS message bit lengths: 168 for heritage AIS Channels (162 MHz) or 96 for SAT-AIS Channels (156 MHz) |
<output_path> |
Output directory where the AIS detections (.txt) will be saved |
<input .asc files> |
Input .asc files containing the raw IQ AIS data sampled at 28.8 kHz (real, image) |
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 |
./AIS_receiver_mac ./output ais_ch0_pol_H.asc ais_ch3_pol_H.asc 168 96To 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.
