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

Allow error fix #5474

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions isis/src/base/objs/CameraPointInfo/CameraPointInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,23 +349,21 @@ namespace Isis {
}

if (!noErrors) {
if (!allowErrors) {
for (int i = 0; i < gp->keywords(); i++) {
QString name = (*gp)[i].name();
// These three keywords have 3 values, so they must have 3 NULLs
if (name == "BodyFixedCoordinate" || name == "SpacecraftPosition" ||
name == "SunPosition") {
(*gp)[i].addValue("NULL");
(*gp)[i].addValue("NULL");
(*gp)[i].addValue("NULL");
}
else {
(*gp)[i].setValue("NULL");
}
for (int i = 0; i < gp->keywords(); i++) {
QString name = (*gp)[i].name();
// These three keywords have 3 values, so they must have 3 NULLs
if (name == "BodyFixedCoordinate" || name == "SpacecraftPosition" ||
name == "SunPosition") {
(*gp)[i].addValue("NULL");
(*gp)[i].addValue("NULL");
(*gp)[i].addValue("NULL");
}
else {
(*gp)[i].setValue("NULL");
}
}
else {
double pB[3], spB[3], sB[3];
if (!allowErrors) {
double spB[3], sB[3];

m_camera->instrumentPosition(spB);
gp->findKeyword("SpacecraftPosition").addValue(toString(spB[0]), "km");
Expand Down Expand Up @@ -413,7 +411,6 @@ namespace Isis {
gp->findKeyword("LookDirectionCamera").addValue("Null");
gp->findKeyword("LookDirectionCamera").addValue("Null");
}

}

// Set all keywords that still have valid information
Expand Down