Loading [MathJax]/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
BundleTargetBody.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "BundleTargetBody.h"
10 
11 #include <QDebug>
12 #include <QObject>
13 
14 #include "BundleSettings.h"
15 #include "IException.h"
16 #include "PvlGroup.h"
17 #include "PvlKeyword.h"
18 #include "PvlObject.h"
19 #include "Target.h"
20 
21 namespace Isis {
22 
28  m_parameterNamesList.clear();
29  m_parameterSolveCodes.clear();
30 
31  m_weights.clear();
32  m_corrections.clear();
33  m_solution.clear();
34  m_aprioriSigmas.clear();
35  m_adjustedSigmas.clear();
36 
37  m_radii.resize(3);
38  m_raPole.resize(3);
39  m_decPole.resize(3);
40  m_pm.resize(3);
41  }
42 
43 
51  m_parameterNamesList.clear();
52  //TODO This should probably be set to something based on the target. JAM
53  m_parameterSolveCodes.clear();
54 
55  m_weights.clear();
56  m_corrections.clear();
57  m_solution.clear();
58  m_aprioriSigmas.clear();
59  m_adjustedSigmas.clear();
60 
61  // initialize radii and coefficients from target
62  m_radii.resize(3);
63  m_radii[0] = target->radii().at(0);
64  m_radii[1] = target->radii().at(1);
65  m_radii[2] = target->radii().at(2);
66 
67  m_raPole.resize(3);
68  m_decPole.resize(3);
69  m_pm.resize(3);
70 
71  m_raPole = target->poleRaCoefs();
72  m_decPole = target->poleDecCoefs();
73  m_pm = target->pmCoefs();
74  }
75 
76 
84 
93 
94  m_radii = src.m_radii;
96 
97  m_raPole = src.m_raPole;
98  m_decPole = src.m_decPole;
99  m_pm = src.m_pm;
100 
102 
104 
105  m_weights = src.m_weights;
107  m_solution = src.m_solution;
110  }
111 
112 
117  }
118 
119 
126  if (this != &src) {
128 
137 
138  m_radii = src.m_radii;
140 
141  m_raPole = src.m_raPole;
142  m_decPole = src.m_decPole;
143  m_pm = src.m_pm;
144 
146 
148 
149  m_weights = src.m_weights;
151  m_solution = src.m_solution;
154  }
155 
156  return *this;
157  }
158 
159 
215  void BundleTargetBody::setSolveSettings(std::set<int> targetParameterSolveCodes,
216  Angle aprioriPoleRA, Angle sigmaPoleRA,
217  Angle aprioriVelocityPoleRA,
218  Angle sigmaVelocityPoleRA,
219  Angle aprioriPoleDec, Angle sigmaPoleDec,
220  Angle aprioriVelocityPoleDec,
221  Angle sigmaVelocityPoleDec,
222  Angle aprioriPM, Angle sigmaPM,
223  Angle aprioriVelocityPM,
224  Angle sigmaVelocityPM,
225  TargetRadiiSolveMethod solveRadiiMethod,
226  Distance aprioriRadiusA, Distance sigmaRadiusA,
227  Distance aprioriRadiusB, Distance sigmaRadiusB,
228  Distance aprioriRadiusC, Distance sigmaRadiusC,
229  Distance aprioriMeanRadius, Distance sigmaMeanRadius) {
230 
231  m_solveTargetBodyRadiusMethod = solveRadiiMethod;
232 
233  m_parameterSolveCodes = targetParameterSolveCodes;
234 
235  // size corrections and adjusted sigma vectors and set to zero
236  m_aprioriSigmas.resize(m_parameterSolveCodes.size());
237  m_aprioriSigmas.clear();
239  m_adjustedSigmas.clear();
240  m_weights.resize(m_parameterSolveCodes.size());
241  m_weights.clear();
242  m_corrections.resize(m_parameterSolveCodes.size());
243  m_corrections.clear();
244 
245 // ken testing
246  m_raPole[0] = aprioriPoleRA;
247  m_raPole[1] = aprioriVelocityPoleRA;
248  m_raPole[2] = Angle(0.0,Angle::Radians);
249  m_decPole[0] = aprioriPoleDec;
250  m_decPole[1] = aprioriVelocityPoleDec;
251  m_decPole[2] = Angle(0.0,Angle::Radians);
252  m_pm[0] = aprioriPM;
253  m_pm[1] = aprioriVelocityPM;
254  m_pm[2] = Angle(0.0,Angle::Radians);
255 // ken testing
256 
257 
258  int n = 0;
259  if (solvePoleRA()) {
260  m_parameterSolveCodes.insert(PoleRA);
261  m_raPole[0] = aprioriPoleRA;
262 
263  if (sigmaPoleRA.degrees() > 0.0) {
264  m_aprioriSigmas(n) = sigmaPoleRA.degrees();
265  m_weights(n) = 1.0/(sigmaPoleRA.radians()*sigmaPoleRA.radians());
266  }
267  else {
268  m_aprioriSigmas(n) = -1.0;
269  m_weights(n) = -1.0;
270  }
271  n++;
272  }
273 
274  if (solvePoleRAVelocity()) {
275  m_parameterSolveCodes.insert(VelocityPoleRA);
276  m_raPole[1] = aprioriVelocityPoleRA;
277 
278  if (sigmaVelocityPoleRA.degrees() > 0.0) {
279  m_aprioriSigmas(n) = sigmaVelocityPoleRA.degrees();
280  m_weights(n) = 1.0/(sigmaVelocityPoleRA.radians()*sigmaVelocityPoleRA.radians());
281  }
282  else {
283  m_aprioriSigmas(n) = -1.0;
284  m_weights(n) = -1.0;
285  }
286  n++;
287  }
288 // if (solvePoleRAAcceleration()) {
289 // m_parameterSolveCodes.insert(AccelerationPoleRA);
290 // m_raPole[2].setDegrees(aprioriAccelerationPoleRA);
291 // m_aprioriSigmas.insert_element(m_aprioriSigmas.size(), sigmaAccelerationPoleRA);
292 // }
293  if (solvePoleDec()) {
294  m_parameterSolveCodes.insert(PoleDec);
295  m_decPole[0] = aprioriPoleDec;
296 
297  if (sigmaPoleDec.degrees() > 0.0) {
298  m_aprioriSigmas(n) = sigmaPoleDec.degrees();
299  m_weights(n) = 1.0/(sigmaPoleDec.radians()*sigmaPoleDec.radians());
300  }
301  else {
302  m_aprioriSigmas(n) = -1.0;
303  m_weights(n) = -1.0;
304  }
305  n++;
306  }
307  if (solvePoleDecVelocity()) {
308  m_parameterSolveCodes.insert(VelocityPoleDec);
309  m_decPole[1] = aprioriVelocityPoleDec;
310 
311  if (sigmaVelocityPoleDec.degrees() > 0.0) {
312  m_aprioriSigmas(n) = sigmaVelocityPoleDec.degrees();
313  m_weights(n) = 1.0/(sigmaVelocityPoleDec.radians()*sigmaVelocityPoleDec.radians());
314  }
315  else {
316  m_aprioriSigmas(n) = -1.0;
317  m_weights(n) = -1.0;
318  }
319  n++;
320  }
321 
322 // bool solveAccelerationPoleDec = false;
323 // if (solvePoleDecAcceleration()) {
324 // m_parameterSolveCodes.insert(AccelerationPoleDec);
325 // }
326 
327  if (solvePM()) {
328  m_parameterSolveCodes.insert(PM);
329  m_pm[0] = aprioriPM;
330 
331  if (sigmaPM.degrees() > 0.0) {
332  m_aprioriSigmas(n) = sigmaPM.degrees();
333  m_weights(n) = 1.0/(sigmaPM.radians()*sigmaPM.radians());
334  }
335  else {
336  m_aprioriSigmas(n) = -1.0;
337  m_weights(n) = -1.0;
338  }
339  n++;
340  }
341 
342  if (solvePMVelocity()) { // programmer's note: also referred to as "spin rate"
343  m_parameterSolveCodes.insert(VelocityPM);
344  m_pm[1] = aprioriVelocityPM;
345 
346  if (sigmaVelocityPM.degrees() > 0.0) {
347  m_aprioriSigmas(n) = sigmaVelocityPM.degrees();
348  m_weights(n) = 1.0/(sigmaVelocityPM.radians()*sigmaVelocityPM.radians());
349  }
350  else {
351  m_aprioriSigmas(n) = -1.0;
352  m_weights(n) = -1.0;
353  }
354  n++;
355  }
356 
357 // bool solveAccelerationPM = false;
358 // if (solvePMAcceleration()) {
359 // m_parameterSolveCodes.insert(AccelerationPM);
360 // }
361 
363  m_parameterSolveCodes.insert(TriaxialRadiusA);
364  m_radii[0] = aprioriRadiusA;
365 
366  if (sigmaRadiusA.kilometers() > 0.0) {
367  m_aprioriSigmas(n) = sigmaRadiusA.kilometers();
368  m_weights(n) = 1.0/(sigmaRadiusA.kilometers()*sigmaRadiusA.kilometers());
369  }
370  else {
371  m_aprioriSigmas(n) = -1.0;
372  m_weights(n) = -1.0;
373  }
374  n++;
375 
376  m_parameterSolveCodes.insert(TriaxialRadiusB);
377  m_radii[1] = aprioriRadiusB;
378 
379  if (sigmaRadiusB.kilometers() > 0.0) {
380  m_aprioriSigmas(n) = sigmaRadiusB.kilometers();
381  m_weights(n) = 1.0/(sigmaRadiusB.kilometers()*sigmaRadiusB.kilometers());
382  }
383  else {
384  m_aprioriSigmas(n) = -1.0;
385  m_weights(n) = -1.0;
386  }
387  n++;
388 
389  m_parameterSolveCodes.insert(TriaxialRadiusC);
390  m_radii[2] = aprioriRadiusC;
391 
392  if (sigmaRadiusC.kilometers() > 0.0) {
393  m_aprioriSigmas(n) = sigmaRadiusC.kilometers();
394  m_weights(n) = 1.0/(sigmaRadiusC.kilometers()*sigmaRadiusC.kilometers());
395  }
396  else {
397  m_aprioriSigmas(n) = -1.0;
398  m_weights(n) = -1.0;
399  }
400  n++;
401  }
402 
403  else if (m_solveTargetBodyRadiusMethod == Mean) {
404  m_parameterSolveCodes.insert(MeanRadius);
405  m_meanRadius = aprioriMeanRadius;
406 
407  if (sigmaMeanRadius.kilometers() > 0.0) {
408  m_aprioriSigmas(n) = sigmaMeanRadius.kilometers();
409  m_weights(n) = 1.0/(sigmaMeanRadius.kilometers()*sigmaMeanRadius.kilometers());
410  }
411  else {
412  m_aprioriSigmas(n) = -1.0;
413  m_weights(n) = -1.0;
414  }
415  n++;
416  }
417 
418 // for (int i = 0; i < nParameters; i++) {
419 // std::cout << m_solution[i] << " " << m_aprioriSigmas[i] << " " << m_weights[i] << std::endl;
420 // }
421 // std::cout << "parameters: " << numberParameters() << std::endl;
422 // std::cout << " pole: " << numberPoleParameters() << std::endl;
423 // std::cout << " w0: " << numberW0Parameters() << std::endl;
424 // std::cout << " WDot: " << numberWDotParameters() << std::endl;
425 // std::cout << " Radius: " << numberRadiusParameters() << std::endl;
426 // int fred=1;
427  }
428 
429 
436  if (m_parameterSolveCodes.find(PoleRA) != m_parameterSolveCodes.end())
437  return true;
438  return false;
439  }
440 
441 
448  if (m_parameterSolveCodes.find(VelocityPoleRA) != m_parameterSolveCodes.end())
449  return true;
450  return false;
451  }
452 
453 
460  if (m_parameterSolveCodes.find(AccelerationPoleRA) != m_parameterSolveCodes.end())
461  return true;
462  return false;
463  }
464 
465 
472  if (m_parameterSolveCodes.find(PoleDec) != m_parameterSolveCodes.end())
473  return true;
474  return false;
475  }
476 
477 
484  if (m_parameterSolveCodes.find(VelocityPoleDec) != m_parameterSolveCodes.end())
485  return true;
486  return false;
487  }
488 
489 
496  if (m_parameterSolveCodes.find(AccelerationPoleDec) != m_parameterSolveCodes.end())
497  return true;
498  return false;
499  }
500 
501 
508  if (m_parameterSolveCodes.find(PM) != m_parameterSolveCodes.end())
509  return true;
510  return false;
511  }
512 
513 
520  if (m_parameterSolveCodes.find(VelocityPM) != m_parameterSolveCodes.end())
521  return true;
522  return false;
523  }
524 
525 
532  if (m_parameterSolveCodes.find(AccelerationPM) != m_parameterSolveCodes.end())
533  return true;
534  return false;
535  }
536 
537 
544  if (m_parameterSolveCodes.find(TriaxialRadiusA) != m_parameterSolveCodes.end() &&
545  m_parameterSolveCodes.find(TriaxialRadiusB) != m_parameterSolveCodes.end() &&
546  m_parameterSolveCodes.find(TriaxialRadiusC) != m_parameterSolveCodes.end())
547  return true;
548  return false;
549  }
550 
551 
558  if (m_parameterSolveCodes.find(MeanRadius) != m_parameterSolveCodes.end())
559  return true;
560  return false;
561  }
562 
563 
581  LinearAlgebra::Vector corrections) {
582  if (corrections.size() != m_parameterSolveCodes.size()) {
583  QString msg = "In BundleTargetBody::applyParameterCorrections: "
584  "correction and m_targetParameter vectors sizes don't match.\n";
585  throw IException(IException::Programmer, msg, _FILEINFO_);
586  }
587 
588 // for (int i = 0; i < corrections.size(); i++ )
589 // printf("%lf\n",corrections(i));
590 // std::cout << std::endl;
591 
592  try {
593  int n = 0;
594  for (std::set<int>::iterator it=m_parameterSolveCodes.begin();
595  it!=m_parameterSolveCodes.end(); ++it) {
596  switch (*it) {
597  case PoleRA:
598  m_raPole[0] += Angle(corrections[n], Angle::Radians);
599  break;
600  case VelocityPoleRA:
601  m_raPole[1] += Angle(corrections[n], Angle::Radians);
602  break;
603  case AccelerationPoleRA:
604  m_raPole[2] += Angle(corrections[n], Angle::Radians);
605  break;
606  case PoleDec:
607  m_decPole[0] += Angle(corrections[n], Angle::Radians);
608  break;
609  case VelocityPoleDec:
610  m_decPole[1] += Angle(corrections[n], Angle::Radians);
611  break;
612  case AccelerationPoleDec:
613  m_decPole[2] += Angle(corrections[n], Angle::Radians);
614  break;
615  case PM:
616  m_pm[0] += Angle(corrections[n], Angle::Radians);
617  break;
618  case VelocityPM:
619  m_pm[1] += Angle(corrections[n], Angle::Radians);
620  break;
621  case AccelerationPM:
622  m_pm[2] += Angle(corrections[n], Angle::Radians);
623  break;
624  case TriaxialRadiusA:
625  {
626  double c = m_radii[0].kilometers();
627  double d = c + corrections[n];
629 // m_radii[0] += Distance(corrections[n], Distance::Kilometers);
630  }
631  break;
632  case TriaxialRadiusB:
633  {
634  double c = m_radii[1].kilometers();
635  double d = c + corrections[n];
637 // m_radii[1] += Distance(corrections[n], Distance::Kilometers);
638  }
639  break;
640  case TriaxialRadiusC:
641  {
642  double c = m_radii[2].kilometers();
643  double d = c + corrections[n];
645 // m_radii[2] += Distance(corrections[n], Distance::Kilometers);
646  }
647  break;
648  case MeanRadius:
649  {
650  double c = m_meanRadius.kilometers();
651  double d = c + corrections[n];
653 // m_meanRadius += Distance(corrections[n], Distance::Kilometers);
654  }
655  break;
656  default:
657  break;
658  } // end switch
659 
660  m_corrections[n] += corrections[n];
661  n++;
662  } // end loop over m_parameterSolveCodes
663  } // end try
664 
665  catch (IException &e) {
666  QString msg = "Unable to apply parameter corrections to BundleTargetBody.";
667  throw IException(e, IException::Unknown, msg, _FILEINFO_);
668  }
669  }
670 
671 
682  QString method) {
683  if (method.compare("NONE", Qt::CaseInsensitive) == 0) {
684  return None;
685  }
686  else if (method.compare("MEAN", Qt::CaseInsensitive) == 0) {
687  return Mean;
688  }
689  else if (method.compare("ALL", Qt::CaseInsensitive) == 0) {
690  return All;
691  }
692  else {
694  "Unknown target body radius solution method [" + method + "].",
695  _FILEINFO_);
696  }
697  }
698 
699 
710  if (method == None)
711  return "None";
712  else if (method == Mean)
713  return "MeanRadius";
714  else if (method == All)
715  return "Radii";
717  "Unknown target body radius solve method enum [" + toString(method) + "].",
718  _FILEINFO_);
719  }
720 
721 
731  return m_weights;
732  }
733 
734 
744  return m_corrections;
745  }
746 
747 
757  return m_solution;
758  }
759 
760 
770  return m_aprioriSigmas;
771  }
772 
773 
783  return m_adjustedSigmas;
784  }
785 
786 // int BundleTargetBody::numberPoleParameters() {
787 // int nPoleParameters = 0;
788 // if (m_solveTargetBodyRaPole)
789 // nPoleParameters++;
790 // if (m_solveTargetBodyDecPole)
791 // nPoleParameters++;
792 // return nPoleParameters;
793 // }
794 
795 
796 // int BundleTargetBody::numberW0Parameters() {
797 // if (m_solveTargetBodyZeroMeridian)
798 // return 1;
799 // return 0;
800 // }
801 
802 
803 // int BundleTargetBody::numberWDotParameters() {
804 // if (m_solveTargetBodyRotationRate)
805 // return 1;
806 // return 0;
807 // }
808 
809 
825  return 3;
827  return 1;
828  return 0;
829  }
830 
831 
838  return m_parameterSolveCodes.size();
839  }
840 
841 
855  std::vector<Angle> BundleTargetBody::poleRaCoefs() {
856  return m_raPole;
857  }
858 
859 
873  std::vector<Angle> BundleTargetBody::poleDecCoefs() {
874  return m_decPole;
875  }
876 
877 
891  std::vector<Angle> BundleTargetBody::pmCoefs() {
892  return m_pm;
893  }
894 
895 
906  std::vector<Distance> BundleTargetBody::radii() {
907  if (!solveTriaxialRadii()) {
908  QString msg = "The triaxial radii can only be accessed when solving for triaxial radii.";
909  throw IException(IException::Programmer, msg, _FILEINFO_);
910  }
911  return m_radii;
912  }
913 
914 
924  if (!solveMeanRadius()) {
925  QString msg = "The mean radius can only be accessed when solving for mean radius.";
926  throw IException(IException::Programmer, msg, _FILEINFO_);
927  }
928  return m_meanRadius;
929  }
930 
931 
944  double vtpv = 0.0;
945  double v;
946 
947  int nParameters = m_parameterSolveCodes.size();
948  for (int i = 0; i < nParameters; i++) {
949  v = m_corrections(i);
950 
951  if (m_weights(i) > 0.0)
952  vtpv += v * v * m_weights(i);
953  }
954 
955  return vtpv;
956  }
957 
958 
966  QString BundleTargetBody::formatBundleOutputString(bool errorPropagation) {
967 
968  // for convenience, create vectors of parameters names and values in the correct sequence
969  std::vector<double> finalParameterValues;
970  QStringList parameterNamesList;
971  QString str("%1");
972  int nAngleParameters = 0;
973  int nRadiusParameters = 0;
974  if (solvePoleRA()) {
975  finalParameterValues.push_back(m_raPole[0].degrees());
976  parameterNamesList.append( str.arg("POLE RA ") );
977  nAngleParameters++;
978  }
979  if (solvePoleRAVelocity()) {
980  finalParameterValues.push_back(m_raPole[1].degrees());
981  parameterNamesList.append( str.arg("POLE RAv ") );
982  nAngleParameters++;
983  }
984  if (solvePoleRAAcceleration()) {
985  finalParameterValues.push_back(m_raPole[2].degrees());
986  parameterNamesList.append( str.arg("POLE RAa ") );
987  nAngleParameters++;
988  }
989  if (solvePoleDec()) {
990  finalParameterValues.push_back(m_decPole[0].degrees());
991  parameterNamesList.append( str.arg("POLE DEC ") );
992  nAngleParameters++;
993  }
994  if (solvePoleDecVelocity()) {
995  finalParameterValues.push_back(m_decPole[1].degrees());
996  parameterNamesList.append( str.arg("POLE DECv ") );
997  nAngleParameters++;
998  }
999  if (solvePoleDecAcceleration()) {
1000  finalParameterValues.push_back(m_decPole[2].degrees());
1001  parameterNamesList.append( str.arg("POLE DECa ") );
1002  nAngleParameters++;
1003  }
1004  if (solvePM()) {
1005  finalParameterValues.push_back(m_pm[0].degrees());
1006  parameterNamesList.append( str.arg(" PM ") );
1007  nAngleParameters++;
1008  }
1009  if (solvePMVelocity()) {
1010  finalParameterValues.push_back(m_pm[1].degrees());
1011  parameterNamesList.append( str.arg(" PMv ") );
1012  nAngleParameters++;
1013  }
1014  if (solvePoleDecAcceleration()) {
1015  finalParameterValues.push_back(m_pm[2].degrees());
1016  parameterNamesList.append( str.arg(" PMa ") );
1017  nAngleParameters++;
1018  }
1019  if (solveTriaxialRadii()) {
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;
1027  }
1028  if (solveMeanRadius()) {
1029  finalParameterValues.push_back(m_meanRadius.kilometers());
1030  parameterNamesList.append( str.arg("MeanRadius ") );
1031  nRadiusParameters++;
1032  }
1033 
1034  int nParameters = nAngleParameters + nRadiusParameters;
1035 
1036  m_parameterNamesList = parameterNamesList;
1037  QString finalqStr = "";
1038  QString qStr = "";
1039  QString sigma = "";
1040 
1041 // for (std::set<int>::iterator it=m_parameterSolveCodes.begin(); it!=m_parameterSolveCodes.end(); ++it) {
1042  for (int i = 0; i < nAngleParameters; i++) {
1043 
1044  if (m_aprioriSigmas[i] <= 0.0)
1045  sigma = "FREE";
1046  else
1047  sigma = toString(m_aprioriSigmas[i], 8);
1048 
1049  if (errorPropagation) {
1050  Angle corr_temp = Angle(m_corrections(i),Angle::Radians);
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).
1056  arg(sigma, 18).
1057  arg(m_adjustedSigmas[i], 18, 'f', 8);
1058  }
1059  else {
1060  Angle corr_temp = Angle(m_corrections(i),Angle::Radians);
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).
1066  arg(sigma, 18).
1067  arg("N/A", 18);
1068  }
1069  finalqStr += qStr;
1070  }
1071 
1072  for (int i = nAngleParameters; i < nParameters; i++) {
1073 
1074  if (m_aprioriSigmas[i] <= 0.0)
1075  sigma = "FREE";
1076  else
1077  sigma = toString(m_aprioriSigmas[i], 8);
1078 
1079  if (errorPropagation) {
1080  double d1 = finalParameterValues[i];
1081  double d2 = m_corrections(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).
1087  arg(sigma, 18).
1088  arg(m_adjustedSigmas[i], 18, 'f', 8);
1089  }
1090  else {
1091  double d1 = finalParameterValues[i];
1092  double d2 = m_corrections(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).
1098  arg(sigma, 18).
1099  arg("N/A", 18);
1100  }
1101  finalqStr += qStr;
1102  }
1103 
1104  return finalqStr;
1105  }
1106 
1107 
1117  return m_parameterNamesList;
1118  }
1119 
1120 
1181  // reset defaults
1182  //initialize();
1183 
1184  double d = -1.0;
1185  QString str;
1186  TargetRadiiSolveMethod solveRadiiMethod = None;
1187 
1188  //TODO Solve method keywords need to be checked for validity. JAM
1189 
1190  // determine which parameters we're solving for
1191  std::set<int> targetParameterSolveCodes;
1193  for (g = tbObject.beginGroup(); g != tbObject.endGroup(); ++g) {
1194  if (g->hasKeyword("Ra")) {
1195  try {
1196  str = g->findKeyword("Ra")[0];
1197  }
1198  catch (IException &e) {
1199  QString msg = "Ra must be given as none, position, velocity, or acceleration";
1200  throw IException(IException::User, msg, _FILEINFO_);
1201  }
1202  if (str == "position") {
1203  targetParameterSolveCodes.insert(BundleTargetBody::PoleRA);
1204  }
1205  else if (str == "velocity") {
1206  targetParameterSolveCodes.insert(BundleTargetBody::PoleRA);
1207  targetParameterSolveCodes.insert(BundleTargetBody::VelocityPoleRA);
1208  }
1209  else if (str == "acceleration") {
1210  targetParameterSolveCodes.insert(BundleTargetBody::PoleRA);
1211  targetParameterSolveCodes.insert(BundleTargetBody::VelocityPoleRA);
1212  targetParameterSolveCodes.insert(BundleTargetBody::AccelerationPoleRA);
1213  }
1214  }
1215 
1216  if (g->hasKeyword("Dec")) {
1217  try {
1218  str = g->findKeyword("Dec")[0];
1219  }
1220  catch (IException &e) {
1221  QString msg = "Dec must be given as none, position, velocity, or acceleration";
1222  throw IException(IException::User, msg, _FILEINFO_);
1223  }
1224  if (str == "position") {
1225  targetParameterSolveCodes.insert(BundleTargetBody::PoleDec);
1226  }
1227  else if (str == "velocity") {
1228  targetParameterSolveCodes.insert(BundleTargetBody::PoleDec);
1229  targetParameterSolveCodes.insert(BundleTargetBody::VelocityPoleDec);
1230  }
1231  else if (str == "acceleration") {
1232  targetParameterSolveCodes.insert(BundleTargetBody::PoleDec);
1233  targetParameterSolveCodes.insert(BundleTargetBody::VelocityPoleDec);
1234  targetParameterSolveCodes.insert(BundleTargetBody::AccelerationPoleDec);
1235  }
1236  }
1237 
1238  if (g->hasKeyword("Pm")) {
1239  try {
1240  str = g->findKeyword("Pm")[0];
1241  }
1242  catch (IException &e) {
1243  QString msg = "Pm must be given as none, position, velocity, or acceleration";
1244  throw IException(IException::User, msg, _FILEINFO_);
1245  }
1246  if (str == "position") {
1247  targetParameterSolveCodes.insert(BundleTargetBody::PM);
1248  }
1249  else if (str == "velocity") {
1250  targetParameterSolveCodes.insert(BundleTargetBody::PM);
1251  targetParameterSolveCodes.insert(BundleTargetBody::VelocityPM);
1252  }
1253  else if (str == "acceleration") {
1254  targetParameterSolveCodes.insert(BundleTargetBody::PM);
1255  targetParameterSolveCodes.insert(BundleTargetBody::VelocityPM);
1256  targetParameterSolveCodes.insert(BundleTargetBody::AccelerationPM);
1257  }
1258  }
1259 
1260  if (g->hasKeyword("RadiiSolveOption")) {
1261  try {
1262  str = g->findKeyword("RadiiSolveOption")[0];
1263  }
1264  catch (IException &e) {
1265  QString msg = "RadiiSolveOption must be given as none, triaxial, or mean";
1266  throw IException(IException::User, msg, _FILEINFO_);
1267  }
1268  if (str == "triaxial") {
1269  targetParameterSolveCodes.insert(BundleTargetBody::TriaxialRadiusA);
1270  targetParameterSolveCodes.insert(BundleTargetBody::TriaxialRadiusB);
1271  targetParameterSolveCodes.insert(BundleTargetBody::TriaxialRadiusC);
1272  solveRadiiMethod = All;
1273  }
1274  else if (str == "mean") {
1275  targetParameterSolveCodes.insert(BundleTargetBody::MeanRadius);
1276  solveRadiiMethod = Mean;
1277  }
1278  else
1279  solveRadiiMethod = None;
1280  }
1281  }
1282 
1283  Angle aprioriPoleRA;
1284  Angle poleRASigma;
1285  Angle aprioriVelocityPoleRA;
1286  Angle poleRAVelocitySigma;
1287  Angle aprioriAccelerationPoleRA;
1288  Angle poleRAAccelerationSigma;
1289  Angle aprioriPoleDec;
1290  Angle poleDecSigma;
1291  Angle aprioriVelocityPoleDec;
1292  Angle sigmaVelocityPoleDec;
1293  Angle aprioriAccelerationPoleDec;
1294  Angle sigmaAccelerationPoleDec;
1295  Angle aprioriPM;
1296  Angle sigmaPM;
1297  Angle aprioriVelocityPM;
1298  Angle sigmaVelocityPM;
1299  Angle aprioriAccelerationPM;
1300  Angle pmAccelerationSigma;
1301  Distance aprioriRadiusA;
1302  Distance sigmaRadiusA;
1303  Distance aprioriRadiusB;
1304  Distance sigmaRadiusB;
1305  Distance aprioriRadiusC;
1306  Distance sigmaRadiusC;
1307  Distance aprioriMeanRadius;
1308  Distance sigmaMeanRadius;
1309 
1310  //TODO Determine which need to be non-negative. JAM
1311 
1312  for (g = tbObject.beginGroup(); g != tbObject.endGroup(); ++g) {
1313  if (g->hasKeyword("RaValue")) {
1314  try {
1315  d = (double)(g->findKeyword("RaValue"));
1316  }
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_);
1320  }
1321  aprioriPoleRA = Angle(d, Angle::Degrees);
1322  }
1323 
1324  if (g->hasKeyword("RaSigma")) {
1325  try {
1326  d = (double)(g->findKeyword("RaSigma"));
1327  }
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_);
1331  }
1332  poleRASigma = Angle(d, Angle::Degrees);
1333  }
1334 
1335  if (g->hasKeyword("RaVelocityValue")) {
1336  try {
1337  d = (double)(g->findKeyword("RaVelocityValue"));
1338  }
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_);
1342  }
1343  aprioriVelocityPoleRA = Angle(d, Angle::Degrees);
1344  }
1345 
1346  if (g->hasKeyword("RaVelocitySigma")) {
1347  try {
1348  d = (double)(g->findKeyword("RaVelocitySigma"));
1349  }
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_);
1353  }
1354  poleRAVelocitySigma = Angle(d, Angle::Degrees);
1355  }
1356 
1357  if (g->hasKeyword("RaAccelerationValue")) {
1358  try {
1359  d = (double)(g->findKeyword("RaAccelerationValue"));
1360  }
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_);
1364  }
1365  aprioriAccelerationPoleRA = Angle(d, Angle::Degrees);
1366  }
1367 
1368  if (g->hasKeyword("RaAccelerationSigma")) {
1369  try {
1370  d = (double)(g->findKeyword("RaAccelerationSigma"));
1371  }
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_);
1375  }
1376  poleRAAccelerationSigma = Angle(d, Angle::Degrees);
1377  }
1378 
1379  if (g->hasKeyword("DecValue")) {
1380  try {
1381  d = (double)(g->findKeyword("DecValue"));
1382  }
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_);
1386  }
1387  aprioriPoleDec = Angle(d, Angle::Degrees);
1388  }
1389 
1390  if (g->hasKeyword("DecSigma")) {
1391  try {
1392  d = (double)(g->findKeyword("DecSigma"));
1393  }
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_);
1397  }
1398  poleDecSigma = Angle(d, Angle::Degrees);
1399  }
1400 
1401  if (g->hasKeyword("DecVelocityValue")) {
1402  try {
1403  d = (double)(g->findKeyword("DecVelocityValue"));
1404  }
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_);
1408  }
1409  aprioriVelocityPoleDec = Angle(d, Angle::Degrees);
1410  }
1411 
1412  if (g->hasKeyword("DecVelocitySigma")) {
1413  try {
1414  d = (double)(g->findKeyword("DecVelocitySigma"));
1415  }
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_);
1419  }
1420  sigmaVelocityPoleDec = Angle(d, Angle::Degrees);
1421  }
1422 
1423  if (g->hasKeyword("DecAccelerationValue")) {
1424  try {
1425  d = (double)(g->findKeyword("DecAccelerationValue"));
1426  }
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_);
1430  }
1431  aprioriAccelerationPoleDec = Angle(d, Angle::Degrees);
1432  }
1433 
1434  if (g->hasKeyword("DecAccelerationSigma")) {
1435  try {
1436  d = (double)(g->findKeyword("DecAccelerationSigma"));
1437  }
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_);
1441  }
1442  sigmaAccelerationPoleDec = Angle(d, Angle::Degrees);
1443  }
1444 
1445  if (g->hasKeyword("PmValue")) {
1446  try {
1447  d = (double)(g->findKeyword("PmValue"));
1448  }
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_);
1452  }
1453  aprioriPM = Angle(d, Angle::Degrees);
1454  }
1455 
1456  if (g->hasKeyword("PmSigma")) {
1457  try {
1458  d = (double)(g->findKeyword("PmSigma"));
1459  }
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_);
1463  }
1464  sigmaPM = Angle(d, Angle::Degrees);
1465  }
1466 
1467 
1468  if (g->hasKeyword("PmVelocityValue")) {
1469  try {
1470  d = (double)(g->findKeyword("PmVelocityValue"));
1471  }
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_);
1475  }
1476  aprioriVelocityPM = Angle(d, Angle::Degrees);
1477  }
1478 
1479  if (g->hasKeyword("PmVelocitySigma")) {
1480  try {
1481  d = (double)(g->findKeyword("PmVelocitySigma"));
1482  }
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_);
1486  }
1487  sigmaVelocityPM = Angle(d, Angle::Degrees);
1488  }
1489 
1490  if (g->hasKeyword("PmAccelerationValue")) {
1491  try {
1492  d = (double)(g->findKeyword("PmAccelerationValue"));
1493  }
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_);
1497  }
1498  aprioriAccelerationPM = Angle(d, Angle::Degrees);
1499  }
1500 
1501  if (g->hasKeyword("PmAccelerationSigma")) {
1502  try {
1503  d = (double)(g->findKeyword("PmAccelerationSigma"));
1504  }
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_);
1508  }
1509  pmAccelerationSigma = Angle(d, Angle::Degrees);
1510  }
1511 
1512  if (g->hasKeyword("RadiusAValue")) {
1513  try {
1514  d = (double)(g->findKeyword("RadiusAValue"));
1515  }
1516  catch (IException &e) {
1517  QString msg = "RadiusAValue must be a valid double (blank defaults to 0).";
1518  throw IException(IException::User, msg, _FILEINFO_);
1519  }
1520  try {
1521  aprioriRadiusA = Distance(d, Distance::Meters);
1522  }
1523  catch (IException &e) {
1524  QString msg = "RadiusAValue must be >= 0.";
1525  throw IException(IException::User, msg, _FILEINFO_);
1526  }
1527  }
1528 
1529  if (g->hasKeyword("RadiusASigma")) {
1530  try {
1531  d = (double)(g->findKeyword("RadiusASigma"));
1532  }
1533  catch (IException &e) {
1534  QString msg = "RadiusASigma must be a valid double (blank defaults to 0).";
1535  throw IException(IException::User, msg, _FILEINFO_);
1536  }
1537  try {
1538  sigmaRadiusA = Distance(d, Distance::Meters);
1539  }
1540  catch (IException &e) {
1541  QString msg = "RadiusASigma must be >= 0.";
1542  throw IException(IException::User, msg, _FILEINFO_);
1543  }
1544  }
1545 
1546  if (g->hasKeyword("RadiusBValue")) {
1547  try {
1548  d = (double)(g->findKeyword("RadiusBValue"));
1549  }
1550  catch (IException &e) {
1551  QString msg = "RadiusBValue must be a valid double (blank defaults to 0).";
1552  throw IException(IException::User, msg, _FILEINFO_);
1553  }
1554  try {
1555  aprioriRadiusB = Distance(d, Distance::Meters);
1556  }
1557  catch (IException &e) {
1558  QString msg = "RadiusBValue must be >= 0.";
1559  throw IException(IException::User, msg, _FILEINFO_);
1560  }
1561  }
1562 
1563  if (g->hasKeyword("RadiusBSigma")) {
1564  try {
1565  d = (double)(g->findKeyword("RadiusBSigma"));
1566  }
1567  catch (IException &e) {
1568  QString msg = "RadiusBSigma must be a valid double (blank defaults to 0).";
1569  throw IException(IException::User, msg, _FILEINFO_);
1570  }
1571  try {
1572  sigmaRadiusB = Distance(d, Distance::Meters);
1573  }
1574  catch (IException &e) {
1575  QString msg = "RadiusBSigma must be >= 0.";
1576  throw IException(IException::User, msg, _FILEINFO_);
1577  }
1578  }
1579 
1580  if (g->hasKeyword("RadiusCValue")) {
1581  try {
1582  d = (double)(g->findKeyword("RadiusCValue"));
1583  }
1584  catch (IException &e) {
1585  QString msg = "RadiusCValue must be a valid double (blank defaults to 0).";
1586  throw IException(IException::User, msg, _FILEINFO_);
1587  }
1588  try {
1589  aprioriRadiusC = Distance(d, Distance::Meters);
1590  }
1591  catch (IException &e) {
1592  QString msg = "RadiusCValue must be >= 0.";
1593  throw IException(IException::User, msg, _FILEINFO_);
1594  }
1595  }
1596 
1597  if (g->hasKeyword("RadiusCSigma")) {
1598  try {
1599  d = (double)(g->findKeyword("RadiusCSigma"));
1600  }
1601  catch (IException &e) {
1602  QString msg = "RadiusCSigma must be a valid double (blank defaults to 0).";
1603  throw IException(IException::User, msg, _FILEINFO_);
1604  }
1605  try {
1606  sigmaRadiusC = Distance(d, Distance::Meters);
1607  }
1608  catch (IException &e) {
1609  QString msg = "RadiusCSigma must be >= 0.";
1610  throw IException(IException::User, msg, _FILEINFO_);
1611  }
1612  }
1613 
1614  if (g->hasKeyword("MeanRadiusValue")) {
1615  try {
1616  d = (double)(g->findKeyword("MeanRadiusValue"));
1617  }
1618  catch (IException &e) {
1619  QString msg = "MeanRadiusValue must be a valid double (blank defaults to 0).";
1620  throw IException(IException::User, msg, _FILEINFO_);
1621  }
1622  try {
1623  aprioriMeanRadius = Distance(d, Distance::Meters);
1624  }
1625  catch (IException &e) {
1626  QString msg = "MeanRadiusValue must be >= 0.";
1627  throw IException(IException::User, msg, _FILEINFO_);
1628  }
1629  }
1630 
1631  if (g->hasKeyword("MeanRadiusSigma")) {
1632  try {
1633  d = (double)(g->findKeyword("MeanRadiusSigma"));
1634  }
1635  catch (IException &e) {
1636  QString msg = "MeanRadiusSigma must be a valid double (blank defaults to 0).";
1637  throw IException(IException::User, msg, _FILEINFO_);
1638  }
1639  try {
1640  sigmaMeanRadius = Distance(d, Distance::Meters);
1641  }
1642  catch (IException &e) {
1643  QString msg = "MeanRadiusSigma must be >= 0.";
1644  throw IException(IException::User, msg, _FILEINFO_);
1645  }
1646  }
1647  }
1648 
1649 /*
1650  try {
1651  // set target id
1652 // setInstrumentId((QString)tbParameterGroup.nameKeyword());
1653 
1654  }
1655  catch (IException &e) {
1656  QString msg = "Unable to set target body solve options from the given PVL.";
1657  throw IException(e, IException::User, msg, _FILEINFO_);
1658  }
1659 */
1660 
1661  setSolveSettings(targetParameterSolveCodes,
1662  aprioriPoleRA, poleRASigma,
1663  aprioriVelocityPoleRA, poleRAVelocitySigma,
1664  aprioriPoleDec, poleDecSigma,
1665  aprioriVelocityPoleDec, sigmaVelocityPoleDec,
1666  aprioriPM, sigmaPM,
1667  aprioriVelocityPM, sigmaVelocityPM,
1668  solveRadiiMethod,
1669  aprioriRadiusA, sigmaRadiusA,
1670  aprioriRadiusB, sigmaRadiusB,
1671  aprioriRadiusC, sigmaRadiusC,
1672  aprioriMeanRadius, sigmaMeanRadius);
1673 
1674  return true;
1675  }
1676 
1677 
1691 
1692  if (!solveTriaxialRadii()) {
1693  QString msg = "Local radius can only be found if triaxial radii were solved for.";
1694  throw IException(IException::Programmer, msg, _FILEINFO_);
1695  }
1696 
1697  double a = m_radii[0].kilometers();
1698  double b = m_radii[1].kilometers();
1699  double c = m_radii[2].kilometers();
1700 
1701  double rlat = lat.radians();
1702  double rlon = lon.radians();
1703 
1704  double xyradius = a * b / sqrt(pow(b * cos(rlon), 2) +
1705  pow(a * sin(rlon), 2));
1706  const double &radius = xyradius * c / sqrt(pow(c * cos(rlat), 2) +
1707  pow(xyradius * sin(rlat), 2));
1708 
1709  return Distance(radius, Distance::Kilometers);
1710  }
1711 
1712 
1716 /*
1717  bool BundleTargetBody::readFromPvl(PvlGroup &tbParameterGroup) {
1718  // reset defaults
1719  //initialize();
1720 
1721  bool b = false;
1722  double d = -1.0;
1723 
1724  try {
1725  // set target id
1726 // setInstrumentId((QString)tbParameterGroup.nameKeyword());
1727 
1728  // pole right ascension settings
1729  if (tbParameterGroup.hasKeyword("Ra")) {
1730  try {
1731  b = toBool(tbParameterGroup.findKeyword("Ra")[0]);
1732  }
1733  catch (IException &e) {
1734  QString msg = "Ra must be a valid boolean (yes/no; true/false).";
1735  throw IException(IException::User, msg, _FILEINFO_);
1736  }
1737  if (b)
1738  m_parameterSolveCodes.insert(BundleTargetBody::PoleRA);
1739  }
1740 
1741  if (tbParameterGroup.hasKeyword("RaValue")) {
1742  try {
1743  d = (double)(tbParameterGroup.findKeyword("RaValue"));
1744  }
1745  catch (IException &e) {
1746  QString msg = "RaValue must be a valid double (>= 0; blank defaults to 0).";
1747  throw IException(IException::User, msg, _FILEINFO_);
1748  }
1749  m_raPole[0] = Angle(d, Angle::Degrees);
1750  }
1751 
1752  if (tbParameterGroup.hasKeyword("RaSigma")) {
1753  try {
1754  d = (double)(tbParameterGroup.findKeyword("RaSigma"));
1755  }
1756  catch (IException &e) {
1757  QString msg = "RaSigma must be a valid double (>= 0; blank defaults to 0).";
1758  throw IException(IException::User, msg, _FILEINFO_);
1759  }
1760  //m_raPole[1] = Angle(d, Angle::Degrees);
1761  }
1762 
1763  if (tbParameterGroup.hasKeyword("RaVelocity")) {
1764  try {
1765  b = toBool(tbParameterGroup.findKeyword("RaVelocity")[0]);
1766  }
1767  catch (IException &e) {
1768  QString msg = "RaVelocity must be a valid boolean (yes/no; true/false).";
1769  throw IException(IException::User, msg, _FILEINFO_);
1770  }
1771  if (b)
1772  m_parameterSolveCodes.insert(BundleTargetBody::VelocityPoleRA);
1773  }
1774 
1775  if (tbParameterGroup.hasKeyword("RaVelocityValue")) {
1776  try {
1777  d = (double)(tbParameterGroup.findKeyword("RaVelocityValue"));
1778  }
1779  catch (IException &e) {
1780  QString msg = "RaVelocityValue must be a valid double (>= 0; blank defaults to 0).";
1781  throw IException(IException::User, msg, _FILEINFO_);
1782  }
1783  m_raPole[1] = Angle(d, Angle::Degrees);
1784  }
1785 
1786  if (tbParameterGroup.hasKeyword("RaVelocitySigma")) {
1787  try {
1788  d = (double)(tbParameterGroup.findKeyword("RaVelocitySigma"));
1789  }
1790  catch (IException &e) {
1791  QString msg = "RaVelocitySigma must be a valid double (>= 0; blank defaults to 0).";
1792  throw IException(IException::User, msg, _FILEINFO_);
1793  }
1794  //m_raPole[1] = Angle(d, Angle::Degrees);
1795  }
1796 
1797  if (tbParameterGroup.hasKeyword("RaAcceleration")) {
1798  try {
1799  b = toBool(tbParameterGroup.findKeyword("RaAcceleration")[0]);
1800  }
1801  catch (IException &e) {
1802  QString msg = "RaAcceleration must be a valid boolean (yes/no; true/false).";
1803  throw IException(IException::User, msg, _FILEINFO_);
1804  }
1805  if (b)
1806  m_parameterSolveCodes.insert(BundleTargetBody::VelocityPoleRA);
1807  }
1808 
1809  if (tbParameterGroup.hasKeyword("RaAccelerationValue")) {
1810  try {
1811  d = (double)(tbParameterGroup.findKeyword("RaAccelerationValue"));
1812  }
1813  catch (IException &e) {
1814  QString msg = "RaAccelerationValue must be a valid double (>= 0; blank defaults to 0).";
1815  throw IException(IException::User, msg, _FILEINFO_);
1816  }
1817  m_raPole[2] = Angle(d, Angle::Degrees);
1818  }
1819 
1820  if (tbParameterGroup.hasKeyword("RaAccelerationSigma")) {
1821  try {
1822  d = (double)(tbParameterGroup.findKeyword("RaAccelerationSigma"));
1823  }
1824  catch (IException &e) {
1825  QString msg = "RaAccelerationSigma must be a valid double (>= 0; blank defaults to 0).";
1826  throw IException(IException::User, msg, _FILEINFO_);
1827  }
1828  //m_raPole[1] = Angle(d, Angle::Degrees);
1829  }
1830 
1831  // pole declination settings
1832  if (tbParameterGroup.hasKeyword("Dec")) {
1833  try {
1834  b = toBool(tbParameterGroup.findKeyword("Dec")[0]);
1835  }
1836  catch (IException &e) {
1837  QString msg = "Dec parameter must be a valid boolean (yes/no; true/false).";
1838  throw IException(IException::User, msg, _FILEINFO_);
1839  }
1840  if (b)
1841  m_parameterSolveCodes.insert(BundleTargetBody::PoleDec);
1842  }
1843 
1844  if (tbParameterGroup.hasKeyword("DecValue")) {
1845  try {
1846  d = (double)(tbParameterGroup.findKeyword("DecValue"));
1847  }
1848  catch (IException &e) {
1849  QString msg = "DecValue must be a valid double (>= 0; blank defaults to 0).";
1850  throw IException(IException::User, msg, _FILEINFO_);
1851  }
1852  m_decPole[0] = Angle(d, Angle::Degrees);
1853  }
1854 
1855  if (tbParameterGroup.hasKeyword("DecSigma")) {
1856  try {
1857  d = (double)(tbParameterGroup.findKeyword("DecSigma"));
1858  }
1859  catch (IException &e) {
1860  QString msg = "DecSigma must be a valid double (>= 0; blank defaults to 0).";
1861  throw IException(IException::User, msg, _FILEINFO_);
1862  }
1863  //m_raPole[1] = Angle(d, Angle::Degrees);
1864  }
1865 
1866  if (tbParameterGroup.hasKeyword("DecVelocity")) {
1867  try {
1868  b = toBool(tbParameterGroup.findKeyword("DecVelocity")[0]);
1869  }
1870  catch (IException &e) {
1871  QString msg = "DecVelocity must be a valid boolean (yes/no; true/false).";
1872  throw IException(IException::User, msg, _FILEINFO_);
1873  }
1874  if (b)
1875  m_parameterSolveCodes.insert(BundleTargetBody::VelocityPoleDec);
1876  }
1877 
1878  if (tbParameterGroup.hasKeyword("DecVelocityValue")) {
1879  try {
1880  d = (double)(tbParameterGroup.findKeyword("DecVelocityValue"));
1881  }
1882  catch (IException &e) {
1883  QString msg = "DecVelocityValue must be a valid double (>= 0; blank defaults to 0).";
1884  throw IException(IException::User, msg, _FILEINFO_);
1885  }
1886  m_decPole[1] = Angle(d, Angle::Degrees);
1887  }
1888 
1889  if (tbParameterGroup.hasKeyword("DecVelocitySigma")) {
1890  try {
1891  d = (double)(tbParameterGroup.findKeyword("DecVelocitySigma"));
1892  }
1893  catch (IException &e) {
1894  QString msg = "DecVelocitySigma must be a valid double (>= 0; blank defaults to 0).";
1895  throw IException(IException::User, msg, _FILEINFO_);
1896  }
1897  //m_raPole[1] = Angle(d, Angle::Degrees);
1898  }
1899 
1900  if (tbParameterGroup.hasKeyword("DecAcceleration")) {
1901  try {
1902  b = toBool(tbParameterGroup.findKeyword("DecAcceleration")[0]);
1903  }
1904  catch (IException &e) {
1905  QString msg = "DecAcceleration must be a valid boolean (yes/no; true/false).";
1906  throw IException(IException::User, msg, _FILEINFO_);
1907  }
1908  if (b)
1909  m_parameterSolveCodes.insert(BundleTargetBody::AccelerationPoleDec);
1910  }
1911 
1912  if (tbParameterGroup.hasKeyword("DecAccelerationValue")) {
1913  try {
1914  d = (double)(tbParameterGroup.findKeyword("DecAccelerationValue"));
1915  }
1916  catch (IException &e) {
1917  QString msg = "DecAccelerationValue must be a valid double (>= 0; blank defaults to 0).";
1918  throw IException(IException::User, msg, _FILEINFO_);
1919  }
1920  m_decPole[2] = Angle(d, Angle::Degrees);
1921  }
1922 
1923  if (tbParameterGroup.hasKeyword("DecAccelerationSigma")) {
1924  try {
1925  d = (double)(tbParameterGroup.findKeyword("DecAccelerationSigma"));
1926  }
1927  catch (IException &e) {
1928  QString msg = "DecAccelerationSigma must be a valid double (>= 0; blank defaults to 0).";
1929  throw IException(IException::User, msg, _FILEINFO_);
1930  }
1931  //m_raPole[1] = Angle(d, Angle::Degrees);
1932  }
1933 
1934  // prime meridian settings
1935  if (tbParameterGroup.hasKeyword("Pm")) {
1936  try {
1937  b = toBool(tbParameterGroup.findKeyword("Pm")[0]);
1938  }
1939  catch (IException &e) {
1940  QString msg = "Pm parameter must be a valid boolean (yes/no; true/false).";
1941  throw IException(IException::User, msg, _FILEINFO_);
1942  }
1943  if (b)
1944  m_parameterSolveCodes.insert(BundleTargetBody::PM);
1945  }
1946 
1947  if (tbParameterGroup.hasKeyword("PmValue")) {
1948  try {
1949  d = (double)(tbParameterGroup.findKeyword("PmValue"));
1950  }
1951  catch (IException &e) {
1952  QString msg = "PmValue must be a valid double (>= 0; blank defaults to 0).";
1953  throw IException(IException::User, msg, _FILEINFO_);
1954  }
1955  m_pm[0] = Angle(d, Angle::Degrees);
1956  }
1957 
1958  if (tbParameterGroup.hasKeyword("PmSigma")) {
1959  try {
1960  d = (double)(tbParameterGroup.findKeyword("PmSigma"));
1961  }
1962  catch (IException &e) {
1963  QString msg = "PmSigma must be a valid double (>= 0; blank defaults to 0).";
1964  throw IException(IException::User, msg, _FILEINFO_);
1965  }
1966  //m_raPole[1] = Angle(d, Angle::Degrees);
1967  }
1968 
1969  if (tbParameterGroup.hasKeyword("PmVelocity")) {
1970  try {
1971  b = toBool(tbParameterGroup.findKeyword("PmVelocity")[0]);
1972  }
1973  catch (IException &e) {
1974  QString msg = "PmVelocity must be a valid boolean (yes/no; true/false).";
1975  throw IException(IException::User, msg, _FILEINFO_);
1976  }
1977  if (b)
1978  m_parameterSolveCodes.insert(BundleTargetBody::VelocityPM);
1979  }
1980 
1981  if (tbParameterGroup.hasKeyword("PmVelocityValue")) {
1982  try {
1983  d = (double)(tbParameterGroup.findKeyword("PmVelocityValue"));
1984  }
1985  catch (IException &e) {
1986  QString msg = "PmVelocityValue must be a valid double (>= 0; blank defaults to 0).";
1987  throw IException(IException::User, msg, _FILEINFO_);
1988  }
1989  m_pm[1] = Angle(d, Angle::Degrees);
1990  }
1991 
1992  if (tbParameterGroup.hasKeyword("PmVelocitySigma")) {
1993  try {
1994  d = (double)(tbParameterGroup.findKeyword("PmVelocitySigma"));
1995  }
1996  catch (IException &e) {
1997  QString msg = "PmVelocitySigma must be a valid double (>= 0; blank defaults to 0).";
1998  throw IException(IException::User, msg, _FILEINFO_);
1999  }
2000  //m_raPole[1] = Angle(d, Angle::Degrees);
2001  }
2002 
2003  if (tbParameterGroup.hasKeyword("PmAcceleration")) {
2004  try {
2005  b = toBool(tbParameterGroup.findKeyword("PmAcceleration")[0]);
2006  }
2007  catch (IException &e) {
2008  QString msg = "PmAcceleration must be a valid boolean (yes/no; true/false).";
2009  throw IException(IException::User, msg, _FILEINFO_);
2010  }
2011  if (b)
2012  m_parameterSolveCodes.insert(BundleTargetBody::AccelerationPM);
2013  }
2014 
2015  if (tbParameterGroup.hasKeyword("PmAccelerationValue")) {
2016  try {
2017  d = (double)(tbParameterGroup.findKeyword("PmAccelerationValue"));
2018  }
2019  catch (IException &e) {
2020  QString msg = "PmAccelerationValue must be a valid double (>= 0; blank defaults to 0).";
2021  throw IException(IException::User, msg, _FILEINFO_);
2022  }
2023  m_decPole[2] = Angle(d, Angle::Degrees);
2024  }
2025 
2026  if (tbParameterGroup.hasKeyword("PmAccelerationSigma")) {
2027  try {
2028  d = (double)(tbParameterGroup.findKeyword("PmAccelerationSigma"));
2029  }
2030  catch (IException &e) {
2031  QString msg = "PmAccelerationSigma must be a valid double (>= 0; blank defaults to 0).";
2032  throw IException(IException::User, msg, _FILEINFO_);
2033  }
2034  //m_raPole[1] = Angle(d, Angle::Degrees);
2035  }
2036 
2037  // radii settings
2038  if (tbParameterGroup.hasKeyword("AllRadii")) {
2039  try {
2040  b = toBool(tbParameterGroup.findKeyword("AllRadii")[0]);
2041  }
2042  catch (IException &e) {
2043  QString msg = "AllRadii parameter must be a valid boolean (yes/no; true/false).";
2044  throw IException(IException::User, msg, _FILEINFO_);
2045  }
2046  if (b) {
2047  m_parameterSolveCodes.insert(BundleTargetBody::TriaxialRadiusA);
2048  m_parameterSolveCodes.insert(BundleTargetBody::TriaxialRadiusB);
2049  m_parameterSolveCodes.insert(BundleTargetBody::TriaxialRadiusC);
2050 
2051  if (tbParameterGroup.hasKeyword("RadiusAValue")) {
2052  try {
2053  d = (double)(tbParameterGroup.findKeyword("RadiusAValue"));
2054  }
2055  catch (IException &e) {
2056  QString msg = "RadiusAValue must be a valid double (>= 0; blank defaults to 0).";
2057  throw IException(IException::User, msg, _FILEINFO_);
2058  }
2059  m_radii[0].setKilometers(d);
2060  }
2061 
2062  if (tbParameterGroup.hasKeyword("RadiusASigma")) {
2063  try {
2064  d = (double)(tbParameterGroup.findKeyword("RadiusASigma"));
2065  }
2066  catch (IException &e) {
2067  QString msg = "RadiusASigma must be a valid double (>= 0; blank defaults to 0).";
2068  throw IException(IException::User, msg, _FILEINFO_);
2069  }
2070  //m_raPole[1] = Angle(d, Angle::Degrees);
2071  }
2072 
2073  if (tbParameterGroup.hasKeyword("RadiusBValue")) {
2074  try {
2075  d = (double)(tbParameterGroup.findKeyword("RadiusBValue"));
2076  }
2077  catch (IException &e) {
2078  QString msg = "RadiusBValue must be a valid double (>= 0; blank defaults to 0).";
2079  throw IException(IException::User, msg, _FILEINFO_);
2080  }
2081  m_radii[1].setKilometers(d);
2082  }
2083 
2084  if (tbParameterGroup.hasKeyword("RadiusBSigma")) {
2085  try {
2086  d = (double)(tbParameterGroup.findKeyword("RadiusBSigma"));
2087  }
2088  catch (IException &e) {
2089  QString msg = "RadiusBSigma must be a valid double (>= 0; blank defaults to 0).";
2090  throw IException(IException::User, msg, _FILEINFO_);
2091  }
2092  //m_raPole[1] = Angle(d, Angle::Degrees);
2093  }
2094 
2095  if (tbParameterGroup.hasKeyword("RadiusCValue")) {
2096  try {
2097  d = (double)(tbParameterGroup.findKeyword("RadiusCValue"));
2098  }
2099  catch (IException &e) {
2100  QString msg = "RadiusCValue must be a valid double (>= 0; blank defaults to 0).";
2101  throw IException(IException::User, msg, _FILEINFO_);
2102  }
2103  m_radii[2].setKilometers(d);
2104  }
2105 
2106  if (tbParameterGroup.hasKeyword("RadiusCSigma")) {
2107  try {
2108  d = (double)(tbParameterGroup.findKeyword("RadiusCSigma"));
2109  }
2110  catch (IException &e) {
2111  QString msg = "RadiusCSigma must be a valid double (>= 0; blank defaults to 0).";
2112  throw IException(IException::User, msg, _FILEINFO_);
2113  }
2114  //m_raPole[1] = Angle(d, Angle::Degrees);
2115  }
2116  }
2117  }
2118  else if (tbParameterGroup.hasKeyword("MeanRadius")) {
2119  try {
2120  b = toBool(tbParameterGroup.findKeyword("MeanRadius")[0]);
2121  }
2122  catch (IException &e) {
2123  QString msg = "MeanRadius parameter must be a valid boolean (yes/no; true/false).";
2124  throw IException(IException::User, msg, _FILEINFO_);
2125  }
2126  if (b) {
2127  m_parameterSolveCodes.insert(BundleTargetBody::MeanRadius);
2128 
2129  if (tbParameterGroup.hasKeyword("MeanRadiusValue")) {
2130  try {
2131  d = (double)(tbParameterGroup.findKeyword("MeanRadiusValue"));
2132  }
2133  catch (IException &e) {
2134  QString msg = "MeanRadiusValue must be a valid double (>= 0; blank defaults to 0).";
2135  throw IException(IException::User, msg, _FILEINFO_);
2136  }
2137  m_radii[2].setKilometers(d);
2138  }
2139 
2140  if (tbParameterGroup.hasKeyword("MeanRadiusSigma")) {
2141  try {
2142  d = (double)(tbParameterGroup.findKeyword("MeanRadiusSigma"));
2143  }
2144  catch (IException &e) {
2145  QString msg = "MeanRadiusSigma must be a valid double (>= 0; blank defaults to 0).";
2146  throw IException(IException::User, msg, _FILEINFO_);
2147  }
2148  //m_raPole[1] = Angle(d, Angle::Degrees);
2149  }
2150  }
2151  }
2152  }
2153 
2154  catch (IException &e) {
2155  QString msg = "Unable to set target body solve options from the given PVL.";
2156  throw IException(e, IException::User, msg, _FILEINFO_);
2157  }
2158 
2159  return true;
2160  }
2161 */
2162 }
Isis::BundleTargetBody::m_weights
LinearAlgebra::Vector m_weights
Parameter weights.
Definition: BundleTargetBody.h:179
Isis::Distance::kilometers
double kilometers() const
Get the distance in kilometers.
Definition: Distance.cpp:106
Isis::BundleTargetBody::parameterCorrections
LinearAlgebra::Vector & parameterCorrections()
Returns the vector of corrections applied to the parameters.
Definition: BundleTargetBody.cpp:743
Isis::BundleTargetBody::m_decPole
std::vector< Angle > m_decPole
pole dec quadratic polynomial coefficients
Definition: BundleTargetBody.h:172
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Isis::PvlObject::endGroup
PvlGroupIterator endGroup()
Returns the ending group index.
Definition: PvlObject.h:109
Isis::BundleTargetBody::formatBundleOutputString
QString formatBundleOutputString(bool errorPropagation)
Formats and returns the parameter values as a QString.
Definition: BundleTargetBody.cpp:966
Isis::PvlObject::PvlGroupIterator
QList< Isis::PvlGroup >::iterator PvlGroupIterator
The counter for groups.
Definition: PvlObject.h:83
Isis::BundleTargetBody::localRadius
Distance localRadius(const Latitude &lat, const Longitude &lon)
Gets the local radius for the given latitude/longitude coordinate.
Definition: BundleTargetBody.cpp:1690
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::Latitude
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:51
Isis::BundleTargetBody::solvePoleDec
virtual bool solvePoleDec()
If the pole declination angle will be solved for with this target body.
Definition: BundleTargetBody.cpp:471
Isis::BundleTargetBody::radii
std::vector< Distance > radii()
Returns the radius values.
Definition: BundleTargetBody.cpp:906
Isis::BundleTargetBody::numberRadiusParameters
int numberRadiusParameters()
Returns the number of radius parameters being solved for.
Definition: BundleTargetBody.cpp:823
Isis::BundleTargetBody::poleDecCoefs
std::vector< Angle > poleDecCoefs()
Returns the coefficients of the declination polynomial.
Definition: BundleTargetBody.cpp:873
Isis::BundleTargetBody::None
@ None
Solve for none.
Definition: BundleTargetBody.h:65
Isis::IException::Unknown
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition: IException.h:118
Isis::BundleTargetBody::adjustedSigmas
LinearAlgebra::Vector & adjustedSigmas()
Returns the vector of adjusted parameters sigmas.
Definition: BundleTargetBody.cpp:782
Isis::BundleTargetBody::aprioriSigmas
LinearAlgebra::Vector & aprioriSigmas()
Returns the vector of apriori parameters sigmas.
Definition: BundleTargetBody.cpp:769
Isis::BundleTargetBody::stringToTargetRadiiOption
static TargetRadiiSolveMethod stringToTargetRadiiOption(QString option)
Converts a QString to a TargetRadiiSolveMethod.
Definition: BundleTargetBody.cpp:681
Isis::BundleTargetBody::m_adjustedSigmas
LinearAlgebra::Vector m_adjustedSigmas
Adjusted parameter sigmas.
Definition: BundleTargetBody.h:183
Isis::BundleTargetBody::m_meanRadius
Distance m_meanRadius
Adjusted mean radius value.
Definition: BundleTargetBody.h:169
Isis::BundleTargetBody::solvePM
virtual bool solvePM()
If the prime meridian angle will be solved for with this target body.
Definition: BundleTargetBody.cpp:507
Isis::BundleTargetBody::targetRadiiOptionToString
static QString targetRadiiOptionToString(TargetRadiiSolveMethod targetRadiiSolveMethod)
Converts a TargetRadiiSolveMethod to a QString.
Definition: BundleTargetBody.cpp:709
Isis::BundleTargetBody::m_raPole
std::vector< Angle > m_raPole
pole ra quadratic polynomial coefficients
Definition: BundleTargetBody.h:171
Isis::BundleTargetBody::parameterSolution
LinearAlgebra::Vector & parameterSolution()
Returns the vector of parameters solution.
Definition: BundleTargetBody.cpp:756
Isis::BundleTargetBody::m_aprioriMeanRadius
Distance m_aprioriMeanRadius
Apriori Mean Radius.
Definition: BundleTargetBody.h:165
Isis::BundleTargetBody::All
@ All
Solve for all radii.
Definition: BundleTargetBody.h:67
Isis::BundleTargetBody::meanRadius
Distance meanRadius()
Returns the mean radius.
Definition: BundleTargetBody.cpp:923
Isis::BundleTargetBody::pmCoefs
std::vector< Angle > pmCoefs()
Returns the coefficients of the prime meridian polynomial.
Definition: BundleTargetBody.cpp:891
Isis::BundleTargetBody::solvePoleRA
virtual bool solvePoleRA()
If the pole right ascension angle will be solved for with this target body.
Definition: BundleTargetBody.cpp:435
Isis::BundleTargetBody::m_aprioriRadiusA
Distance m_aprioriRadiusA
Apriori Radius A.
Definition: BundleTargetBody.h:159
QStringList
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::BundleTargetBody::TargetRadiiSolveMethod
TargetRadiiSolveMethod
Enumeration that defines how to solve for target radii.
Definition: BundleTargetBody.h:64
Isis::BundleTargetBody::m_solution
LinearAlgebra::Vector m_solution
Parameter solution vector.
Definition: BundleTargetBody.h:181
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
Isis::BundleTargetBody::parameterList
QStringList parameterList()
Returns a list of all the parameters being solved for as QStrings.
Definition: BundleTargetBody.cpp:1116
Isis::Target::radii
std::vector< Distance > radii() const
Returns the radii of the body in km.
Definition: Target.cpp:532
Isis::Distance::Kilometers
@ Kilometers
The distance is being specified in kilometers.
Definition: Distance.h:45
Isis::BundleTargetBody::parameterWeights
LinearAlgebra::Vector & parameterWeights()
Returns the vector of parameter weights.
Definition: BundleTargetBody.cpp:730
Isis::BundleTargetBody::readFromPvl
bool readFromPvl(PvlObject &tbPvlObject)
Set bundle solve parameters for target body from a pvl file.
Definition: BundleTargetBody.cpp:1180
Isis::Distance::Meters
@ Meters
The distance is being specified in meters.
Definition: Distance.h:43
Isis::BundleTargetBody::m_corrections
LinearAlgebra::Vector m_corrections
Cumulative parameter corrections.
Definition: BundleTargetBody.h:180
Isis::LinearAlgebra::Vector
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
Definition: LinearAlgebra.h:120
Isis::BundleTargetBody::vtpv
double vtpv()
Calculates and returns the weighted sum of the squares of the corrections.
Definition: BundleTargetBody.cpp:943
Isis::BundleTargetBody::m_radii
std::vector< Distance > m_radii
Adjusted triaxial radii values.
Definition: BundleTargetBody.h:168
Isis::BundleTargetBody::applyParameterCorrections
void applyParameterCorrections(LinearAlgebra::Vector corrections)
Applies a vector of corrections to the parameters for the target body.
Definition: BundleTargetBody.cpp:580
Isis::BundleTargetBody::m_pm
std::vector< Angle > m_pm
pole pm quadratic polynomial coefficients
Definition: BundleTargetBody.h:173
Isis::BundleTargetBody::solvePoleRAAcceleration
virtual bool solvePoleRAAcceleration()
If the pole right ascension acceleration will be solved for with this target body.
Definition: BundleTargetBody.cpp:459
Isis::BundleTargetBody::solvePMVelocity
virtual bool solvePMVelocity()
If the prime meridian velocity will be solved for with this target body.
Definition: BundleTargetBody.cpp:519
Isis::BundleTargetBody::m_sigmaMeanRadius
Distance m_sigmaMeanRadius
Apriori Mean Radius Sigma.
Definition: BundleTargetBody.h:166
Isis::BundleTargetBody::m_sigmaRadiusC
Distance m_sigmaRadiusC
Apriori Radius C Sigma.
Definition: BundleTargetBody.h:164
Isis::BundleTargetBody::m_parameterNamesList
QStringList m_parameterNamesList
List of all target parameters.
Definition: BundleTargetBody.h:177
Isis::BundleTargetBody::BundleTargetBody
BundleTargetBody()
Creates an empty BundleTargetBody object.
Definition: BundleTargetBody.cpp:26
Isis::BundleTargetBody::m_solveTargetBodyRadiusMethod
TargetRadiiSolveMethod m_solveTargetBodyRadiusMethod
Which radii will be solved for.
Definition: BundleTargetBody.h:158
Isis::BundleTargetBody
This class is used to represent a target body in a bundle and how to solve for it.
Definition: BundleTargetBody.h:52
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::BundleTargetBody::solvePoleDecVelocity
virtual bool solvePoleDecVelocity()
If the pole declination velocity will be solved for with this target body.
Definition: BundleTargetBody.cpp:483
Isis::Angle
Defines an angle and provides unit conversions.
Definition: Angle.h:45
Isis::BundleTargetBody::operator=
BundleTargetBody & operator=(const BundleTargetBody &src)
Assignment operator.
Definition: BundleTargetBody.cpp:125
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::BundleTargetBody::numberParameters
virtual int numberParameters()
Returns the total number of parameters being solved for.
Definition: BundleTargetBody.cpp:837
Isis::PvlObject::beginGroup
PvlGroupIterator beginGroup()
Returns the beginning group index.
Definition: PvlObject.h:91
Isis::BundleTargetBody::setSolveSettings
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.
Definition: BundleTargetBody.cpp:215
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Isis::BundleTargetBody::solvePoleDecAcceleration
virtual bool solvePoleDecAcceleration()
If the pole declination acceleration will be solved for with this target body.
Definition: BundleTargetBody.cpp:495
Isis::BundleTargetBody::m_parameterSolveCodes
std::set< int > m_parameterSolveCodes
Target parameter solve codes.
Definition: BundleTargetBody.h:175
Isis::BundleTargetBody::solvePoleRAVelocity
virtual bool solvePoleRAVelocity()
If the pole right ascension velocity will be solved for with this target body.
Definition: BundleTargetBody.cpp:447
Isis::BundleTargetBody::m_sigmaRadiusA
Distance m_sigmaRadiusA
Apriori Radius A Sigma.
Definition: BundleTargetBody.h:160
Isis::BundleTargetBody::solveMeanRadius
virtual bool solveMeanRadius()
If the mean radius will be solved for with this target body.
Definition: BundleTargetBody.cpp:557
Isis::BundleTargetBody::~BundleTargetBody
virtual ~BundleTargetBody()
Destructor.
Definition: BundleTargetBody.cpp:116
Isis::Target
This class is used to create and store valid Isis targets.
Definition: Target.h:63
Isis::BundleTargetBody::m_aprioriSigmas
LinearAlgebra::Vector m_aprioriSigmas
A priori parameter sigmas.
Definition: BundleTargetBody.h:182
Isis::BundleTargetBody::Mean
@ Mean
Solve for mean radius.
Definition: BundleTargetBody.h:66
Isis::BundleTargetBody::m_sigmaRadiusB
Distance m_sigmaRadiusB
Apriori Radius B Sigma.
Definition: BundleTargetBody.h:162
Isis::BundleTargetBody::solvePMAcceleration
virtual bool solvePMAcceleration()
If the prime meridian acceleration will be solved for with this target body.
Definition: BundleTargetBody.cpp:531
Isis::Angle::Radians
@ Radians
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
Definition: Angle.h:63
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::BundleTargetBody::m_aprioriRadiusB
Distance m_aprioriRadiusB
Apriori Radius B.
Definition: BundleTargetBody.h:161
Isis::BundleTargetBody::m_aprioriRadiusC
Distance m_aprioriRadiusC
Apriori Radius C.
Definition: BundleTargetBody.h:163
Isis::IException::User
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition: IException.h:126
Isis::BundleTargetBody::poleRaCoefs
std::vector< Angle > poleRaCoefs()
Returns the coefficients of the right ascension polynomial.
Definition: BundleTargetBody.cpp:855
Isis::BundleTargetBody::solveTriaxialRadii
virtual bool solveTriaxialRadii()
If the triaxial radii will be solved for with this target body.
Definition: BundleTargetBody.cpp:543
Isis::Angle::radians
double radians() const
Convert an angle to a double.
Definition: Angle.h:226

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:12