1 #include "TargetInfoWidget.h" 2 #include "ui_TargetInfoWidget.h" 32 if (name.compare(
"MOON") == 0) {
33 image.load(
FileName(
"$base/images/nasa_moon_large.png").expanded());
34 setWindowIcon(QIcon(
FileName(
"$base/icons/weather-clear-night.png")
37 else if (name.compare(
"Enceladus") == 0) {
38 image.load(
FileName(
"$base/images/nasa_enceladus_saturn.png").expanded());
39 setWindowIcon(QIcon(
FileName(
"$base/icons/nasa_enceladus.png").expanded()));
41 else if (name.compare(
"Europa") == 0) {
42 image.load(
FileName(
"$base/images/nasa_europa_large.png").expanded());
43 setWindowIcon(QIcon(
FileName(
"$base/icons/nasa_europa.png").expanded()));
45 else if (name.compare(
"Mars") == 0) {
46 image.load(
FileName(
"$base/images/nasa_mars_large.png").expanded());
47 setWindowIcon(QIcon(
FileName(
"$base/icons/nasa_mars.png").expanded()));
49 else if (name.compare(
"Titan") == 0) {
50 image.load(
FileName(
"$base/images/nasa_titan_large.png").expanded());
51 setWindowIcon(QIcon(
FileName(
"$base/icons/nasa_titan.png").expanded()));
56 setMinimumWidth(
m_ui->tabWidget->minimumWidth()+20);
58 m_ui->targetImage->setPixmap(image);
60 setFrameStyle(QFrame::Panel | QFrame::Sunken);
63 m_ui->tabWidget->setCurrentIndex(0);
66 m_ui->poleRightAscensionLabel->hide();
67 m_ui->poleDeclinationLabel->hide();
68 m_ui->polePMOffsetLabel->hide();
98 QString poleRaString =
"";
106 const QChar degChar(0260);
109 if (poleRaCoefs[1].degrees() < 0.0 ) {
110 poleRaString.append(tr(
"%1%3 - %2T").arg(poleRaCoefs[0].degrees()).arg(-poleRaCoefs[1]
111 .degrees()).arg(degChar));
114 poleRaString.append(tr(
"%1%3 + %2T").arg(poleRaCoefs[0].degrees()).arg(poleRaCoefs[1]
115 .degrees()).arg(degChar));
119 int nCoefs = poleRaNutPrecCoefs.size();;
120 for (
int i = 0; i < nCoefs; i++) {
121 if (poleRaNutPrecCoefs[i] < 0.0 ) {
122 tmp.append(tr(
" - %1%2%3").arg(-poleRaNutPrecCoefs[i]).arg(
"sin %1").arg(coefLetter)
125 else if (poleRaNutPrecCoefs[i] > 0.0 ) {
126 tmp.append(tr(
" + %1%2%3").arg(poleRaNutPrecCoefs[i]).arg(
"sin %1").arg(coefLetter)
131 poleRaString.append(tmp);
153 QString poleDecString =
"";
161 const QChar degChar(0260);
165 if (poleDecCoefs[1].degrees() < 0.0 ) {
166 poleDecString.append(tr(
"%1%3 - %2T").arg(poleDecCoefs[0].degrees()).arg(-poleDecCoefs[1]
167 .degrees()).arg(degChar));
170 poleDecString.append(tr(
"%1%3 + %2T").arg(poleDecCoefs[0].degrees()).arg(poleDecCoefs[1]
171 .degrees()).arg(degChar));
175 int nCoefs = poleDecNutPrecCoefs.size();
177 for (
int i = 0; i < nCoefs; i++) {
178 if (poleDecNutPrecCoefs[i] < 0.0 ) {
179 tmp.append(tr(
" - %1%2%3").arg(-poleDecNutPrecCoefs[i]).arg(
"cos %1").arg(coefLetter)
182 else if (poleDecNutPrecCoefs[i] > 0.0 ) {
183 tmp.append(tr(
" + %1%2%3").arg(poleDecNutPrecCoefs[i]).arg(
"cos %1").arg(coefLetter)
188 poleDecString.append(tmp);
189 return poleDecString;
195 return poleDecString;
208 QString pmString =
"";
217 const QChar degChar(0260);
221 if (pmCoefs[1].degrees() < 0.0 ) {
222 pmString.append(tr(
"%1%3 - %2d").arg(pmCoefs[0].degrees()).arg(-pmCoefs[1].degrees())
225 else if (pmCoefs[1].degrees() > 0.0 ) {
226 pmString.append(tr(
"%1%3 + %2d").arg(pmCoefs[0].degrees()).arg(pmCoefs[1].degrees())
230 if (pmCoefs[2].degrees() < 0.0 ) {
231 pmString.append(tr(
" - %2d^2").arg(-pmCoefs[2].degrees()));
233 else if (pmCoefs[2].degrees() > 0.0 ) {
234 pmString.append(tr(
" + %2d^2").arg(pmCoefs[2].degrees()));
238 int nCoefs = pmNutPrecCoefs.size();
240 for (
int i = 0; i < nCoefs; i++) {
241 if (pmNutPrecCoefs[i] < 0.0 ) {
242 tmp.append(tr(
" - %1%2%3").arg(-pmNutPrecCoefs[i]).arg(
"sin %1").arg(coefLetter).arg(i+1));
244 else if (pmNutPrecCoefs[i] > 0.0 ) {
245 tmp.append(tr(
" + %1%2%3").arg(pmNutPrecCoefs[i]).arg(
"sin %1").arg(coefLetter).arg(i+1));
249 pmString.append(tmp);
270 font.setPointSize(9);
273 m_ui->label->setFont(font);
274 m_ui->label_6->setFont(font);
279 m_ui->label->setFont(font);
280 m_ui->label_6->setFont(font);
281 m_ui->label_2->clear();
284 msg1 =
"Target body parameters cannot be solved for the Moon.";
287 msg2 =
"Target body information\n" 288 "is not on the cube labels.\n" 289 "This has no impact on most\n" 290 "operations. However, to view\n" 291 "or bundle adjust the target body\n" 292 "parameters you will need to rerun\n" 295 m_ui->label->setText(
296 QApplication::translate(
"TargetInfoWidget",
297 msg2.toLatin1().data(), 0));
298 m_ui->label_6->setText(
299 QApplication::translate(
"TargetInfoWidget",
300 msg2.toLatin1().data(), 0));
Isis specific code for binary pck.
Container class for TargetBody.
File name manipulation and expansion.
int frameType()
Returns the frame type.
std::vector< Angle > poleDecCoefs()
Returns coefficients of a quadratic polynomial fitting pole dec.
QString naifPlanetSystemName() const
This returns the body name of the target's planet system.
QString displayName() const
Returns the display name.
TargetBodyDisplayProperties * displayProperties()
Gets TargetBodyDisplayProperties.
std::vector< double > poleDecNutPrecCoefs()
TargetBody::poleDecNutPrecCoefs.
double kilometers() const
Get the distance in kilometers.
std::vector< double > poleRaNutPrecCoefs()
Returns coefficients of pole right ascension nut/prec terms.
Isis specific code for unknown frame type.
Distance meanRadius() const
Returns the mean radius.
std::vector< double > pmNutPrecCoefs()
Returns coefficients of the prime meridian nut/prec terms.
std::vector< Angle > poleRaCoefs()
TargetBody::poleRaCoefs.
Distance radiusA() const
Returns "a" radius.
Namespace for ISIS/Bullet specific routines.
Distance radiusB() const
Returns "b" radius.
std::vector< Angle > pmCoefs()
Returns coefficients of a quadratic polynomial fitting pole pm.
Distance radiusC() const
Returns the "c" radius.