-
Notifications
You must be signed in to change notification settings - Fork 4
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
SCLK Bug fixes #44
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,15 +236,20 @@ namespace SpiceQL { | |
KernelSet sclkSet(sclks); | ||
KernelSet lskSet(lsks); | ||
|
||
// 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; | ||
|
||
SpiceDouble et; | ||
checkNaifErrors(); | ||
scs2e_c(frameCode, sclk.c_str(), &et); | ||
checkNaifErrors(); | ||
SPDLOG_DEBUG("strsclktoet({}, {}, {}) -> {}", frameCode, mission, sclk, et); | ||
|
||
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); | ||
} | ||
Comment on lines
+241
to
+252
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
return et; | ||
} | ||
|
||
|
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.
this caused errors when loading mdis CKs