-
Notifications
You must be signed in to change notification settings - Fork 70
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
Use ZFP for compressing discrete trajectories #2485
Conversation
physics/discrete_trajectory_body.hpp
Outdated
downsampling_.has_value() ? downsampling_->tolerance() : Length(); | ||
ZfpCompressor length_compressor(length_tolerance / Metre); | ||
// Speeds are approximated based on the length tolerance and the average step | ||
// in the timeline. |
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.
Let us not average things over the timeline; this is meaningless (the timeline may behave completely differently at different times) and it might result in weird edge cases that are hard to find and test, e.g., an interplanetary trajectory (large Δt, thus requiring a small speed tolerance to keep the error of the Hermite interpolation in check) getting mangled by a long time spent in low orbit, or even just by a lot of dense intervals (low Δt, 10 s for dense intervals, driving the mean Δt down).
Use the max Δt.
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.
Done, PTAL.
serialization/physics.proto
Outdated
optional int32 zfp_codec_version = 7; | ||
optional int32 zfp_library_version = 8; | ||
optional bytes zfp_timeline = 5; | ||
optional int32 zfp_timeline_size = 6; |
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.
These should be wrapped in a message, since they are really optional and none or all should be present.
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.
Done, PTAL.
This seems to buy us a factor 4 in size, while complying with the downsampling tolerance of 10 m.
Helps with #2400.