20 #ifndef _SATELLITE_HPP_
21 #define _SATELLITE_HPP_ 1
26 #include <QSharedPointer>
28 #include <QStringList>
31 #include "StelObject.hpp"
35 #include "gSatWrapper.hpp"
49 enum SatelliteDataRole {
50 SatIdRole = Qt::UserRole,
59 typedef QSet<QString> GroupSet;
66 SatNotDisplayed = 0x2,
72 typedef QFlags<SatFlag> SatFlags;
73 Q_DECLARE_OPERATORS_FOR_FLAGS(SatFlags)
76 Q_DECLARE_METATYPE(GroupSet)
77 Q_DECLARE_METATYPE(SatFlags)
96 Satellite(
const QString& identifier,
const QVariantMap& data);
101 QVariantMap getMap(
void);
103 virtual QString getType(
void)
const
107 virtual float getSelectPriority(
const StelCore* core)
const;
117 virtual QString getInfoString(
const StelCore *core,
const InfoStringGroup& flags)
const;
118 virtual Vec3f getInfoColor(
void)
const;
120 virtual float getVMagnitude(
const StelCore* core=NULL,
bool withExtinction=
false)
const;
121 virtual double getAngularSize(
const StelCore* core)
const;
122 virtual QString getNameI18n(
void)
const
126 virtual QString getEnglishName(
void)
const
131 QString getCatalogNumberString()
const {
return id;}
135 void setNewTleElements(
const QString& tle1,
const QString& tle2);
138 void update(
double deltaTime);
140 double getDoppler(
double freq)
const;
141 static float showLabels;
142 static double roundToDp(
float n,
int dp);
145 void recalculateOrbitLines(
void);
147 void setNew() {newlyAdded =
true;}
148 bool isNew()
const {
return newlyAdded;}
153 void setFlags(
const SatFlags& flags);
157 void parseInternationalDesignator(
const QString& tle1);
161 bool operator<(
const Satellite& another)
const;
165 void computeOrbitPoints();
169 float calculateOrbitSegmentIntensity(
int segNum);
170 void setNightColors(
bool night);
198 QString internationalDesignator;
203 double jdLaunchYearJan1;
206 QPair< QByteArray, QByteArray > tleElements;
207 double height, range, rangeRate;
208 QList<CommLink> comms;
213 QDateTime lastUpdated;
216 static float hintBrightness;
217 static float hintScale;
218 static int orbitLineSegments;
219 static int orbitLineFadeSegments;
220 static int orbitLineSegmentDuration;
221 static bool orbitLinesFlag;
232 Vec3d latLongSubPointPosition;
238 Vec3f orbitColorNormal;
239 Vec3f orbitColorNight;
241 double lastEpochCompForOrbit;
243 QList<Vec3d> orbitPoints;
246 typedef QSharedPointer<Satellite> SatelliteP;
247 bool operator<(
const SatelliteP& left,
const SatelliteP& right);
249 #endif // _SATELLITE_HPP_