Code Monkey home page Code Monkey logo

ao-fec-rs's Introduction

Maintenance crates-io api-docs dependency-status

ao-fec: AltOS FEC using convolutional codes

Copyright © 2024 Bart Massey (Version 0.1.0)

This Rust library crate wraps Keith Packard's Forward Error Correction C code from AltOS git:git.gag.com/fw/altos. See https://github.com/BartMassey/ao-fec for the underlying code and details.

The C code underlying this library was originally written for AltOS embedded OS, used by Altus Metrum rocket telemetry hardware. For this reason, the error correction here is compatible (tested) with the hardware FEC in the Texas Instruments CC1111 radio chip.

CC1111 compatibility makes things a bit strange. The CC1111 uses a rate 1/2 limit 4 convolutional code. A CRC-16 checksum and one or two 0x00 pad bytes are appended to the payload before encoding. This ensures that the payload is even-length and that correct decoding can be checked.

The soft decoding code accepts one byte per bit and uses a Viterbi-style decoder.

The CC1111 limits block sizes to 128 bytes including header and padding. The underlying C code and this code have been generalized to allow arbitrary block sizes. That said, long blocks are probably not a good idea. If the decoder loses sync, it is likely to corrupt the entire remainder of a block. Further, the small CRC means that the possibility of a false positive on a damaged block is high.

Acknowledgments

The hard part of this is obviously Keith Packard's work. Thanks much! Thanks also to Keith for helping me debug and test this.

License

This code is licensed under the "GNU General Public License version 2". See the file csrc/LICENSE.txt in this codebase for licensing terms.

ao-fec-rs's People

Contributors

bartmassey avatar keith-packard avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.