-
Notifications
You must be signed in to change notification settings - Fork 0
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
Range history saver #1
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Headed in the right direction, comments are mostly regarding getting it integrated into the rest of the pygnc system.
If you're having issues with the imports resolving while running it, let me know.
@@ -0,0 +1,25 @@ | |||
# from ..configuration.pygnc import batch_range_filepath | |||
|
|||
# print(f"Open {batch_range_filepath}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use this as the filepath to open
output_file = 'sparse_measurements.bin' | ||
|
||
# Replace 100 and 5 with your desired values for D and S | ||
D = 120 # Number of bytes to read and save |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put these constants in ../configuration/range_history_saver.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also reference Py4Data/example_range_parse/dataparser_range.py to get the correct value for D (it's not 120).
count += 1 | ||
if count % S == 0: | ||
outfile.write(data) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a main() function that pulls in the correct constants and calls read_and_save()
.
Added reading ranging + gps measurements. Also saves measurements every 30 minutes to new file