From 6bdffcb70e72d6807eb47783b56ce2c8d74d8cca Mon Sep 17 00:00:00 2001 From: spv Date: Tue, 29 Jul 2025 14:37:15 -0400 Subject: weeeeeeeeee --- src/log_shit.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/log_shit.py') diff --git a/src/log_shit.py b/src/log_shit.py index ef2b633..a60711f 100644 --- a/src/log_shit.py +++ b/src/log_shit.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import sys, time +import sys, time, subprocess try: log_file = sys.argv[1] @@ -18,4 +18,22 @@ except: print("file: %s\n\ how often: %f\n\ -how long: %f" % (log_file, how_often, time_to_do_it)) \ No newline at end of file +how long: %f" % (log_file, how_often, time_to_do_it)) + +start = time.time() +now = time.time + +print("we out here, yo", flush=True) +while (start + time_to_do_it) > now(): +# print("we out here, yo", flush=True) + + lat, lon, alt = [float(x) for x in subprocess.getoutput("src/dirty_hack").split(",")] + + print("%f: %f, %f, %f" % (time.time_ns() / (10**9), lat, lon, alt)) + f.write("%f: %f, %f, %f\n" % (time.time_ns() / (10**9), lat, lon, alt)) + + f.flush() + + time.sleep(how_often) + +f.close() \ No newline at end of file -- cgit v1.2.3