Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t_stamp = time.mktime(gps.timestamp_utc)
- PLOG_FILE = f"{t_stamp}pressure.txt"
- start = time.monotonic_ns()
- deadline = start / 1e9 + 60
- with open((plog_path+PLOG_FILE), LOG_MODE) as pressfile:
- print(t_stamp, gps.latitude, gps.longitude, gps.altitude_m, file=pressfile)
- curr_time = start
- while curr_time < deadline:
- curr_time = (time.monotonic_ns() - start) / 1e9
- print(curr_time, lps.pressure, file=pressfile, flush=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement