Skip to content

Instantly share code, notes, and snippets.

View daniestevez's full-sized avatar

Daniel Estévez daniestevez

View GitHub Profile
@daniestevez
daniestevez / packets
Created June 2, 2016 15:37
ÑUSat-2 packets
* MESSAGE DEBUG PRINT PDU VERBOSE *
()
pdu_length = 64
contents =
0000: 1d 45 0c 59 8a 56 30 b4 9b 25 2e 12 70 c6 fa d9
0010: 11 fa 0d af 0a f7 e7 e9 8d 05 32 d5 ae 10 3d 7a
0020: 58 1d 42 bb ef 7a 64 6e 80 9b 63 0d 5a ee d8 08
0030: e9 f9 de 39 f1 a8 e9 43 cc 88 65 54 38 59 47 9f
***********************************
* MESSAGE DEBUG PRINT PDU VERBOSE *
@daniestevez
daniestevez / gps.py
Created August 16, 2016 14:13
Radiosonde to NMEA script
#!/usr/bin/python3 -u
import sys
for line in sys.stdin:
s = line.split(' ')
if len(s) < 14:
continue
time = s[4]
lat = s[7]
@daniestevez
daniestevez / direwolf-log
Last active September 11, 2016 10:08
HORYU-4 1k2 AFSK AX.25 telemetry
$ direwolf -t 0 -d p -B 1200 -r 22050 -b 8 - < HR4_CW_1200bps_200.wav
Dire Wolf version 1.1, December 2014
Audio input device for receive: stdin
Audio out device for transmit: default
Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, C, 22050 sample rate.
Note: PTT not configured for channel 0. (Ignore this if using VOX.)
Ready to accept AGW client application 0 on port 8000 ...
Use -p command line option to enable KISS pseudo terminal.
Ready to accept KISS client application on port 8001 ...
@daniestevez
daniestevez / gomx-1-beacon.c
Last active September 17, 2016 09:50
GOMX-1 beacon format
/* BEACON A */
struct __attribute__((__packed__)) cdh_beacon_a {
struct __attribute__((packed)) {
uint16_t bootcount; // Total boot count
int16_t temp1; // Board temp1 * 4 in [C]
int16_t temp2; // Board temp2 * 4 in [C]
int16_t panel_temp[6]; // Panel temperatures * 4 in [C]
} obc;
struct __attribute__((packed)) {
uint16_t byte_corr_tot; // Total bytes corrected by reed-solomon
@daniestevez
daniestevez / bpsk.patch
Created October 14, 2016 21:40
AutoFEC BPSK patch
diff --git a/python/auto_fec.py b/python/auto_fec.py
index 40ee4ed..a3c2df3 100644
--- a/python/auto_fec.py
+++ b/python/auto_fec.py
@@ -36,7 +36,7 @@ _puncture_matrices = [
_phase_multiplication = [
('0', 1),
- ('90', 1j),
+## ('90', 1j),
@daniestevez
daniestevez / ondd-udp-inject.c
Created October 15, 2016 10:26
ONDD UDP inject
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <netdb.h>
#include <netinet/in.h>
#include <unistd.h>
@daniestevez
daniestevez / fec-debug
Created October 24, 2016 19:29
Outernet FEC debug info
--------------------------------------------------------------------
FEC debug info for file opaks/dad7-Alt-right.html.tbz2 (FEC decoding not implemented yet)
ldpc:k=452,n=543,N1=2,seed=1000
Length of FEC data: 21780 bytes; File size: 109186 bytes
--------------------------------------------------------------------
--------------------------------------------------------------------
FEC debug info for file opaks/ed57-Amazon.com.html.tbz2 (FEC decoding not implemented yet)
ldpc:k=852,n=1023,N1=2,seed=1000
Length of FEC data: 41140 bytes; File size: 206080 bytes
@daniestevez
daniestevez / log
Created October 28, 2016 14:04
Outernet LDPC test
~/free-outernet $ python
Python 3.4.3 (default, Jan 11 2016, 14:18:01)
[GCC 4.9.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ldpc
>>> from functools import reduce
>>> data = [66, 98, 247, 43, 153, 140, 6, 61, 60, 144, 107, 112, 193, 108, 227, 134, 66, 220, 217, 1, 51, 2, 31, 29, 20, 3, 177, 125, 140, 42, 138, 90, 141, 194, 220, 245, 16, 158, 119, 23, 48, 31, 165, 40, 65, 121, 55, 227, 56, 62, 29, 201, 220, 10, 237, 130, 4, 66, 138, 14, 103, 129, 24, 25, 228, 49, 65, 172, 129, 163, 192, 86, 236, 83, 175, 238, 99, 190, 6, 16, 162, 198, 96, 157, 3, 248, 39, 129, 220, 237, 3, 217, 85, 54, 136, 147, 114, 32, 181, 65, 193, 231, 180, 204, 33, 223, 134, 148, 41, 100, 57, 107, 234, 106, 161, 167, 45, 110, 233, 154, 246, 120, 127, 190, 197, 199, 201, 2, 32, 223, 204, 11, 199, 190, 217, 133, 203, 254, 237, 113, 170, 153, 72, 183, 77, 229, 245, 63, 23, 27, 0, 194, 86, 51, 165, 22, 8, 177, 240, 248, 115, 135, 243, 248, 101, 227, 14, 170, 172, 11, 26, 39, 216, 178, 102, 123
@daniestevez
daniestevez / ks-1q
Created November 12, 2016 20:49
KS-1Q packet from K4KDR recording
peak frequency index: 4517 / 10841
samples per symbol: 2.400044
clock cycles per sample: 0.416659
clock phase in cycles between 1st and 2nd samples: 0.883642
clock phase in cycles at 1st sample: 0.675313
symbol count: 4517
[1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1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