Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Range history saver #1

wants to merge 5 commits into from

Conversation

Pfisch23
Copy link

Added reading ranging + gps measurements. Also saves measurements every 30 minutes to new file

Copy link
Contributor

@jbwillis jbwillis left a 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}")
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Contributor

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)

Copy link
Contributor

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().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants