Spice manager fix

This commit is contained in:
Emil Axelsson
2018-08-27 11:41:24 +02:00
parent 2f865f87c2
commit 57bbd33c1b
+6 -8
View File
@@ -47,8 +47,8 @@ namespace {
// If an error occurred, true is returned, otherwise, false
bool throwOnSpiceError(const std::string& errorMessage) {
SpiceBoolean failed = failed_c();
if (openspace::SpiceManager::ref().exceptionHandling()) {
if (failed) {
if (failed) {
if (openspace::SpiceManager::ref().exceptionHandling()) {
char buffer[SpiceErrorBufferSize];
getmsg_c("LONG", SpiceErrorBufferSize, buffer);
reset_c();
@@ -56,13 +56,9 @@ namespace {
errorMessage + ": " + buffer
);
}
else {
return false;
}
}
else {
return failed;
reset_c();
}
return failed;
}
const char* toString(openspace::SpiceManager::FieldOfViewMethod m) {
@@ -799,6 +795,8 @@ double SpiceManager::getEulerAngle(glm::dmat3 transformMatrix, int a)
&rot_x
);
throwOnSpiceError("Could not get Euler angle from transformation matrix");
//FIX
if (a == 1) return rot_x;
else if (a == 2) return rot_y;