A Python library for decoding FastNet protocol data streams.
Project description
pyfastnet
Fastnet is the propriatory protocol used by B&G on some older instruments, tested on Hydra/H2000. It might work on other systems. I developed this for personal use and publishing for general interest only.
Purpose
This library can be fed a stream of fastnet data, it will decode and return structured instrument data for further processing. Syncronisation, checksum and decoding is handled by the library.
Example input/output
Byte string from Fastnet including "FF051601E555610030566100185903A86B7F8700BB00016D08CD0DCB"
to_address: Entire System
from_address: Normal CPU (Wind Board in H2000)
command: Broadcast
-
True Wind Speed (Knots):
channel_id:0x55interpreted: 4.8
-
True Wind Speed (m/s):
channel_id:0x56interpreted: 2.4
-
True Wind Angle:
channel_id:0x59interpreted: 107.0
-
Velocity Made Good (Knots):
channel_id:0x7Finterpreted: 0.01
-
True Wind Direction:
channel_id:0x6Dinterpreted: 269.0
Important library calls - function
fastnetframebuffer.add_to_buffer(raw_input_data)fastnetframebuffer.get_complete_frames()
# Important library calls - debug
set_log_level(DEBUG)fastnetframebuffer.get_buffer_size()fastnetframebuffer.get_buffer_contents()
Companion App
- A full implementation can be found here, it takes input from a serial port or dummy file and broadcasts NMEA messages via UDP fastnet2ip
Installation
pip3 install pyfastnet
On a raspberry pi and some other systems this is done from with a virtual env
source ~/python_environment/bin/activate
pip3 install pyfastnet
deactivate
~/python_environment/bin/python3 pyfastnet.py -h
Acknowledgments / References
- trlafleur - Collector of significant background
- Oppedijk - Background
- timmathews - Significant implementation in Cpp
- Significant help from chatGPT!
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfastnet-1.1.1.tar.gz.
File metadata
- Download URL: pyfastnet-1.1.1.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a2b4f30c042c215052884568e7f97cf5a68b2d2348f9beab915adf5d8ecd9a2
|
|
| MD5 |
159d960fdb24b0591bfd1eea971e8a40
|
|
| BLAKE2b-256 |
844eeb2055b8cc39e0d733a90c585139b568336feb2af81b1241c458bd4beab2
|
File details
Details for the file pyfastnet-1.1.1-py3-none-any.whl.
File metadata
- Download URL: pyfastnet-1.1.1-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfaead94238f970b6eae8541a32d31a199411800afebfa975bc9e9b07da6ff07
|
|
| MD5 |
b45ff28a0067592c1cc83ff850ba8c8e
|
|
| BLAKE2b-256 |
1ff1f27fecc584753c4db00b49e7f15b549b7a5149758b074419246ff8c16094
|