• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Stellarium / stellarium / 10609521019

29 Aug 2024 05:56AM UTC coverage: 12.113% (-0.03%) from 12.138%
10609521019

Pull #3847

github

alex-w
[SSE] Add info for total candidates for addiing...
Pull Request #3847: Threaded planet computation (and a few more speedups)

30 of 686 new or added lines in 51 files covered. (4.37%)

41 existing lines in 18 files now uncovered.

14434 of 119159 relevant lines covered (12.11%)

19024.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/core/modules/NomenclatureItem.cpp
1
/*
2
 * Copyright (C) 2017 Alexander Wolf
3
 * Copyright (C) 2017 Teresa Huertas Roldán
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, USA.
18
 */
19

20
#include "NomenclatureItem.hpp"
21
#include "StelModuleMgr.hpp"
22
#include "StelMovementMgr.hpp"
23
#include "StelObject.hpp"
24
#include "StelObserver.hpp"
25
#include "StelPainter.hpp"
26
#include "StelApp.hpp"
27
#include "StelCore.hpp"
28
#include "StelTranslator.hpp"
29
#include "StelProjector.hpp"
30
#include "StelUtils.hpp"
31

32
const QString NomenclatureItem::NOMENCLATURE_TYPE = QStringLiteral("NomenclatureItem");
33
Vec3f NomenclatureItem::color = Vec3f(0.1f,1.0f,0.1f);
34
bool NomenclatureItem::flagOutlineCraters = false;
35
bool NomenclatureItem::hideLocalNomenclature = false;
36
bool NomenclatureItem::showTerminatorZoneOnly = false;
37
int NomenclatureItem::terminatorMinAltitude=-2;
38
int NomenclatureItem::terminatorMaxAltitude=40;
39
bool NomenclatureItem::showSpecialNomenclatureOnly = false;
40
LinearFader NomenclatureItem::labelsFader;
41

42
NomenclatureItem::NomenclatureItem(PlanetP nPlanet,
×
43
                                   int nId,
44
                                   const QString& nName,
45
                                   const QString& nContext,
46
                                   const QString& nOrigin,
47
                                   NomenclatureItemType nItemType,
48
                                   double nLatitude,
49
                                   double nLongitude,
50
                                   double nSize)
×
51
        : XYZ(0.0)
×
52
        , jde(0.0)
×
53
        , planet(nPlanet)
×
54
        , identificator(nId)
×
55
        , englishName(nName)
×
56
        , context(nContext)
×
57
        , nameI18n(nName)
×
58
        , origin(nOrigin)
×
59
        , originI18n(nOrigin)
×
60
        , nType(nItemType)
×
61
        , latitude(nLatitude)
×
62
        , longitude(nLongitude)
×
63
        , size(nSize)
×
64
{
65
        StelUtils::spheToRect(longitude * M_PI_180, latitude * M_PI_180, XYZpc);
×
66
}
×
67

68
NomenclatureItem::~NomenclatureItem()
×
69
{
70
}
×
71

72
QString NomenclatureItem::getNomenclatureTypeString(NomenclatureItemType nType)
×
73
{
74
        Q_ASSERT(niTypeStringMap.size()>20); // should be filled, not sure how many.
×
75
        return niTypeStringMap.value(nType, qc_("undocumented landform type", "landform"));
×
76
}
77

78
QString NomenclatureItem::getNomenclatureTypeLatinString(NomenclatureItemType nType)
×
79
{
80
        static const QMap<NomenclatureItemType, QString>map = {
81
                { niSpecialPointPole, "point" },
×
82
                { niSpecialPointEast, "point" },
×
83
                { niSpecialPointWest, "point" },
×
84
                { niSpecialPointCenter, "point" },
×
85
                { niSpecialPointSubSolar, "point" },
×
86
                { niArcus  , "arcus" },
×
87
                { niAstrum , "astrum" },
×
88
                { niCatena , "catena" },
×
89
                { niCavus  , "cavus" },
×
90
                { niChaos  , "chaos" },
×
91
                { niChasma , "chasma" },
×
92
                { niCollis , "collis" },
×
93
                { niCorona , "corona" },
×
94
                { niCrater , "crater" },
×
95
                { niDorsum , "dorsum" },
×
96
                { niFacula , "facula" },
×
97
                { niFarrum , "farrum" },
×
98
                { niFlexus , "flexus" },
×
99
                { niFluctus, "fluctus" },
×
100
                { niFlumen , "flumen" },
×
101
                { niFretum , "fretum" },
×
102
                { niFossa  , "fossa" },
×
103
                { niInsula , "insula" },
×
104
                { niLabes  , "labes" },
×
105
                { niLabyrinthus, "labyrinthus" },
×
106
                { niLacuna   , "lacuna" },
×
107
                { niLacus    , "lacus" },
×
108
                { niLenticula, "lenticula" },
×
109
                { niLinea    , "linea" },
×
110
                { niLingula  , "lingula" },
×
111
                { niMacula   , "macula" },
×
112
                { niMare     , "mare" },
×
113
                { niMensa    , "mensa" },
×
114
                { niMons     , "mons" },
×
115
                { niOceanus  , "oceanus" },
×
116
                { niPalus    , "palus" },
×
117
                { niPatera   , "patera" },
×
118
                { niPlanitia , "planitia" },
×
119
                { niPlanum   , "planum" },
×
120
                { niPlume    , "plume" },
×
121
                { niPromontorium, "promontorium" },
×
122
                { niRegio    , "regio" },
×
123
                { niReticulum, "reticulum" },
×
124
                { niRima     , "rima" },
×
125
                { niRupes    , "rupes" },
×
126
                { niSaxum  , "saxum" },
×
127
                { niScopulus , "scopulus" },
×
128
                { niSerpens  , "serpens" },
×
129
                { niSulcus   , "sulcus" },
×
130
                { niSinus    , "sinus" },
×
131
                { niTerra    , "terra" },
×
132
                { niTessera  , "tessera" },
×
133
                { niTholus   , "tholus" },
×
134
                { niUnda     , "unda" },
×
135
                { niVallis   , "vallis" },
×
136
                { niVastitas , "vastitas" },
×
137
                { niVirga    , "virga" }};
×
138
                return map.value(nType, "");
×
139
}
140

141
QString NomenclatureItem::getNomenclatureTypeDescription(NomenclatureItemType nType, QString englishName)
×
142
{
143
        Q_ASSERT(niTypeDescriptionMap.size()>20); // should be filled, not sure how many.
×
144
        QString ret=niTypeDescriptionMap.value(nType, q_("Undocumented landform type."));
×
145
        // Fix a few exceptions
146
        if((englishName=="Mars") && (nType==niMare))
×
147
                // TRANSLATORS: Description for landform 'mare' on Mars
148
                return q_("'Sea'; dark albedo areas of no known geological significance.");
×
149
        if (englishName=="Titan")
×
150
        {
151
                if (nType==niLacus)
×
152
                        // TRANSLATORS: Description for landform 'lacus' on Titan
153
                        return q_("'Lake' or small, dark plain with discrete, sharp boundaries.");
×
154
                if (nType==niMare)
×
155
                        // TRANSLATORS: Description for landform 'mare' on Titan
156
                        return q_("'Sea'; large expanses of dark materials thought to be liquid hydrocarbons");
×
157
                if (nType==niSinus)
×
158
                        // TRANSLATORS: Description for landform 'sinus' on Titan
159
                        return q_("'Bay'; bays within seas or lakes of liquid hydrocarbons.");
×
160
        }
161
        return ret;
×
162
}
×
163

164
float NomenclatureItem::getSelectPriority(const StelCore* core) const
×
165
{
166
        if (!getFlagLabels()) // disable if switched off.
×
167
                return 1.e12f;
×
168

169
        // Exclude if the planet is too faint for view (in deep shadow for example),
170
        // or if feature is on far-side of the planet
171
        if (planet->getVMagnitude(core)>=20.f || (planet->getJ2000EquatorialPos(core).normSquared() < getJ2000EquatorialPos(core).normSquared()))
×
172
                return 1.e12f;
×
173

174
        // Start with a priority just slightly lower than the carrier planet,
175
        // so that clicking on the planet in halo does not select any feature point.
176
        float priority=planet->getSelectPriority(core)+5.f;
×
177
        // check visibility of feature
178
        const float scale = getAngularDiameterRatio(core);
×
179
        const float planetScale = 2.f*static_cast<float>(planet->getAngularRadius(core))/core->getProjection(StelCore::FrameJ2000)->getFov();
×
180

181
        // Require the planet to cover 1/10 of the screen to make it worth clicking on features.
182
        // scale 0.04 is equal to the rendering criterion. Allow 0.02 for clicking on smaller features.
183
        if ((scale>0.02f) && planetScale > 0.1f)
×
184
                priority -= 5.f + 4.f * scale;
×
185
        else
186
                priority+=1.e12f; // disallow selection
×
187

188
        return priority;
×
189
}
190

191
QString NomenclatureItem::getNameI18n() const
×
192
{
193
        if (nType==niCrater)
×
194
                return QString("%1 (%2, %3)").arg(nameI18n, getNomenclatureTypeString(nType), getPlanet()->getNameI18n());
×
195
        else
196
                return QString("%1 (%2)").arg(nameI18n, getPlanet()->getNameI18n());
×
197
}
198

199
QString NomenclatureItem::getEnglishName() const
×
200
{
201
        if (nType==niCrater)
×
202
                return QString("%1 (%2, %3)").arg(englishName, getNomenclatureTypeLatinString(nType), getPlanet()->getEnglishName());
×
203
        else
204
                return QString("%1 (%2)").arg(englishName, getPlanet()->getEnglishName());
×
205
}
206

207
void NomenclatureItem::translateName(const StelTranslator& trans)
×
208
{
209
        nameI18n = trans.qtranslate(englishName, context);
×
210
        originI18n = trans.qtranslate(origin, "origin");
×
211
}
×
212

213
QString NomenclatureItem::getInfoString(const StelCore* core, const InfoStringGroup& flags) const
×
214
{
215
        QString str;
×
216
        QTextStream oss(&str);
×
217
        const bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDegrees();
×
218

219
        if (flags&Name)
×
220
        {
221
                oss << "<h2>" << nameI18n;
×
222
                // englishName here is the original scientific term, usually latin but could be plain english like "landing site".
223
                if (nameI18n!=englishName && nType<NomenclatureItemType::niSpecialPointPole)
×
224
                        oss << " (" << englishName << ")";
×
225
                oss << "</h2>";
×
226
        }
227

228
        if (flags&ObjectType && nType!=NomenclatureItem::niUNDEFINED)
×
229
        {
230
                QString tstr  = getNomenclatureTypeString(nType);
×
231
                QString latin = getNomenclatureTypeLatinString(nType); // not always latin!
×
232
                QString ts    = q_("Type");
×
233
                if (tstr!=latin && !latin.isEmpty() && nType<NomenclatureItemType::niSpecialPointPole)
×
234
                        oss << QString("%1: <b>%2</b> (%3: %4)<br/>").arg(ts, tstr, q_("geologic term"), latin);
×
235
                else
236
                        oss << QString("%1: <b>%2</b><br/>").arg(ts, tstr);
×
237
        }
×
238

239
        // Ra/Dec etc.
240
        oss << getCommonInfoString(core, flags);
×
241

242
        if (flags&Size && size>0. && nType<NomenclatureItem::niSpecialPointPole)
×
243
        {
244
                QString sz = q_("Linear size");
×
245
                // Satellite Features are almost(?) exclusively lettered craters, and all are on the Moon. Assume craters.
246
                if ((nType==NomenclatureItem::niCrater) || (nType==NomenclatureItem::niSatelliteFeature))
×
247
                        sz = q_("Diameter");
×
248
                oss << QString("%1: %2 %3<br/>").arg(sz, QString::number(size, 'f', 2), qc_("km", "distance"));
×
249
        }
×
250

251
        if (flags&Extra)
×
252
        {
253
                const QString cType = isPlanetocentric() ? q_("Planetocentric coordinates") : q_("Planetographic coordinates");
×
254
                QString sLong = StelUtils::decDegToLongitudeStr(longitude, isEastPositive(), is180(), !withDecimalDegree),
×
255
                        sLat  = StelUtils::decDegToLatitudeStr(latitude, !withDecimalDegree);
×
256
                if (nType>=NomenclatureItemType::niSpecialPointEast && planet->getEnglishName()=="Jupiter")
×
257
                {
258
                        // Due to Jupiter's issues around GRS shift we must repeat some calculations here.
259
                        double lng=0., lat=0.;
×
260
                        // East/West points are assumed to be along the equator, on the planet rim. Start with sub-observer point
261
                        if (nType==NomenclatureItemType::niSpecialPointEast || nType==NomenclatureItemType::niSpecialPointWest)
×
262
                        {
263
                                QPair<Vec4d, Vec3d> subObs = planet->getSubSolarObserverPoints(core, false);
×
264
                                lng = - subObs.first[2]  * M_180_PI + ((nType==NomenclatureItemType::niSpecialPointEast) ? 90. : -90.);
×
265
                                Q_ASSERT(lat==0.);
×
266
                        }
267
                        // Center and Subsolar points are similar.
268
                        if (nType==NomenclatureItemType::niSpecialPointCenter || nType==NomenclatureItemType::niSpecialPointSubSolar)
×
269
                        {
270
                                QPair<Vec4d, Vec3d> subObs = planet->getSubSolarObserverPoints(core, false);
×
271
                                lat =   M_180_PI * (nType==NomenclatureItemType::niSpecialPointCenter ? subObs.first[1]: subObs.second[1]);
×
272
                                lng = - M_180_PI * (nType==NomenclatureItemType::niSpecialPointCenter ? subObs.first[2]: subObs.second[2]);
×
273
                        }
274
                        lng   = StelUtils::fmodpos(lng, 360.);
×
275
                        sLong = StelUtils::decDegToLongitudeStr(360.-lng, isEastPositive(), is180(), !withDecimalDegree);
×
276
                        sLat  = StelUtils::decDegToLatitudeStr(lat, !withDecimalDegree);
×
277
                }
278
                oss << QString("%1: %2/%3<br/>").arg(cType, sLat, sLong);
×
279
                oss << QString("%1: %2<br/>").arg(q_("Celestial body"), planet->getNameI18n());
×
280
                QString description = getNomenclatureTypeDescription(nType, planet->getEnglishName());
×
281
                if (nType!=NomenclatureItem::niUNDEFINED && nType<NomenclatureItem::niSpecialPointPole && !description.isEmpty())
×
282
                        oss << QString("%1: %2<br/>").arg(q_("Landform description"), description);
×
283
                if (planet->getEnglishName()!="Jupiter") // we must exclude this for now due to Jupiter's "off" rotation
×
284
                        oss << QString("%1: %2°<br/>").arg(q_("Solar altitude"), QString::number(getSolarAltitude(core), 'f', 1));
×
285

286
                if (!origin.isEmpty())
×
287
                        oss << StelUtils::wrapText(QString("%1: %2").arg(q_("Origin of name"), originI18n)) << "<br/>";
×
288

289
                // DEBUG output. This should help defining valid criteria for selection priority.
290
                // oss << QString("Planet angular size (semidiameter!): %1''<br/>").arg(QString::number(planet->getAngularSize(core)*3600.));
291
                // oss << QString("Angular size: %1''<br/>").arg(QString::number(getAngularSize(core)*3600.));
292
                // oss << QString("Angular size ratio: %1<br/>").arg(QString::number(static_cast<double>(getAngularDiameterRatio(core)), 'f', 5));
293
        }
×
294

295
        postProcessInfoString(str, flags);
×
296
        return str;
×
297
}
×
298

299
Vec3f NomenclatureItem::getInfoColor(void) const
×
300
{
301
        return color;
×
302
}
303

304
Vec3d NomenclatureItem::getJ2000EquatorialPos(const StelCore* core) const
×
305
{
306
        if (!forceItems && fuzzyEquals(jde, core->getJDE())) return XYZ;
×
307
        jde = core->getJDE();
×
308
        const Vec3d equPos = planet->getJ2000EquatorialPos(core);
×
309
        // East/West points are assumed to be along the equator, on the planet rim. Start with sub-observer point
310
        if (nType==NomenclatureItemType::niSpecialPointEast || nType==NomenclatureItemType::niSpecialPointWest)
×
311
        {
312
                QPair<Vec4d, Vec3d> subObs = planet->getSubSolarObserverPoints(core, true);
×
313

314
                longitude = - subObs.first[2]  * M_180_PI;
×
315
                if (planet->isRotatingRetrograde()) longitude *= -1;
×
316
                longitude += ((nType==NomenclatureItemType::niSpecialPointEast) ? 90. : -90.);
×
317
                longitude=StelUtils::fmodpos(longitude, 360.);
×
318
                Q_ASSERT(latitude==0.);
×
319
                // rebuild XYZpc
320
                StelUtils::spheToRect(longitude * M_PI_180, latitude * M_PI_180, XYZpc);
×
321
        }
322
        // Center and Subsolar points are similar.
323
        if (nType==NomenclatureItemType::niSpecialPointCenter || nType==NomenclatureItemType::niSpecialPointSubSolar)
×
324
        {
325
                QPair<Vec4d, Vec3d> subObs = planet->getSubSolarObserverPoints(core, true);
×
326

327
                if (nType==NomenclatureItemType::niSpecialPointCenter)
×
328
                {
329
                        longitude = - subObs.first[2] * M_180_PI;
×
330
                        if (planet->isRotatingRetrograde()) longitude *= -1;
×
331
                        latitude = subObs.first[0] * M_180_PI; // all IAU WGPSN data are planetocentric (spherical)
×
332
                }
333
                else
334
                {
335
                        longitude = - subObs.second[2] * M_180_PI;
×
336
                        if (planet->isRotatingRetrograde()) longitude *= -1;
×
337
                        latitude = subObs.second[0] * M_180_PI; // all IAU WGPSN data are planetocentric (spherical)
×
338
                }
339
                longitude=StelUtils::fmodpos(longitude, 360.);
×
340
                // rebuild XYZpc
341
                StelUtils::spheToRect(longitude * M_PI_180, latitude * M_PI_180, XYZpc);
×
342
        }
343
        // Calculate the radius of the planet at the item's position. It is necessary to re-scale it
344
        Vec3d XYZ0 = XYZpc * planet->getEquatorialRadius() * static_cast<double>(planet->getSphereScale());
×
345
        // TODO2: intersect properly with OBJ bodies! (LP:1723742)
346

347
        /* We have to calculate feature's coordinates in VSOP87 (this is Ecliptic J2000 coordinates).
348
           Feature's original coordinates are in planetocentric system, so we have to multiply it by the rotation matrix.
349
           planet->getRotEquatorialToVsop87() gives us the rotation matrix between Equatorial (on date) coordinates and Ecliptic J2000 coordinates.
350
           So we have to make another change to obtain the rotation matrix using Equatorial J2000: we have to multiplay by core->matVsop87ToJ2000 */
351
        // TODO: Maybe it is more efficient to add some getRotEquatorialToVsop87Zrotation() to the Planet class which returns a Mat4d computed in Planet::computeTransMatrix().
352
        XYZ = equPos + (core->matVsop87ToJ2000 * planet->getRotEquatorialToVsop87()) * Mat4d::zrotation(static_cast<double>(planet->getAxisRotation())* M_PI/180.0) * XYZ0;
×
353
        return XYZ;
×
354
}
355

356
// Return apparent semidiameter in degrees
357
double NomenclatureItem::getAngularRadius(const StelCore* core) const
×
358
{
359
        return std::atan2(0.5*size*planet->getSphereScale()/AU, getJ2000EquatorialPos(core).norm()) * M_180_PI;
×
360
}
361

362
float NomenclatureItem::getAngularDiameterRatio(const StelCore *core) const
×
363
{
364
    return static_cast<float>(2.*getAngularRadius(core))/core->getProjection(StelCore::FrameJ2000)->getFov();
×
365
}
366

367
void NomenclatureItem::draw(StelCore* core, StelPainter *painter)
×
368
{
369
        // show special points only?
370
        if (getFlagShowSpecialNomenclatureOnly() && nType<NomenclatureItem::niSpecialPointPole)
×
371
                return;
×
372

373
        if (getFlagHideLocalNomenclature() && planet==core->getCurrentPlanet())
×
374
                return;
×
375

376
        // Called by NomenclatureMgr, so we don't need to check if labelsFader is true.
377
        // The painter has been set to enable blending.
378
        const Vec3d equPos = planet->getJ2000EquatorialPos(core);
×
379
        const Vec3d XYZ = getJ2000EquatorialPos(core);
×
380

381
        // In case we are located at a labeled site, don't show this label or any labels within 150 km. Else we have bad flicker...
382
        if (XYZ.normSquared() < 150.*150.*AU_KM*AU_KM )
×
383
                return;
×
384

385
        const double screenRadius = getAngularRadius(core)*M_PI_180*static_cast<double>(painter->getProjector()->getPixelPerRadAtCenter());
×
386

387
        // We can use ratio of angular size to the FOV to checking visibility of features also!
388
        // double scale = getAngularSize(core)/painter->getProjector()->getFov();
389
        // if (painter->getProjector()->projectCheck(XYZ, srcPos) && (dist >= XYZ.length()) && (scale>0.04 && scale<0.5))
390

391
        // check visibility of feature
392
        Vec3d srcPos;
×
393
        const float scale = getAngularDiameterRatio(core);
×
394

395
        if (painter->getProjector()->projectCheck(XYZ, srcPos) && (equPos.normSquared() >= XYZ.normSquared())
×
396
            && (scale>0.04f && (scale<0.5f || nType>=NomenclatureItem::niSpecialPointPole )))
×
397
        {
398
                const float solarAltitude=getSolarAltitude(core);
×
399
                // Throw out real items if not along the terminator?
400
                if ( (nType<NomenclatureItem::niSpecialPointPole) && showTerminatorZoneOnly && (solarAltitude > terminatorMaxAltitude || solarAltitude < terminatorMinAltitude) )
×
401
                        return;
×
402
                const float brightness=(nType>=NomenclatureItem::niSpecialPointPole ? 0.5f : (solarAltitude<0. ? 0.25f : 1.0f));
×
403
                painter->setColor(color*brightness, labelsFader.getInterstate());
×
404
                painter->drawCircle(static_cast<float>(srcPos[0]), static_cast<float>(srcPos[1]), 2.f);
×
405
                // Highlight a few mostly circular classes with ellipses:
406
                // - Craters
407
                // - Satellite features (presumably all of these are satellite craters)
408
                // - Lunar Maria. Mare Frigoris is elongated, and an ellipse would look stupid.
409
                if (flagOutlineCraters && (nType==niCrater || nType==niSatelliteFeature || (nType==niMare && englishName!="Mare Frigoris")))
×
410
                {
411
                        // Compute aspectRatio and angle from position of planet and own position, parallactic angle, ...
412
                        const double distDegrees=equPos.angle(XYZ)*M_180_PI; // angular distance from planet centre position
×
413
                        const double plRadiusDeg=planet->getAngularRadius(core);
×
414
                        const double sinDistCenter= distDegrees/plRadiusDeg; // should be 0...1
×
415
                        if (sinDistCenter<0.9999) // exclude any edge ellipses which would be hanging over the limb.
×
416
                        {
417
                                const double angleDistCenterRad=asin(qMin(0.9999, sinDistCenter)); // 0..pi/2 on the lunar/planet sphere
×
418
                                const double aspectRatio=cos(angleDistCenterRad);
×
419
                                // Exclude further ellipses which would overshoot limb.
420
                                if (getAngularRadius(core)*qMax(0.0001,aspectRatio)+distDegrees < plRadiusDeg )
×
421
                                {
NEW
422
                                        static StelMovementMgr *sMMgr=GETSTELMODULE(StelMovementMgr);
×
423
                                        const Vec3d equPosNow = planet->getEquinoxEquatorialPos(core);
×
424
                                        const Vec3d XYZNow = getEquinoxEquatorialPos(core);
×
425
                                        double ra, de, raPl, dePl;
426
                                        StelUtils::rectToSphe(&ra, &de, XYZNow);
×
427
                                        StelUtils::rectToSphe(&raPl, &dePl, equPosNow);
×
428
                                        double dRA=StelUtils::fmodpos(ra-raPl, 2.*M_PI);
×
429
                                        if(dRA>M_PI)
×
430
                                                dRA-=2.*M_PI;
×
431
                                        const double angle=atan2(dRA, de-dePl);
×
NEW
432
                                        StelMovementMgr::MountMode mountMode=sMMgr->getMountMode();
×
433
                                        const double par = mountMode==StelMovementMgr::MountAltAzimuthal ? static_cast<double>(getParallacticAngle(core)) : 0.;
×
434
                                        painter->drawEllipse(srcPos[0], srcPos[1], screenRadius, screenRadius*qMax(0.0001,aspectRatio), angle-par );
×
435
                                }
436
                        }
437
                        //else
438
                        //        qWarning() << "Sine of Distance" << sinDistCenter << ">0.99975 encountered for crater " << englishName << "at " << longitude << "/" << latitude;
439
                }
440
                painter->drawText(static_cast<float>(srcPos[0]), static_cast<float>(srcPos[1]), nameI18n, 0, 5.f, 5.f, false);
×
441
        }
442
}
443

444
double NomenclatureItem::getSolarAltitude(const StelCore *core) const
×
445
{
446
        QPair<Vec4d, Vec3d> ssop=planet->getSubSolarObserverPoints(core);
×
447
        double sign=planet->isRotatingRetrograde() ? -1. : 1.;
×
448
        double colongitude=450.*M_PI_180-sign*ssop.second[2];
×
449
        double sinH= (sin(ssop.second[0])*sin(latitude*M_PI_180) +
×
450
                      cos(ssop.second[0])*cos(latitude*M_PI_180)*sin(colongitude-longitude*M_PI_180));
×
451
        double h = abs(sinH)<=1 ? asin(sinH) : M_PI_2 * StelUtils::sign(sinH);
×
452
        return h*M_180_PI;
×
453
}
454

455
NomenclatureItem::NomenclatureItemType NomenclatureItem::getNomenclatureItemType(const QString abbrev)
×
456
{
457
        // codes for types of features (details: https://planetarynames.wr.usgs.gov/DescriptorTerms)
458
        static const QMap<QString, NomenclatureItem::NomenclatureItemType> niTypes = {
459
                { "AL", NomenclatureItem::niAlbedoFeature        },
×
460
                { "AR", NomenclatureItem::niArcus                },
×
461
                { "AS", NomenclatureItem::niAstrum                },
×
462
                { "CA", NomenclatureItem::niCatena                },
×
463
                { "CB", NomenclatureItem::niCavus                },
×
464
                { "CH", NomenclatureItem::niChaos                },
×
465
                { "CM", NomenclatureItem::niChasma                },
×
466
                { "CO", NomenclatureItem::niCollis                },
×
467
                { "CR", NomenclatureItem::niCorona                },
×
468
                { "AA", NomenclatureItem::niCrater                },
×
469
                { "DO", NomenclatureItem::niDorsum                },
×
470
                { "ER", NomenclatureItem::niEruptiveCenter        },
×
471
                { "FA", NomenclatureItem::niFacula                },
×
472
                { "FR", NomenclatureItem::niFarrum                },
×
473
                { "FE", NomenclatureItem::niFlexus                },
×
474
                { "FL", NomenclatureItem::niFluctus                },
×
475
                { "FM", NomenclatureItem::niFlumen                },
×
476
                { "FO", NomenclatureItem::niFossa                },
×
477
                { "FT", NomenclatureItem::niFretum                },
×
478
                { "IN", NomenclatureItem::niInsula                },
×
479
                { "LA", NomenclatureItem::niLabes                },
×
480
                { "LB", NomenclatureItem::niLabyrinthus                },
×
481
                { "LU", NomenclatureItem::niLacuna                },
×
482
                { "LC", NomenclatureItem::niLacus                },
×
483
                { "LF", NomenclatureItem::niLandingSite                },
×
484
                { "LG", NomenclatureItem::niLargeRingedFeature        },
×
485
                { "LE", NomenclatureItem::niLenticula                },
×
486
                { "LI", NomenclatureItem::niLinea                },
×
487
                { "LN", NomenclatureItem::niLingula                },
×
488
                { "MA", NomenclatureItem::niMacula                },
×
489
                { "ME", NomenclatureItem::niMare                },
×
490
                { "MN", NomenclatureItem::niMensa                },
×
491
                { "MO", NomenclatureItem::niMons                },
×
492
                { "OC", NomenclatureItem::niOceanus                },
×
493
                { "PA", NomenclatureItem::niPalus                },
×
494
                { "PE", NomenclatureItem::niPatera                },
×
495
                { "PL", NomenclatureItem::niPlanitia                },
×
496
                { "PM", NomenclatureItem::niPlanum                },
×
497
                { "PU", NomenclatureItem::niPlume                },
×
498
                { "PR", NomenclatureItem::niPromontorium        },
×
499
                { "RE", NomenclatureItem::niRegio                },
×
500
                { "RT", NomenclatureItem::niReticulum                },
×
501
                { "RI", NomenclatureItem::niRima                },
×
502
                { "RU", NomenclatureItem::niRupes                },
×
503
                { "SA", NomenclatureItem::niSaxum                },
×
504
                { "SF", NomenclatureItem::niSatelliteFeature        },
×
505
                { "SC", NomenclatureItem::niScopulus                },
×
506
                { "SE", NomenclatureItem::niSerpens                },
×
507
                { "SI", NomenclatureItem::niSinus                },
×
508
                { "SU", NomenclatureItem::niSulcus                },
×
509
                { "TA", NomenclatureItem::niTerra                },
×
510
                { "TE", NomenclatureItem::niTessera                },
×
511
                { "TH", NomenclatureItem::niTholus                },
×
512
                { "UN", NomenclatureItem::niUnda                },
×
513
                { "VA", NomenclatureItem::niVallis                },
×
514
                { "VS", NomenclatureItem::niVastitas                },
×
515
                { "VI", NomenclatureItem::niVirga                }};
×
516
        return niTypes.value(abbrev, NomenclatureItem::niUNDEFINED);
×
517
}
518
QMap<NomenclatureItem::NomenclatureItemType, QString> NomenclatureItem::niTypeStringMap;
519
QMap<NomenclatureItem::NomenclatureItemType, QString> NomenclatureItem::niTypeDescriptionMap;
520
NomenclatureItem::PlanetCoordinateOrientation NomenclatureItem::getPlanetCoordinateOrientation(QString planetName)
×
521
{
522
        // data from https://planetarynames.wr.usgs.gov/TargetCoordinates.
523
        // Commented away where they are equal to te default value.
524
        static const QMap<QString, NomenclatureItem::PlanetCoordinateOrientation> niPCOMap = {
525
        //{"Amalthea"   , NomenclatureItem::pcoPlanetographicWest360 },
526
        {"Ariel"      , NomenclatureItem::pcoPlanetocentricEast360 },
×
527
        //{"Callisto"   , NomenclatureItem::pcoPlanetographicWest360 },
528
        {"Charon"     , NomenclatureItem::pcoPlanetocentricEast360 },
×
529
        //{"Deimos"     , NomenclatureItem::pcoPlanetographicWest360 },
530
        //{"Dione"      , NomenclatureItem::pcoPlanetographicWest360 },
531
        //{"Enceladus"  , NomenclatureItem::pcoPlanetographicWest360 },
532
        //{"Epimetheus" , NomenclatureItem::pcoPlanetographicWest360 },
533
        //{"Europa"     , NomenclatureItem::pcoPlanetographicWest360 },
534
        //{"Ganymede"   , NomenclatureItem::pcoPlanetographicWest360 },
535
        //{"Hyperion"   , NomenclatureItem::pcoPlanetographicWest360 },
536
        //{"Iapetus"    , NomenclatureItem::pcoPlanetographicWest360 },
537
        //{"Io"         , NomenclatureItem::pcoPlanetographicWest360 }, // Voyager/Galileo SSI
538
        //{"Janus"      , NomenclatureItem::pcoPlanetographicWest360 },
539
        {"Mars"       , NomenclatureItem::pcoPlanetocentricEast360 }, // MDIM 2.1
×
540
        //{"Mercury"    , NomenclatureItem::pcoPlanetographicWest360 }, // Preliminary MESSENGER MESSENGER Team
541
        //{"Mimas"      , NomenclatureItem::pcoPlanetographicWest360 },
542
        {"Miranda"    , NomenclatureItem::pcoPlanetocentricEast360 },
×
543
        {"Moon"       , NomenclatureItem::pcoPlanetographicEast180 }, // LOLA 2011 ULCN 2005
×
544
        {"Oberon"     , NomenclatureItem::pcoPlanetocentricEast360 },
×
545
        //{"Phobos"     , NomenclatureItem::pcoPlanetographicWest360 },
546
        //{"Phoebe"     , NomenclatureItem::pcoPlanetographicWest360 },
547
        {"Pluto"      , NomenclatureItem::pcoPlanetocentricEast360 },
×
548
        //{"Proteus"    , NomenclatureItem::pcoPlanetographicWest360 },
549
        {"Puck"       , NomenclatureItem::pcoPlanetocentricEast360 },
×
550
        //{"Rhea"       , NomenclatureItem::pcoPlanetographicWest360 },
551
        //{"Tethys"     , NomenclatureItem::pcoPlanetographicWest360 },
552
        //{"Thebe"      , NomenclatureItem::pcoPlanetographicWest360 },
553
        //{"Titan"      , NomenclatureItem::pcoPlanetographicWest360 },
554
        {"Titania"    , NomenclatureItem::pcoPlanetocentricEast360 },
×
555
        {"Triton"     , NomenclatureItem::pcoPlanetographicEast360 },
×
556
        {"Umbriel"    , NomenclatureItem::pcoPlanetocentricEast360 },
×
557
        {"Venus"      , NomenclatureItem::pcoPlanetocentricEast360 }};
×
558
        return niPCOMap.value(planetName, NomenclatureItem::pcoPlanetographicWest360);
×
559
}
560

561
NomenclatureItem::PlanetCoordinateOrientation NomenclatureItem::getPlanetCoordinateOrientation() const
×
562
{
563
        return getPlanetCoordinateOrientation(planet->getEnglishName());
×
564
}
565

566
bool NomenclatureItem::isPlanetocentric(PlanetCoordinateOrientation pco)
×
567
{
568
        // Our data is already converted to be planetocentric.
569
        //return pco & 0x100;
570
        Q_UNUSED(pco)
571
        return true;
×
572
}
573
bool NomenclatureItem::isEastPositive(PlanetCoordinateOrientation pco)
×
574
{
575
        return pco & 0x010;
×
576
}
577
bool NomenclatureItem::is180(PlanetCoordinateOrientation pco)
×
578
{
579
        return pco & 0x001;
×
580
}
581
bool NomenclatureItem::isPlanetocentric() const
×
582
{
583
        // Our data is already converted to be planetocentric.
584
        // return isPlanetocentric(getPlanetCoordinateOrientation());
585
        return true;
×
586
}
587
bool NomenclatureItem::isEastPositive() const
×
588
{
589
        return isEastPositive(getPlanetCoordinateOrientation());
×
590
}
591
bool NomenclatureItem::is180() const
×
592
{
593
        return is180(getPlanetCoordinateOrientation());
×
594
}
595

596
void NomenclatureItem::createNameLists()
×
597
{
598
    niTypeStringMap = {
599
        { niSpecialPointPole, qc_("point", "special point") },
×
600
        { niSpecialPointEast, qc_("point", "special point") },
×
601
        { niSpecialPointWest, qc_("point", "special point") },
×
602
        { niSpecialPointCenter, qc_("point", "special point") },
×
603
        { niSpecialPointSubSolar, qc_("point", "special point") },
×
604
        // TRANSLATORS: Geographic area distinguished by amount of reflected light
605
        { niAlbedoFeature, qc_("albedo feature", "landform") },
×
606
        // TRANSLATORS: Arc-shaped feature
607
        { niArcus, qc_("arcus", "landform") },
×
608
        // TRANSLATORS: Radial-patterned features on Venus
609
        { niAstrum, qc_("astrum", "landform") },
×
610
        // TRANSLATORS: Chain of craters
611
        { niCatena, qc_("catena", "landform") },
×
612
        // TRANSLATORS: Hollows, irregular steep-sided depressions usually in arrays or clusters
613
        { niCavus, qc_("cavus", "landform") },
×
614
        // TRANSLATORS: Distinctive area of broken terrain
615
        { niChaos, qc_("chaos", "landform") },
×
616
        // TRANSLATORS: A deep, elongated, steep-sided depression
617
        { niChasma, qc_("chasma", "landform") },
×
618
        // TRANSLATORS: Small hills or knobs
619
        { niCollis, qc_("collis", "landform") },
×
620
        // TRANSLATORS: Ovoid-shaped feature
621
        { niCorona, qc_("corona", "landform") },
×
622
        // TRANSLATORS: A circular depression
623
        { niCrater, qc_("crater", "landform") },
×
624
        // TRANSLATORS: Ridge
625
        { niDorsum, qc_("dorsum", "landform") },
×
626
        // TRANSLATORS: Active volcanic centers on Io
627
        { niEruptiveCenter, qc_("eruptive center", "landform") },
×
628
        // TRANSLATORS: Bright spot
629
        { niFacula, qc_("facula", "landform") },
×
630
        // TRANSLATORS: Pancake-like structure, or a row of such structures
631
        { niFarrum, qc_("farrum", "landform") },
×
632
        // TRANSLATORS: A very low curvilinear ridge with a scalloped pattern
633
        { niFlexus, qc_("flexus", "landform") },
×
634
        // TRANSLATORS: Flow terrain
635
        { niFluctus, qc_("fluctus", "landform") },
×
636
        // TRANSLATORS: Channel on Titan that might carry liquid
637
        { niFlumen, qc_("flumen", "landform") },
×
638
        // TRANSLATORS: Strait, a narrow passage of liquid connecting two larger areas of liquid
639
        { niFretum, qc_("fretum", "landform") },
×
640
        // TRANSLATORS: Long, narrow depression
641
        { niFossa, qc_("fossa", "landform") },
×
642
        // TRANSLATORS: Island (islands), an isolated land area (or group of such areas) surrounded by, or nearly surrounded by, a liquid area (sea or lake)
643
        { niInsula, qc_("insula", "landform") },
×
644
        // TRANSLATORS: Landslide
645
        { niLabes, qc_("labes", "landform") },
×
646
        // TRANSLATORS: Complex of intersecting valleys or ridges
647
        { niLabyrinthus, qc_("labyrinthus", "landform") },
×
648
        // TRANSLATORS: Irregularly shaped depression on Titan having the appearance of a dry lake bed
649
        { niLacuna, qc_("lacuna", "landform") },
×
650
        // TRANSLATORS: "Lake" or small plain; on Titan, a "lake" or small, dark plain with discrete, sharp boundaries
651
        { niLacus, qc_("lacus", "landform") },
×
652
        // TRANSLATORS: Cryptic ringed feature
653
        { niLargeRingedFeature, qc_("large ringed feature", "landform") },
×
654
        // TRANSLATORS: Small dark spots on Europa
655
        { niLenticula, qc_("lenticula", "landform") },
×
656
        // TRANSLATORS: A dark or bright elongate marking, may be curved or straight
657
        { niLinea, qc_("linea", "landform") },
×
658
        // TRANSLATORS: Extension of plateau having rounded lobate or tongue-like boundaries
659
        { niLingula, qc_("lingula", "landform") },
×
660
        // TRANSLATORS: Dark spot, may be irregular
661
        { niMacula, qc_("macula", "landform") },
×
662
        // TRANSLATORS: "Sea"; on the Moon, low albedo, relatively smooth plain, generally of large extent; on Mars, dark albedo areas of no known geological significance; on Titan, large expanses of dark materials thought to be liquid hydrocarbons
663
        { niMare, qc_("mare", "landform") },
×
664
        // TRANSLATORS: A flat-topped prominence with cliff-like edges
665
        { niMensa, qc_("mensa", "landform") },
×
666
        // TRANSLATORS: Mountain
667
        { niMons, qc_("mons", "landform") },
×
668
        // TRANSLATORS: A very large dark area on the Moon
669
        { niOceanus, qc_("oceanus", "landform") },
×
670
        // TRANSLATORS: "Swamp"; small plain
671
        { niPalus, qc_("palus", "landform") },
×
672
        // TRANSLATORS: An irregular crater, or a complex one with scalloped edges
673
        { niPatera, qc_("patera", "landform") },
×
674
        // TRANSLATORS: Low plain
675
        { niPlanitia, qc_("planitia", "landform") },
×
676
        // TRANSLATORS: Plateau or high plain
677
        { niPlanum, qc_("planum", "landform") },
×
678
        // TRANSLATORS: Cryo-volcanic features on Triton
679
        { niPlume, qc_("plume", "landform") },
×
680
        // TRANSLATORS: "Cape"; headland promontoria
681
        { niPromontorium, qc_("promontorium", "landform") },
×
682
        // TRANSLATORS: A large area marked by reflectivity or color distinctions from adjacent areas, or a broad geographic region
683
        { niRegio, qc_("regio", "landform") },
×
684
        // TRANSLATORS: Reticular (netlike) pattern on Venus
685
        { niReticulum, qc_("reticulum", "landform") },
×
686
        // TRANSLATORS: Fissure
687
        { niRima, qc_("rima", "landform") },
×
688
        // TRANSLATORS: Scarp
689
        { niRupes, qc_("rupes", "landform") },
×
690
        // TRANSLATORS: A feature that shares the name of an associated feature.
691
        { niSatelliteFeature, qc_("satellite feature", "landform") },
×
692
        // TRANSLATORS: Boulder or rock
693
        { niSaxum, qc_("saxum", "landform") },
×
694
        // TRANSLATORS: Lobate or irregular scarp
695
        { niScopulus, qc_("scopulus", "landform") },
×
696
        // TRANSLATORS: Sinuous feature with segments of positive and negative relief along its length
697
        { niSerpens, qc_("serpens", "landform") },
×
698
        // TRANSLATORS: Subparallel furrows and ridges
699
        { niSulcus, qc_("sulcus", "landform") },
×
700
        // TRANSLATORS: "Bay"; small plain; on Titan, bays within seas or lakes of liquid hydrocarbons
701
        { niSinus, qc_("sinus", "landform") },
×
702
        // TRANSLATORS: Extensive land mass
703
        { niTerra, qc_("terra", "landform") },
×
704
        // TRANSLATORS: Tile-like, polygonal terrain
705
        { niTessera, qc_("tessera", "landform") },
×
706
        // TRANSLATORS: Small domical mountain or hill
707
        { niTholus, qc_("tholus", "landform") },
×
708
        // TRANSLATORS: Dunes
709
        { niUnda, qc_("unda", "landform") },
×
710
        // TRANSLATORS: Valley
711
        { niVallis, qc_("vallis", "landform") },
×
712
        // TRANSLATORS: Extensive plain
713
        { niVastitas, qc_("vastitas", "landform") },
×
714
        // TRANSLATORS: A streak or stripe of color
715
        { niVirga, qc_("virga", "landform") },
×
716
        // TRANSLATORS: Lunar features at or near Apollo landing sites
717
        { niLandingSite, qc_("landing site name", "landform") }};
×
718

719
        niTypeDescriptionMap = {
720
        // TRANSLATORS: Description for landform 'albedo feature'
721
        { niAlbedoFeature, q_("Geographic area distinguished by amount of reflected light.")},
×
722
        // TRANSLATORS: Description for landform 'arcus'
723
        { niArcus, q_("Arc-shaped feature.")},
×
724
        // TRANSLATORS: Description for landform 'astrum'
725
        { niAstrum, q_("Radial-patterned feature.")},
×
726
        // TRANSLATORS: Description for landform 'catena'
727
        { niCatena, q_("Chain of craters.")},
×
728
        // TRANSLATORS: Description for landform 'cavus'
729
        { niCavus, q_("Hollows, irregular steep-sided depressions usually in arrays or clusters.")},
×
730
        // TRANSLATORS: Description for landform 'chaos'
731
        { niChaos, q_("Distinctive area of broken terrain.")},
×
732
        // TRANSLATORS: Description for landform 'chasma'
733
        { niChasma, q_("A deep, elongated, steep-sided depression.")},
×
734
        // TRANSLATORS: Description for landform 'collis'
735
        { niCollis, q_("Small hills or knobs.")},
×
736
        // TRANSLATORS: Description for landform 'corona'
737
        { niCorona, q_("Ovoid-shaped feature.")},
×
738
        // TRANSLATORS: Description for landform 'crater'
739
        { niCrater, q_("A circular depression.")},
×
740
        // TRANSLATORS: Description for landform 'dorsum'
741
        { niDorsum, q_("Ridge.")},
×
742
        // TRANSLATORS: Description for landform 'eruptive center'
743
        { niEruptiveCenter, q_("Active volcanic center.")},
×
744
        // TRANSLATORS: Description for landform 'facula'
745
        { niFacula, q_("Bright spot.")},
×
746
        // TRANSLATORS: Description for landform 'farrum'
747
        { niFarrum, q_("Pancake-like structure, or a row of such structures.")},
×
748
        // TRANSLATORS: Description for landform 'flexus'
749
        { niFlexus, q_("A very low curvilinear ridge with a scalloped pattern.")},
×
750
        // TRANSLATORS: Description for landform 'fluctus'
751
        { niFluctus, q_("Flow terrain.")},
×
752
        // TRANSLATORS: Description for landform 'flumen'
753
        { niFlumen, q_("Channel, that might carry liquid.")},
×
754
        // TRANSLATORS: Description for landform 'fretum'
755
        { niFretum, q_("Strait, a narrow passage of liquid connecting two larger areas of liquid.")},
×
756
        // TRANSLATORS: Description for landform 'fossa'
757
        { niFossa, q_("Long, narrow depression.")},
×
758
        // TRANSLATORS: Description for landform 'insula'
759
        { niInsula, q_("Island, an isolated land area surrounded by, or nearly surrounded by, a liquid area (sea or lake).")},
×
760
        // TRANSLATORS: Description for landform 'labes'
761
        { niLabes, q_("Landslide.")},
×
762
        // TRANSLATORS: Description for landform 'labyrinthus'
763
        { niLabyrinthus, q_("Complex of intersecting valleys or ridges.")},
×
764
        // TRANSLATORS: Description for landform 'lacuna'
765
        { niLacuna, q_("Irregularly shaped depression, having the appearance of a dry lake bed.")},
×
766
        // TRANSLATORS: Description for landform 'lacus'
767
        { niLacus, q_("'Lake' or small plain.")},
×
768
        // TRANSLATORS: Description for landform 'large ringed feature'
769
        { niLargeRingedFeature, q_("Cryptic ringed feature.")},
×
770
        // TRANSLATORS: Description for landform 'lenticula'
771
        { niLenticula, q_("Small dark spot.")},
×
772
        // TRANSLATORS: Description for landform 'linea'
773
        { niLinea, q_("A dark or bright elongate marking, may be curved or straight.")},
×
774
        // TRANSLATORS: Description for landform 'lingula'
775
        { niLingula, q_("Extension of plateau having rounded lobate or tongue-like boundaries.")},
×
776
        // TRANSLATORS: Description for landform 'macula'
777
        { niMacula, q_("Dark spot, may be irregular")},
×
778
        // TRANSLATORS: Description for landform 'mare' on the Moon
779
        { niMare, q_("'Sea'; low albedo, relatively smooth plain, generally of large extent.")},
×
780
        // TRANSLATORS: Description for landform 'mensa'
781
        { niMensa, q_("A flat-topped prominence with cliff-like edges.")},
×
782
        // TRANSLATORS: Description for landform 'mons'
783
        { niMons, q_("Mountain.")},
×
784
        // TRANSLATORS: Description for landform 'oceanus'
785
        { niOceanus, q_("A very large dark area.")},
×
786
        // TRANSLATORS: Description for landform 'palus'
787
        { niPalus, q_("'Swamp'; small plain.")},
×
788
        // TRANSLATORS: Description for landform 'patera'
789
        { niPatera, q_("An irregular crater, or a complex one with scalloped edges.")},
×
790
        // TRANSLATORS: Description for landform 'planitia'
791
        { niPlanitia, q_("Low plain.")},
×
792
        // TRANSLATORS: Description for landform 'planum'
793
        { niPlanum, q_("Plateau or high plain.")},
×
794
        // TRANSLATORS: Description for landform 'plume'
795
        { niPlume, q_("Cryo-volcanic feature.")},
×
796
        // TRANSLATORS: Description for landform 'promontorium'
797
        { niPromontorium, q_("'Cape'; headland promontoria.")},
×
798
        // TRANSLATORS: Description for landform 'regio'
799
        { niRegio, q_("A large area marked by reflectivity or color distinctions from adjacent areas, or a broad geographic region.")},
×
800
        // TRANSLATORS: Description for landform 'reticulum'
801
        { niReticulum, q_("Reticular (netlike) pattern.")},
×
802
        // TRANSLATORS: Description for landform 'rima'
803
        { niRima, q_("Fissure.")},
×
804
        // TRANSLATORS: Description for landform 'rupes'
805
        { niRupes, q_("Scarp.")},
×
806
        // TRANSLATORS: Description for landform 'satellite feature'
807
        { niSatelliteFeature, q_("A feature that shares the name of an associated feature.")},
×
808
        // TRANSLATORS: Description for landform 'saxum'
809
        { niSaxum, q_("Boulder or rock.")},
×
810
        // TRANSLATORS: Description for landform 'scopulus'
811
        { niScopulus, q_("Lobate or irregular scarp.")},
×
812
        // TRANSLATORS: Description for landform 'serpens'
813
        { niSerpens, q_("Sinuous feature with segments of positive and negative relief along its length.")},
×
814
        // TRANSLATORS: Description for landform 'sinus'
815
        { niSinus, q_("'Bay'; small plain.")},
×
816
        // TRANSLATORS: Description for landform 'sulcus'
817
        { niSulcus, q_("Subparallel furrows and ridges.")},
×
818
        // TRANSLATORS: Description for landform 'terra'
819
        { niTerra, q_("Extensive land mass.")},
×
820
        // TRANSLATORS: Description for landform 'tessera'
821
        { niTessera, q_("Tile-like, polygonal terrain.")},
×
822
        // TRANSLATORS: Description for landform 'tholus'
823
        { niTholus, q_("Small domical mountain or hill.")},
×
824
        // TRANSLATORS: Description for landform 'unda'
825
        { niUnda, q_("Dunes.")},
×
826
        // TRANSLATORS: Description for landform 'vallis'
827
        { niVallis, q_("Valley.")},
×
828
        // TRANSLATORS: Description for landform 'vastitas'
829
        { niVastitas, q_("Extensive plain.")},
×
830
        // TRANSLATORS: Description for landform 'virga'
831
        { niVirga, q_("A streak or stripe of color.")},
×
832
        { niLandingSite, ""},
×
833
        { niSpecialPointPole, ""},
×
834
        { niSpecialPointEast, ""},
×
835
        { niSpecialPointWest, ""},
×
836
        { niSpecialPointCenter, ""},
×
837
        { niSpecialPointSubSolar, ""}};
×
838
}
×
839

840
// Compute times of nearest rise, transit and set of the current Planet.
841
// @param core the currently active StelCore object
842
// @param altitude (optional; default=0) altitude of the object, degrees.
843
//        Setting this to -6. for the Sun will find begin and end for civil twilight.
844
// @return Vec4d - time of rise, transit and set closest to current time; JD.
845
// @note The fourth element flags particular conditions:
846
//       *  +100. for circumpolar objects. Rise and set give lower culmination times.
847
//       *  -100. for objects never rising. Rise and set give transit times.
848
//       * -1000. is used as "invalid" value. The result should then not be used.
849
Vec4d NomenclatureItem::getRTSTime(const StelCore* core, const double altitude) const
×
850
{
851
        return planet->getRTSTime(core, altitude);
×
852
}
853

854
bool NomenclatureItem::forceItems;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc