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

Reorganize reference frame module and add more transformations #105

Merged
merged 3 commits into from
Jul 12, 2024

Conversation

jbangelo
Copy link
Collaborator

@jbangelo jbangelo commented Jul 6, 2024

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.

Transformation {
from: ReferenceFrame::ITRF2014,
to: ReferenceFrame::NAD83_CSRS,
params: TimeDependentHelmertParams {

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.

Copy link
Collaborator Author

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?

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,

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?

Copy link
Collaborator Author

@jbangelo jbangelo Jul 12, 2024

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.

@jbangelo jbangelo merged commit 35f279e into master Jul 12, 2024
6 checks passed
@jbangelo jbangelo deleted the jbangelo/more-ref-frames branch July 12, 2024 21:53
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