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

SCLK Bug fixes #44

Merged
merged 3 commits into from
Nov 4, 2024
Merged

SCLK Bug fixes #44

merged 3 commits into from
Nov 4, 2024

Conversation

Kelvinrr
Copy link
Collaborator

@Kelvinrr Kelvinrr commented Nov 4, 2024

Licensing

This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words:

This work is free and unencumbered software released into the public domain. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain.

  • I dedicate any and all copyright interest in this software to the public domain. I make this dedication for the benefit of the public at large and to the detriment of my heirs and successors. I intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

@@ -30,14 +30,15 @@
"kernels" : "pck00010_msgr_v[0-9]{2}.tpc"
}
},
"deps" : ["/mdis_att", "/messenger"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this caused errors when loading mdis CKs

Comment on lines +241 to +252
try {
scs2e_c(frameCode, sclk.c_str(), &et);
checkNaifErrors();
SPDLOG_DEBUG("strsclktoet({}, {}, {}) -> {}", frameCode, mission, sclk, et);
}
catch(exception &e) {
// we want the platforms code, if they passs in an instrument code (e.g. -85600), truncate it to (-85)
frameCode = (abs(frameCode / 1000) > 0) ? frameCode/1000 : frameCode;
scs2e_c(frameCode, sclk.c_str(), &et);
checkNaifErrors();
SPDLOG_DEBUG("strsclktoet({}, {}, {}) -> {}", frameCode, mission, sclk, et);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some missions like Viking need to use the full IK ID in order to get correct SCLK times, forcing the frame code from -43010 to -43 for some these mission caused confusing errors because it loaded the wrong SLCK ID.

The try except should solve this, try the key as passed in, if it fails try the short code. So for MRO Crism, -74010 will fail then try -74 and pass. But for Viking, which wants the code -27999 will pass the first time and won't get the incorrect code -74.

@Kelvinrr Kelvinrr merged commit 1e155f3 into main Nov 4, 2024
14 checks passed
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.

1 participant