Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding demodulator for ARGOS 4 PTT-VLD-A4 (A4-SS-TER-SP-0079-CNES) #12

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions ARGOS4VLDdemod/ByteSync.c

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions ARGOS4VLDdemod/ByteSync.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ifndef BYTESYNC_H
#define BYTESYNC_H
int FindSyncWords(unsigned char *bitStreamIn, double *bitStreamInTime, unsigned long nSamples, char *syncWord, unsigned int syncWordLength, FILE *minorFrameFile);
#endif
Binary file added ARGOS4VLDdemod/Capture.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions ARGOS4VLDdemod/RAW_Plotter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This code plots the 32-bit double data in the RAW
# file produced by Nebarnix's ARGOS Demodulator

import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import sys
import struct

y = []
x = []
count = 0
numBytes = 8

if (len(sys.argv) >= 3):
numBytes = int(sys.argv[2])

if numBytes == 8:
dataType = 'd'
if numBytes == 4:
dataType = 'f'

with open(sys.argv[1], "rb") as reader:

reader.seek(0,2) #Jumps to the end
endLocation = reader.tell() #Give you the end location (characters from start)
reader.seek(0) #Jump to the beginning of the file again

while True:
if numBytes == 1:
val = int.from_bytes(reader.read(numBytes), byteorder='little')
else:
val = struct.unpack(dataType,reader.read(numBytes))
y.append(val)
x.append(count)
count += 1
if reader.tell() == endLocation:
break

fig, ax = plt.subplots()
ax.plot(x, y, 'o-')

ax.set(xlabel='sample', ylabel='signal',
title=sys.argv[1])
ax.grid()

#fig.savefig("test.png")
plt.show()
Binary file not shown.
Binary file not shown.
Binary file added ARGOS4VLDdemod/demodARGOS.exe
Binary file not shown.
Binary file added ARGOS4VLDdemod/libgcc_s_dw2-1.dll
Binary file not shown.
Loading