From 3f4f18fc03a902bf5f16050ca10d4eb3d228c6ab Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 2 Jul 2022 07:12:20 -0400 Subject: [PATCH] Create TelemEncoding.h --- cubesatsim/TelemEncoding.h | 546 +++++++++++++++++++++++++++++++++++++ 1 file changed, 546 insertions(+) create mode 100644 cubesatsim/TelemEncoding.h diff --git a/cubesatsim/TelemEncoding.h b/cubesatsim/TelemEncoding.h new file mode 100644 index 00000000..fcd7f2e8 --- /dev/null +++ b/cubesatsim/TelemEncoding.h @@ -0,0 +1,546 @@ +/* + * TelemEncoding.h + * + * Created on: Feb 3, 2014 + * Author: fox + */ + +#ifndef TELEMENCODING_H_ +#define TELEMENCODING_H_ + +void update_rs( + unsigned char parity[32], // 32-byte encoder state; zero before each frame + unsigned char c // Current data byte to update +); + +#define CHARACTER_BITS 10 +#define CHARACTERS_PER_LONGWORD 3 +#define CHARACTER_MASK ((1<