Unpack binary messages from Satlantic instruments.
Project description
pySatlantic
Python package to unpack binary messages from Satlantic instruments.
This module provides a simple way to unpack binary messages from Satlantic instruments (e.g. HyperSAS, HyperPro, HTSRB, HyperNAV). This is likely not the fastest implementation of the Satlantic protocol parser. However, it is easy to use and fast enough to process hyperspectral spectrums from multiple sensors (e.g. HyperSAS & Es) on a Raspberry Pi 3 in real-time.
Installation
The package runs with python 3 and can be installed from the setup file or directly with pip.
# Installation through setup file
python setup.py install
# Installation through pip
pip install pySatlantic
Convert binary files recorded with SatView to CSV
The module can be used to convert raw files recorded with SatView to CSV files.
python -m pySatlantic [-h] [-v] [--version] [-i] cal src
or directly from the installed module
python -m pySatlantic.__main__ [-h] [-v] [--version] [-i] cal src
positional arguments: cal Calibration file. src Raw file to decode and calibrate.
optional arguments: -h, --help show this help message and exit -v, --verbose Enable verbosity. --version Prints version information. -i, --immersed Apply immersion coefficients.
Integrate in other software
The class Instrument
provides key methods to handle the binary frames from Satlantic instruments
read_calibration_file
/read_calibration_dir
/read_sip_file
: Parse calibration file(s) needed to unpack and calibrate binary frames.find_frame
: Find known frame in a binary arrayparse_frame
: Unpack binary frame and apply calibration fit to convert data in scientific units
The class Instrument
support the immersed flag for each sensor independently. The immersion flag is accessible through Instrument.cal[<frame_header>].immersed
with frame_header
being the sensor to be immersed or not.
The class BinReader
helps to separate individual frames looking for the registration bytes b'SAT'
. An example of usage of that class is SatViewRawToCSV
which converts a raw file recorded with SatView into a CSV file.
Sensors Tested
List of frames and associated calibration files tested:
- Es:
- HED
- HSE
- HyperSAS
- HLD
- HSL
- pySAS Tower
- UMTWR
- HTSRB
- HSD
- HST
- THS
- HyperPro
- HPE
- HPL
- MPR
- PED
- PLD
- SATBB2F
- SATFLCD
- HyperNAV
- SATXDZ
- SATXLZ
- SATXCZ
- SATYCZ
- OCR-504
- SATDI4
- NMEA
- $GPRMC
Some functionalities of the Satlantic protocol are not implemented. Please make a feature request if you would like to the support of specific sensors (through the 'Issues' section of the GitHub repository).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pysatlantic-0.4.2.tar.gz
.
File metadata
- Download URL: pysatlantic-0.4.2.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 028ebee831e15933abacc88ce27b41622a9d31462c98b9308b5aa67d0b8a834b |
|
MD5 | 537d43734ce07d2d70ae632c210648a3 |
|
BLAKE2b-256 | e4db6e5efa5180c15aa23990f2ef90f4309989c438749c1c190af6b619c0ef08 |
File details
Details for the file pySatlantic-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: pySatlantic-0.4.2-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7550f44ab51f1243df8470a9412bdafa2b1d2428445ca3f5e19dd01b70922cf5 |
|
MD5 | 0a7a8d677571805803683dee313f0118 |
|
BLAKE2b-256 | 15aca6c98af95275d1afca337a2cb6d2b761c2bb17307b5b723bf6b7d5a3702b |