/py_iec_61162

A Python package that implements parts of the IEC 61162 series of standards, 'Maritime Navigation and Radiocommunication Equipment and Systems - Digital Interfaces'.

Primary LanguagePythonApache License 2.0Apache-2.0

The IEC 61162 Python Package

Description

The IEC 61162 Python Package implements parts of the IEC 61162 series of standards, 'Maritime Navigation and Radiocommunication Equipment and Systems - Digital Interfaces'. Currently, support is included for the following parts:

  • Part 1, 'Single talker and multiple listeners'; and
  • Part 450, 'Multiple talkers and multiple listeners - Ethernet interconnection'.

The package has been developed using Python v.3.11.1.

Installation

  1. Ensure Python and the PDM dependency manager are installed.

  2. Clone the GRAD py_iec_61162 repository.

    git clone https://github.com/gla-rad/py_iec_61162.git
    
  3. Navigate to the local repository.

    cd py_iec_61162
    
  4. Install the IEC 61162 package and its dependencies from the pdm.lock file.

    pdm sync --prod
    

    Upon successful execution of the above command, pdm will generate a virtual Python environment in ./.venv/ and install the package along with its required dependencies into it in production mode.

Code Usage

The main modules of the Rec. ITU-R M.1371 package are located under ./src/iec_61162/. The code is structured as outlined below.

For examples of usage, see the source code in this repository and the repositories linked under 'Related Projects'.

Subpackage: part_1

Module: sentences.py

This module contains classes and functions for representing, generating and, in the future, parsing presenation interface sentences compliant with the IEC 61162-1:2016 standard.

Currently, support has been implemented for the following sentence formatters:

  • BBM, 'AIS binary broadcast message'; and
  • VDM, 'AIS VHF data-link message'.

Subpackage: part_450

Module: messages.py

This module contains classes and functions for representing, generating and, in the future, parsing messages compliant with the IEC 61162-450:2018 standard.

Currently, support has been implemented for messages encapsulating IEC 61162-1-like sentences.

Contributing

We welcome contributions! If you wish to contribute to this project, please follow these steps:

  1. Fork the repository and create a new branch.

  2. Clone your repository to your local machine.

    git clone <your_repository_address>
    cd py_iec_61162
    
  3. Install the package in development mode using PDM.

    pdm sync --dev
    

    Note: The development installation includes dependencies for the Spyder IDE, which may not be necessary if you are using a different IDE.

  4. Make your changes and test thoroughly.

  5. Submit a pull request with a clear description of your changes.

Tests

This is currently work in progress.

Unit test modules are expected to be located under ./tests/. The chosen testing framework for this project is pytest, included as part of the development installation.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Support

Email: Jan.Safar@gla-rad.org

Issue Tracker: GitHub Issues

Related Projects

Python

Java