Created
January 1, 2024 15:00
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Format:
UNIXTIME - HEX