Skip to content

Instantly share code, notes, and snippets.

@matthewraaff
Created January 1, 2024 15:00
Show Gist options
  • Save matthewraaff/4af5a871985add8feca4061510f49f5a to your computer and use it in GitHub Desktop.
Save matthewraaff/4af5a871985add8feca4061510f49f5a to your computer and use it in GitHub Desktop.
Interpreting the "semi-raw" mode-s data file, and finding which downlink format comes up the most often
import pyModeS as pm
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
def openFile(filename: str="log.txt") -> list:
_f = open("log.txt", "r")
_ls = []
for _i in _f.readlines():
_ls.append(_i)
return _ls
x = openFile()[1:]
instances = {}
for item in x:
item = item.split(" - ")[1].replace("\n", "")
key = str(pm.df(item))
instances[key] = instances.get(key, 0) + 1
print(instances)
@matthewraaff
Copy link
Author

Format:
UNIXTIME - HEX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment