Skip to content

Range history saver#1

Open
Pfisch23 wants to merge 5 commits intomainfrom
range_history_saver
Open

Range history saver#1
Pfisch23 wants to merge 5 commits intomainfrom
range_history_saver

Conversation

@Pfisch23
Copy link
Copy Markdown

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

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