-
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
Reorganize reference frame module and add more transformations #105
Conversation
Transformation { | ||
from: ReferenceFrame::ITRF2014, | ||
to: ReferenceFrame::NAD83_CSRS, | ||
params: TimeDependentHelmertParams { |
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.
nit. In the future, I think the auto generating these transformations from a yaml might be a better approach. Also, I wonder if a hashmap would be a better container for access. Then you don't need to iterate over the array.
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.
I'm not sure how generating from a YAML file would significantly change anything? The YAML file will still be about as large, and will still have all these magic numbers in it that we'll have to obtain from elsewhere. I guess we could use the YAML file elsewhere?
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.
I agree, I was just thinking it was a lot of information, so removing any unnecessary lines could make it slightly more readable. But either way, it is still a lot of info, so not much of a gain compared to the effort.
@@ -142,13 +142,363 @@ fn euref_etrf2014() { | |||
); | |||
assert_float_eq!( | |||
result_coords.velocity().as_ref().unwrap().z(), | |||
0.0200, | |||
0.0198, |
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.
Did this value change because of a bug in a prior implementation or are you just bringing the threshold closer to the expected?
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.
The transformation being performed has changed, it was ITRF2020 to ETRF2014 but is now ITRF2014 to ETRF2014 so the result is slightly different.
This moves the hard coded transformation parameters to their own source file in an attempt keep things clean. It also adds many more transformations (primarily ITRF2020 to older ITRF versions, and from ITRF to the matching ETRF version). Finally a couple of structs and functions are marked as
pub
to allow others to implement their own transformation parameters instead of relying on own hard coded set of transformations only.