969 std::vector<double> finalParameterValues;
972 int nAngleParameters = 0;
973 int nRadiusParameters = 0;
975 finalParameterValues.push_back(
m_raPole[0].degrees());
976 parameterNamesList.append( str.arg(
"POLE RA ") );
980 finalParameterValues.push_back(
m_raPole[1].degrees());
981 parameterNamesList.append( str.arg(
"POLE RAv ") );
985 finalParameterValues.push_back(
m_raPole[2].degrees());
986 parameterNamesList.append( str.arg(
"POLE RAa ") );
990 finalParameterValues.push_back(
m_decPole[0].degrees());
991 parameterNamesList.append( str.arg(
"POLE DEC ") );
995 finalParameterValues.push_back(
m_decPole[1].degrees());
996 parameterNamesList.append( str.arg(
"POLE DECv ") );
1000 finalParameterValues.push_back(
m_decPole[2].degrees());
1001 parameterNamesList.append( str.arg(
"POLE DECa ") );
1005 finalParameterValues.push_back(
m_pm[0].degrees());
1006 parameterNamesList.append( str.arg(
" PM ") );
1010 finalParameterValues.push_back(
m_pm[1].degrees());
1011 parameterNamesList.append( str.arg(
" PMv ") );
1015 finalParameterValues.push_back(
m_pm[2].degrees());
1016 parameterNamesList.append( str.arg(
" PMa ") );
1020 finalParameterValues.push_back(
m_radii[0].kilometers());
1021 finalParameterValues.push_back(
m_radii[1].kilometers());
1022 finalParameterValues.push_back(
m_radii[2].kilometers());
1023 parameterNamesList.append( str.arg(
" RadiusA ") );
1024 parameterNamesList.append( str.arg(
" RadiusB ") );
1025 parameterNamesList.append( str.arg(
" RadiusC ") );
1026 nRadiusParameters += 3;
1029 finalParameterValues.push_back(
m_meanRadius.kilometers());
1030 parameterNamesList.append( str.arg(
"MeanRadius ") );
1031 nRadiusParameters++;
1034 int nParameters = nAngleParameters + nRadiusParameters;
1037 QString finalqStr =
"";
1042 for (
int i = 0; i < nAngleParameters; i++) {
1049 if (errorPropagation) {
1051 qStr = QString(
"%1%2%3%4%5%6\n").
1052 arg( parameterNamesList.at(i) ).
1053 arg(finalParameterValues[i] - corr_temp.
degrees(), 17,
'f', 8).
1054 arg(corr_temp.
degrees(), 21,
'f', 8).
1055 arg(finalParameterValues[i], 20,
'f', 8).
1061 qStr = QString(
"%1%2%3%4%5%6\n").
1062 arg( parameterNamesList.at(i) ).
1063 arg(finalParameterValues[i] - corr_temp.
degrees(), 17,
'f', 8).
1064 arg(corr_temp.
degrees(), 21,
'f', 8).
1065 arg(finalParameterValues[i], 20,
'f', 8).
1072 for (
int i = nAngleParameters; i < nParameters; i++) {
1079 if (errorPropagation) {
1080 double d1 = finalParameterValues[i];
1082 qStr = QString(
"%1%2%3%4%5%6\n").
1083 arg( parameterNamesList.at(i) ).
1084 arg(d1 - d2, 17,
'f', 8).
1085 arg(d2, 21,
'f', 8).
1086 arg(d1, 20,
'f', 8).
1091 double d1 = finalParameterValues[i];
1093 qStr = QString(
"%1%2%3%4%5%6\n").
1094 arg( parameterNamesList.at(i) ).
1095 arg(d1 - d2, 17,
'f', 8).
1096 arg(d2, 21,
'f', 8).
1097 arg(d1, 20,
'f', 8).
1191 std::set<int> targetParameterSolveCodes;
1192 PvlObject::PvlGroupIterator g;
1193 for (g = tbObject.beginGroup(); g != tbObject.endGroup(); ++g) {
1194 if (g->hasKeyword(
"Ra")) {
1196 str = g->findKeyword(
"Ra")[0];
1198 catch (IException &e) {
1199 QString msg =
"Ra must be given as none, position, velocity, or acceleration";
1200 throw IException(IException::User, msg, _FILEINFO_);
1202 if (str ==
"position") {
1203 targetParameterSolveCodes.insert(BundleTargetBody::PoleRA);
1205 else if (str ==
"velocity") {
1206 targetParameterSolveCodes.insert(BundleTargetBody::PoleRA);
1207 targetParameterSolveCodes.insert(BundleTargetBody::VelocityPoleRA);
1209 else if (str ==
"acceleration") {
1210 targetParameterSolveCodes.insert(BundleTargetBody::PoleRA);
1211 targetParameterSolveCodes.insert(BundleTargetBody::VelocityPoleRA);
1212 targetParameterSolveCodes.insert(BundleTargetBody::AccelerationPoleRA);
1216 if (g->hasKeyword(
"Dec")) {
1218 str = g->findKeyword(
"Dec")[0];
1220 catch (IException &e) {
1221 QString msg =
"Dec must be given as none, position, velocity, or acceleration";
1222 throw IException(IException::User, msg, _FILEINFO_);
1224 if (str ==
"position") {
1225 targetParameterSolveCodes.insert(BundleTargetBody::PoleDec);
1227 else if (str ==
"velocity") {
1228 targetParameterSolveCodes.insert(BundleTargetBody::PoleDec);
1229 targetParameterSolveCodes.insert(BundleTargetBody::VelocityPoleDec);
1231 else if (str ==
"acceleration") {
1232 targetParameterSolveCodes.insert(BundleTargetBody::PoleDec);
1233 targetParameterSolveCodes.insert(BundleTargetBody::VelocityPoleDec);
1234 targetParameterSolveCodes.insert(BundleTargetBody::AccelerationPoleDec);
1238 if (g->hasKeyword(
"Pm")) {
1240 str = g->findKeyword(
"Pm")[0];
1242 catch (IException &e) {
1243 QString msg =
"Pm must be given as none, position, velocity, or acceleration";
1244 throw IException(IException::User, msg, _FILEINFO_);
1246 if (str ==
"position") {
1247 targetParameterSolveCodes.insert(BundleTargetBody::PM);
1249 else if (str ==
"velocity") {
1250 targetParameterSolveCodes.insert(BundleTargetBody::PM);
1251 targetParameterSolveCodes.insert(BundleTargetBody::VelocityPM);
1253 else if (str ==
"acceleration") {
1254 targetParameterSolveCodes.insert(BundleTargetBody::PM);
1255 targetParameterSolveCodes.insert(BundleTargetBody::VelocityPM);
1256 targetParameterSolveCodes.insert(BundleTargetBody::AccelerationPM);
1260 if (g->hasKeyword(
"RadiiSolveOption")) {
1262 str = g->findKeyword(
"RadiiSolveOption")[0];
1264 catch (IException &e) {
1265 QString msg =
"RadiiSolveOption must be given as none, triaxial, or mean";
1266 throw IException(IException::User, msg, _FILEINFO_);
1268 if (str ==
"triaxial") {
1269 targetParameterSolveCodes.insert(BundleTargetBody::TriaxialRadiusA);
1270 targetParameterSolveCodes.insert(BundleTargetBody::TriaxialRadiusB);
1271 targetParameterSolveCodes.insert(BundleTargetBody::TriaxialRadiusC);
1272 solveRadiiMethod =
All;
1274 else if (str ==
"mean") {
1275 targetParameterSolveCodes.insert(BundleTargetBody::MeanRadius);
1276 solveRadiiMethod =
Mean;
1279 solveRadiiMethod =
None;
1283 Angle aprioriPoleRA;
1285 Angle aprioriVelocityPoleRA;
1286 Angle poleRAVelocitySigma;
1287 Angle aprioriAccelerationPoleRA;
1288 Angle poleRAAccelerationSigma;
1289 Angle aprioriPoleDec;
1291 Angle aprioriVelocityPoleDec;
1292 Angle sigmaVelocityPoleDec;
1293 Angle aprioriAccelerationPoleDec;
1294 Angle sigmaAccelerationPoleDec;
1297 Angle aprioriVelocityPM;
1298 Angle sigmaVelocityPM;
1299 Angle aprioriAccelerationPM;
1300 Angle pmAccelerationSigma;
1312 for (g = tbObject.beginGroup(); g != tbObject.endGroup(); ++g) {
1313 if (g->hasKeyword(
"RaValue")) {
1315 d = (double)(g->findKeyword(
"RaValue"));
1317 catch (IException &e) {
1318 QString msg =
"RaValue must be a valid double (>= 0; blank defaults to 0).";
1319 throw IException(IException::User, msg, _FILEINFO_);
1324 if (g->hasKeyword(
"RaSigma")) {
1326 d = (double)(g->findKeyword(
"RaSigma"));
1328 catch (IException &e) {
1329 QString msg =
"RaSigma must be a valid double (>= 0; blank defaults to 0).";
1330 throw IException(IException::User, msg, _FILEINFO_);
1335 if (g->hasKeyword(
"RaVelocityValue")) {
1337 d = (double)(g->findKeyword(
"RaVelocityValue"));
1339 catch (IException &e) {
1340 QString msg =
"RaVelocityValue must be a valid double (>= 0; blank defaults to 0).";
1341 throw IException(IException::User, msg, _FILEINFO_);
1346 if (g->hasKeyword(
"RaVelocitySigma")) {
1348 d = (double)(g->findKeyword(
"RaVelocitySigma"));
1350 catch (IException &e) {
1351 QString msg =
"RaVelocitySigma must be a valid double (>= 0; blank defaults to 0).";
1352 throw IException(IException::User, msg, _FILEINFO_);
1357 if (g->hasKeyword(
"RaAccelerationValue")) {
1359 d = (double)(g->findKeyword(
"RaAccelerationValue"));
1361 catch (IException &e) {
1362 QString msg =
"RaAccelerationValue must be a valid double (>= 0; blank defaults to 0).";
1363 throw IException(IException::User, msg, _FILEINFO_);
1368 if (g->hasKeyword(
"RaAccelerationSigma")) {
1370 d = (double)(g->findKeyword(
"RaAccelerationSigma"));
1372 catch (IException &e) {
1373 QString msg =
"RaAccelerationSigma must be a valid double (>= 0; blank defaults to 0).";
1374 throw IException(IException::User, msg, _FILEINFO_);
1379 if (g->hasKeyword(
"DecValue")) {
1381 d = (double)(g->findKeyword(
"DecValue"));
1383 catch (IException &e) {
1384 QString msg =
"DecValue must be a valid double (>= 0; blank defaults to 0).";
1385 throw IException(IException::User, msg, _FILEINFO_);
1390 if (g->hasKeyword(
"DecSigma")) {
1392 d = (double)(g->findKeyword(
"DecSigma"));
1394 catch (IException &e) {
1395 QString msg =
"DecSigma must be a valid double (>= 0; blank defaults to 0).";
1396 throw IException(IException::User, msg, _FILEINFO_);
1401 if (g->hasKeyword(
"DecVelocityValue")) {
1403 d = (double)(g->findKeyword(
"DecVelocityValue"));
1405 catch (IException &e) {
1406 QString msg =
"DecVelocityValue must be a valid double (>= 0; blank defaults to 0).";
1407 throw IException(IException::User, msg, _FILEINFO_);
1412 if (g->hasKeyword(
"DecVelocitySigma")) {
1414 d = (double)(g->findKeyword(
"DecVelocitySigma"));
1416 catch (IException &e) {
1417 QString msg =
"DecVelocitySigma must be a valid double (>= 0; blank defaults to 0).";
1418 throw IException(IException::User, msg, _FILEINFO_);
1423 if (g->hasKeyword(
"DecAccelerationValue")) {
1425 d = (double)(g->findKeyword(
"DecAccelerationValue"));
1427 catch (IException &e) {
1428 QString msg =
"DecAccelerationValue must be a valid double (>= 0; blank defaults to 0).";
1429 throw IException(IException::User, msg, _FILEINFO_);
1434 if (g->hasKeyword(
"DecAccelerationSigma")) {
1436 d = (double)(g->findKeyword(
"DecAccelerationSigma"));
1438 catch (IException &e) {
1439 QString msg =
"DecAccelerationSigma must be a valid double (>= 0; blank defaults to 0).";
1440 throw IException(IException::User, msg, _FILEINFO_);
1445 if (g->hasKeyword(
"PmValue")) {
1447 d = (double)(g->findKeyword(
"PmValue"));
1449 catch (IException &e) {
1450 QString msg =
"PmValue must be a valid double (>= 0; blank defaults to 0).";
1451 throw IException(IException::User, msg, _FILEINFO_);
1456 if (g->hasKeyword(
"PmSigma")) {
1458 d = (double)(g->findKeyword(
"PmSigma"));
1460 catch (IException &e) {
1461 QString msg =
"PmSigma must be a valid double (>= 0; blank defaults to 0).";
1462 throw IException(IException::User, msg, _FILEINFO_);
1468 if (g->hasKeyword(
"PmVelocityValue")) {
1470 d = (double)(g->findKeyword(
"PmVelocityValue"));
1472 catch (IException &e) {
1473 QString msg =
"PmVelocityValue must be a valid double (>= 0; blank defaults to 0).";
1474 throw IException(IException::User, msg, _FILEINFO_);
1479 if (g->hasKeyword(
"PmVelocitySigma")) {
1481 d = (double)(g->findKeyword(
"PmVelocitySigma"));
1483 catch (IException &e) {
1484 QString msg =
"PmVelocitySigma must be a valid double (>= 0; blank defaults to 0).";
1485 throw IException(IException::User, msg, _FILEINFO_);
1490 if (g->hasKeyword(
"PmAccelerationValue")) {
1492 d = (double)(g->findKeyword(
"PmAccelerationValue"));
1494 catch (IException &e) {
1495 QString msg =
"PmAccelerationValue must be a valid double (>= 0; blank defaults to 0).";
1496 throw IException(IException::User, msg, _FILEINFO_);
1501 if (g->hasKeyword(
"PmAccelerationSigma")) {
1503 d = (double)(g->findKeyword(
"PmAccelerationSigma"));
1505 catch (IException &e) {
1506 QString msg =
"PmAccelerationSigma must be a valid double (>= 0; blank defaults to 0).";
1507 throw IException(IException::User, msg, _FILEINFO_);
1512 if (g->hasKeyword(
"RadiusAValue")) {
1514 d = (double)(g->findKeyword(
"RadiusAValue"));
1516 catch (IException &e) {
1517 QString msg =
"RadiusAValue must be a valid double (blank defaults to 0).";
1518 throw IException(IException::User, msg, _FILEINFO_);
1523 catch (IException &e) {
1524 QString msg =
"RadiusAValue must be >= 0.";
1525 throw IException(IException::User, msg, _FILEINFO_);
1529 if (g->hasKeyword(
"RadiusASigma")) {
1531 d = (double)(g->findKeyword(
"RadiusASigma"));
1533 catch (IException &e) {
1534 QString msg =
"RadiusASigma must be a valid double (blank defaults to 0).";
1535 throw IException(IException::User, msg, _FILEINFO_);
1540 catch (IException &e) {
1541 QString msg =
"RadiusASigma must be >= 0.";
1542 throw IException(IException::User, msg, _FILEINFO_);
1546 if (g->hasKeyword(
"RadiusBValue")) {
1548 d = (double)(g->findKeyword(
"RadiusBValue"));
1550 catch (IException &e) {
1551 QString msg =
"RadiusBValue must be a valid double (blank defaults to 0).";
1552 throw IException(IException::User, msg, _FILEINFO_);
1557 catch (IException &e) {
1558 QString msg =
"RadiusBValue must be >= 0.";
1559 throw IException(IException::User, msg, _FILEINFO_);
1563 if (g->hasKeyword(
"RadiusBSigma")) {
1565 d = (double)(g->findKeyword(
"RadiusBSigma"));
1567 catch (IException &e) {
1568 QString msg =
"RadiusBSigma must be a valid double (blank defaults to 0).";
1569 throw IException(IException::User, msg, _FILEINFO_);
1574 catch (IException &e) {
1575 QString msg =
"RadiusBSigma must be >= 0.";
1576 throw IException(IException::User, msg, _FILEINFO_);
1580 if (g->hasKeyword(
"RadiusCValue")) {
1582 d = (double)(g->findKeyword(
"RadiusCValue"));
1584 catch (IException &e) {
1585 QString msg =
"RadiusCValue must be a valid double (blank defaults to 0).";
1586 throw IException(IException::User, msg, _FILEINFO_);
1591 catch (IException &e) {
1592 QString msg =
"RadiusCValue must be >= 0.";
1593 throw IException(IException::User, msg, _FILEINFO_);
1597 if (g->hasKeyword(
"RadiusCSigma")) {
1599 d = (double)(g->findKeyword(
"RadiusCSigma"));
1601 catch (IException &e) {
1602 QString msg =
"RadiusCSigma must be a valid double (blank defaults to 0).";
1603 throw IException(IException::User, msg, _FILEINFO_);
1608 catch (IException &e) {
1609 QString msg =
"RadiusCSigma must be >= 0.";
1610 throw IException(IException::User, msg, _FILEINFO_);
1614 if (g->hasKeyword(
"MeanRadiusValue")) {
1616 d = (double)(g->findKeyword(
"MeanRadiusValue"));
1618 catch (IException &e) {
1619 QString msg =
"MeanRadiusValue must be a valid double (blank defaults to 0).";
1620 throw IException(IException::User, msg, _FILEINFO_);
1625 catch (IException &e) {
1626 QString msg =
"MeanRadiusValue must be >= 0.";
1627 throw IException(IException::User, msg, _FILEINFO_);
1631 if (g->hasKeyword(
"MeanRadiusSigma")) {
1633 d = (double)(g->findKeyword(
"MeanRadiusSigma"));
1635 catch (IException &e) {
1636 QString msg =
"MeanRadiusSigma must be a valid double (blank defaults to 0).";
1637 throw IException(IException::User, msg, _FILEINFO_);
1642 catch (IException &e) {
1643 QString msg =
"MeanRadiusSigma must be >= 0.";
1644 throw IException(IException::User, msg, _FILEINFO_);
1662 aprioriPoleRA, poleRASigma,
1663 aprioriVelocityPoleRA, poleRAVelocitySigma,
1664 aprioriPoleDec, poleDecSigma,
1665 aprioriVelocityPoleDec, sigmaVelocityPoleDec,
1667 aprioriVelocityPM, sigmaVelocityPM,
1669 aprioriRadiusA, sigmaRadiusA,
1670 aprioriRadiusB, sigmaRadiusB,
1671 aprioriRadiusC, sigmaRadiusC,
1672 aprioriMeanRadius, sigmaMeanRadius);
void setSolveSettings(std::set< int > targetParameterSolveCodes, Angle aprioriPoleRA, Angle sigmaPoleRA, Angle aprioriVelocityPoleRA, Angle sigmaVelocityPoleRA, Angle aprioriPoleDec, Angle sigmaPoleDec, Angle aprioriVelocityPoleDec, Angle sigmaVelocityPoleDec, Angle aprioriPM, Angle sigmaPM, Angle aprioriVelocityPM, Angle sigmaVelocityPM, TargetRadiiSolveMethod solveRadiiMethod, Distance aprioriRadiusA, Distance sigmaRadiusA, Distance aprioriRadiusB, Distance sigmaRadiusB, Distance aprioriRadiusC, Distance sigmaRadiusC, Distance aprioriMeanRadius, Distance sigmaMeanRadius)
Sets the solve settings for the target body.