@@ -363,11 +363,13 @@ QString StelObject::getMagnitudeNarration(const StelCore *core, const InfoString
363363{
364364 if (flags&Magnitude)
365365 {
366- float mag = getVMagnitude (core);
367- QString str = QString (" %1 %2" ).arg (q_ (" The object's visual magnitude is" ), QString::number ( getVMagnitude (core) + magoffset, ' f ' , decimals));
366+ const float mag = getVMagnitude (core);
367+ QString str = QString (" %1 %2" ).arg (q_ (" The object's visual magnitude is" ), StelUtils::narrateDecimal (mag + magoffset, decimals));
368368 const float airmass = getAirmass (core);
369369 if (airmass>-1 .f ) // Don't show extincted magnitude much below horizon where model is meaningless.
370- str += QString (" , %1 %2 %3 %4 %5. " ).arg (qc_ (" reduced to" , " object narration: reduced magnitude by extinction" ), QString::number (getVMagnitudeWithExtinction (core, mag, magoffset), ' f' , decimals), q_ (" by" ), QString::number (airmass, ' f' , 2 ), qc_ (" Airmasses of atmospheric extinction" , " object narration" ));
370+ str += QString (" , %1 %2 %3 %4 %5. " ).arg (qc_ (" reduced to" , " object narration: reduced magnitude by extinction" ),
371+ StelUtils::narrateDecimal (getVMagnitudeWithExtinction (core, mag, magoffset), decimals), q_ (" by" ),
372+ StelUtils::narrateDecimal (airmass, 2 ), qc_ (" Airmasses of atmospheric extinction" , " object narration" ));
371373 str += getExtraInfoStrings (Magnitude).join (" " );
372374 return str;
373375 }
@@ -1079,8 +1081,8 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
10791081 dec_j2000 = M_PI_2 - dec_j2000;
10801082 if (withDecimalDegree)
10811083 {
1082- firstCoordinate = StelUtils::radToDecDegNarration (ra_j2000, 2 , false , true );
1083- secondCoordinate = StelUtils::radToDecDegNarration (dec_j2000);
1084+ firstCoordinate = StelUtils::narrateDecimal (ra_j2000*M_180_PI, 2 );
1085+ secondCoordinate = StelUtils::narrateDecimal (dec_j2000*M_180_PI, 2 );
10841086 }
10851087 else
10861088 {
@@ -1104,8 +1106,8 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
11041106 dec_equ = M_PI_2 - dec_equ;
11051107 if (withDecimalDegree)
11061108 {
1107- firstCoordinate = StelUtils::radToDecDegNarration (ra_equ, 2 , false , true );
1108- secondCoordinate = StelUtils::radToDecDegNarration (dec_equ);
1109+ firstCoordinate = StelUtils::narrateDecimal (ra_equ*M_180_PI, 2 );
1110+ secondCoordinate = StelUtils::narrateDecimal (dec_equ*M_180_PI, 2 );
11091111 }
11101112 else
11111113 {
@@ -1140,8 +1142,8 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
11401142 if (withDecimalDegree)
11411143 {
11421144 // firstCoordinate = QString("%1h").arg(ra_sidereal*12/M_PI, 0, 'f', 5); // Decimal hours
1143- firstCoordinate = QString (" %1°" ).arg (QString::number (ra_sidereal*M_180_PI, ' f ' , 2 )); // Decimal degrees
1144- secondCoordinate = StelUtils::radToDecDegNarration (dec_sidereal);
1145+ firstCoordinate = QString (" %1°" ).arg (StelUtils::narrateDecimal (ra_sidereal*M_180_PI, 2 )); // Decimal degrees
1146+ secondCoordinate = StelUtils::narrateDecimal (dec_sidereal*M_180_PI, 2 );
11451147 }
11461148 else
11471149 {
@@ -1176,8 +1178,8 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
11761178 {
11771179 if (withDecimalDegree)
11781180 {
1179- firstCoordinate = StelUtils::radToDecDegNarration (az);
1180- secondCoordinate = StelUtils::radToDecDegNarration (alt_app);
1181+ firstCoordinate = StelUtils::narrateDecimal (az*M_180_PI, 2 );
1182+ secondCoordinate = StelUtils::narrateDecimal (alt_app*M_180_PI, 2 );
11811183 }
11821184 else
11831185 {
@@ -1189,8 +1191,8 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
11891191 {
11901192 if (withDecimalDegree)
11911193 {
1192- firstCoordinate = StelUtils::radToDecDegNarration (az);
1193- secondCoordinate = StelUtils::radToDecDegNarration (alt);
1194+ firstCoordinate = StelUtils::narrateDecimal (az*M_180_PI, 2 );
1195+ secondCoordinate = StelUtils::narrateDecimal (alt*M_180_PI, 2 );
11941196 }
11951197 else
11961198 {
@@ -1213,8 +1215,8 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
12131215 if (glong<0 .) glong += 2.0 *M_PI;
12141216 if (withDecimalDegree)
12151217 {
1216- firstCoordinate = StelUtils::radToDecDegNarration (glong);
1217- secondCoordinate = StelUtils::radToDecDegNarration (glat);
1218+ firstCoordinate = StelUtils::narrateDecimal (glong*M_180_PI, 2 );
1219+ secondCoordinate = StelUtils::narrateDecimal (glat*M_180_PI, 2 );
12181220 }
12191221 else
12201222 {
@@ -1236,8 +1238,8 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
12361238 if (sglong<0 .) sglong += 2.0 *M_PI;
12371239 if (withDecimalDegree)
12381240 {
1239- firstCoordinate = StelUtils::radToDecDegNarration (sglong);
1240- secondCoordinate = StelUtils::radToDecDegNarration (sglat);
1241+ firstCoordinate = StelUtils::narrateDecimal (sglong*M_180_PI, 2 );
1242+ secondCoordinate = StelUtils::narrateDecimal (sglat*M_180_PI, 2 );
12411243 }
12421244 else
12431245 {
@@ -1267,8 +1269,8 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
12671269 if (lambda<0 ) lambda+=2.0 *M_PI;
12681270 if (withDecimalDegree)
12691271 {
1270- firstCoordinate = StelUtils::radToDecDegNarration (lambda);
1271- secondCoordinate = StelUtils::radToDecDegNarration (beta);
1272+ firstCoordinate = StelUtils::narrateDecimal (lambda*M_180_PI, 2 );
1273+ secondCoordinate = StelUtils::narrateDecimal (beta*M_180_PI, 2 );
12721274 }
12731275 else
12741276 {
@@ -1294,8 +1296,8 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
12941296 if (lambdaJDE<0 ) lambdaJDE+=2.0 *M_PI;
12951297 if (withDecimalDegree)
12961298 {
1297- firstCoordinate = StelUtils::radToDecDegNarration (lambdaJDE);
1298- secondCoordinate = StelUtils::radToDecDegNarration (betaJDE);
1299+ firstCoordinate = StelUtils::narrateDecimal (lambdaJDE*M_180_PI, 2 );
1300+ secondCoordinate = StelUtils::narrateDecimal (betaJDE*M_180_PI, 2 );
12991301 }
13001302 else
13011303 {
@@ -1311,7 +1313,7 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
13111313
13121314 // report epsilon_A, angle between Earth's Axis and ecl. of date.
13131315 res += qc_ (" The Ecliptic obliquity of date is" , " object narration" ) + " " ;
1314- res += withDecimalDegree ? StelUtils::radToDecDegNarration (eclJDE) : StelUtils::radToDmsNarration (eclJDE, false ) + " . " ;
1316+ res += withDecimalDegree ? StelUtils::narrateDecimal (eclJDE*M_180_PI, 2 ) : StelUtils::radToDmsNarration (eclJDE, false ) + " . " ;
13151317 }
13161318
13171319 // Specialized plugins (e.g. Astro Navigation or ethno-astronomical specialties) may want to provide additional types of coordinates here.
@@ -1479,34 +1481,34 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
14791481
14801482 if (withDecimalDegree)
14811483 {
1482- firstCoordinate = StelUtils::radToDecDegStr (az, 2 , false , true );
1483- secondCoordinate = StelUtils::radToDecDegStr (-theta);
1484+ firstCoordinate = StelUtils::narrateDecimal (az*M_180_PI, 2 );
1485+ secondCoordinate = StelUtils::narrateDecimal (-theta*M_180_PI, 2 );
14841486 }
14851487 else
14861488 {
1487- firstCoordinate = StelUtils::radToDmsStr (az,true );
1488- secondCoordinate = StelUtils::radToHmsStr (-theta,true );
1489+ firstCoordinate = StelUtils::radToDmsNarration (az,true );
1490+ secondCoordinate = StelUtils::radToHmsNarration (-theta,true );
14891491 }
14901492
1491- res += QString (" %1: %2 %3, %4 %5<br/> " ).arg (event, azStr, firstCoordinate, haStr, secondCoordinate);
1493+ res += QString (" %1: %2 %3, %4 %5. " ).arg (event, azStr, firstCoordinate, haStr, secondCoordinate);
14921494
14931495 // TRANSLATORS: Greatest Western Digression is the maximum western azimuth for stars with upper culmination between pole and zenith
14941496 event=qc_ (" Greatest Western Digression is at" , " object narration" );
14951497 if (withDecimalDegree)
14961498 {
1497- firstCoordinate = StelUtils::radToDecDegStr (StelUtils::fmodpos (-az, 2 .*M_PI), 2 , false , true );
1498- secondCoordinate = StelUtils::radToDecDegStr (theta);
1499+ firstCoordinate = StelUtils::narrateDecimal (StelUtils::fmodpos (-az, 2 .*M_PI)*M_180_PI, 2 );
1500+ secondCoordinate = StelUtils::narrateDecimal (theta*M_180_PI, 2 );
14991501 }
15001502 else
15011503 {
1502- firstCoordinate = StelUtils::radToDmsStr (StelUtils::fmodpos (-az, 2 .*M_PI),true );
1503- secondCoordinate = StelUtils::radToHmsStr (theta,true );
1504+ firstCoordinate = StelUtils::radToDmsNarration (StelUtils::fmodpos (-az, 2 .*M_PI),true );
1505+ secondCoordinate = StelUtils::radToHmsNarration (theta,true );
15041506 }
15051507
1506- res += QString (" %1: %2=%3, %4=%5<br/> " ).arg (event, azStr, firstCoordinate, haStr, secondCoordinate);
1508+ res += QString (" %1: %2=%3, %4=%5. " ).arg (event, azStr, firstCoordinate, haStr, secondCoordinate);
15071509 }
1508- res += getExtraInfoStrings (flags&RTSTime).join (' ' );
1509- res += omgr->getExtraInfoStrings (flags&RTSTime).join (' ' );
1510+ res += getExtraInfoStrings (flags&RTSTime).join (" . " );
1511+ res += omgr->getExtraInfoStrings (flags&RTSTime).join (" . " );
15101512
15111513 prevObjStr = currentObjStr;
15121514 prevYear = currentYear;
@@ -1534,7 +1536,7 @@ QString StelObject::getCommonNarration(const StelCore *core, const InfoStringGro
15341536 // res += omgr->getExtraInfoStrings(Extra).join("");
15351537 }
15361538
1537- // Subclasses may want to exclude this by better wording sequence. For this, call with a moified flags mask that excludes what should not be repeated.
1539+ // Subclasses may want to exclude this by better wording sequence. For this, call with a modified flags mask that excludes what should not be repeated.
15381540 if (flags&IAUConstellation)
15391541 {
15401542 QString constel = (fuzzyEquals (eqNow.normSquared (),0 .) ? QString () : ConstellationMgr::getIAUconstellationName (core->getIAUConstellation (eqNow)));
@@ -2015,8 +2017,8 @@ QString StelObject::getSolarLunarNarration(const StelCore *core, const InfoStrin
20152017 az = (useSouthAzimuth? 2 . : 3 .)*M_PI - az;
20162018 if (az > M_PI*2 )
20172019 az -= M_PI*2 ;
2018- azStr = (withDecimalDegree ? StelUtils::radToDecDegStr (az, 2 ) : StelUtils::radToDmsStr (az,false ));
2019- altStr = (withDecimalDegree ? StelUtils::radToDecDegStr (alt, 2 ) : StelUtils::radToDmsStr (alt,false ));
2020+ azStr = (withDecimalDegree ? StelUtils::narrateDecimal (az*M_180_PI , 2 ) : StelUtils::radToDmsNarration (az,false ));
2021+ altStr = (withDecimalDegree ? StelUtils::narrateDecimal (alt*M_180_PI , 2 ) : StelUtils::radToDmsNarration (alt,false ));
20202022
20212023 // TRANSLATORS: Azimuth/Altitude
20222024 const QString SolarAz = (qc_ (" The sun's azimuth is " , " object narration" ));
@@ -2029,8 +2031,8 @@ QString StelObject::getSolarLunarNarration(const StelCore *core, const InfoStrin
20292031 az = (useSouthAzimuth? 2 . : 3 .)*M_PI - az;
20302032 if (az > M_PI*2 )
20312033 az -= M_PI*2 ;
2032- azStr = (withDecimalDegree ? StelUtils::radToDecDegStr (az, 2 ) : StelUtils::radToDmsStr (az,false ));
2033- altStr = (withDecimalDegree ? StelUtils::radToDecDegStr (alt, 2 ) : StelUtils::radToDmsStr (alt,false ));
2034+ azStr = (withDecimalDegree ? StelUtils::narrateDecimal (az*M_180_PI , 2 ) : StelUtils::radToDmsNarration (az,false ));
2035+ altStr = (withDecimalDegree ? StelUtils::narrateDecimal (alt*M_180_PI , 2 ) : StelUtils::radToDmsNarration (alt,false ));
20342036
20352037 // TRANSLATORS: Azimuth/Altitude
20362038 const QString LunarAz = (qc_ (" The Moon's azimuth is " , " object narration" ));
0 commit comments