Stellarium
0.20.4
|
Data Structures | |
class | gTimeSpan |
class | gSatWrapper |
Wrapper allowing compatibility between gsat and Stellarium/Qt. More... | |
class | SatellitesDialog |
Main configuration window of the Satellites plugin. More... | |
class | SatellitesImportDialog |
struct | CommLink |
Radio communication channel properties. More... | |
struct | TleData |
Data structure containing unvalidated TLE set as read from a TLE list file. More... | |
struct | TleSource |
TLE update source, used only internally for now. More... | |
class | SatellitesListFilterModel |
Custom proxy model allowing filtering by satellite group and flag. More... | |
class | SatellitesListModel |
A model encapsulating a satellite list. More... | |
class | gSatTEME |
Sat position and velocity predictions over TEME reference system. More... | |
class | Satellite |
A representation of a satellite in Earth orbit. More... | |
class | Satellites |
Main class of the Satellites plugin. More... | |
Typedefs | |
typedef QSet< QString > | GroupSet |
Type for sets of satellite group IDs. | |
typedef QList< TleData > | TleDataList |
typedef QHash< QString, TleData > | TleDataHash |
typedef QList< TleSource > | TleSourceList |
Enumerations | |
enum | SatelliteDataRole { SatIdRole = Qt::UserRole, SatCosparIDRole, SatDescriptionRole, SatStdMagnitudeRole, SatRCSRole, SatTLEEpochRole, SatFlagsRole, SatGroupsRole, FirstLineRole, SecondLineRole } |
Description of the data roles used in SatellitesListModel. | |
enum | SatFlag { SatNoFlags = 0x0000, SatDisplayed = 0x0001, SatNotDisplayed = 0x0002, SatUser = 0x0004, SatOrbit = 0x0008, SatNew = 0x0010, SatError = 0x0020, SatSmallSize = 0x0040, SatMediumSize = 0x0080, SatLargeSize = 0x0100, SatLEO = 0x0200, SatMEO = 0x0400, SatGSO = 0x0800, SatHEO = 0x1000, SatHGSO = 0x2000 } |
Flag type reflecting internal flags of Satellite. | |
Functions | |
double | AcTan (double sinx, double cosx) |
Four-quadrant arctan function. | |
double | Sqr (double arg) |
Returns square of a double. | |
The Satellites plugin displays the positions of artificial satellites in Earth orbit based on a catalog of orbital data.
The Satellites class is the main class of the plug-in. It manages a collection of Satellite objects and takes care of loading, saving and updating the satellite catalog. It allows automatic updates from online sources and manages a list of update file URLs.
To calculate satellite positions, the plugin uses an implementation of the SGP4/SDP4 algorithms (J.L. Canales' gsat library).
Satellite Properties
Name and identifiers
Each satellite has a name. It's displayed as a label of the satellite hint and in the list of satellites. Names are not unique though, so they are used only for presentation purposes.
In the Satellite Catalog satellites are uniquely identified by their NORAD number, which is encoded in TLEs.
Grouping
A satellite can belong to one or more groups such as "amateur", "geostationary" or "navigation". They have no other function but to help the user organize the satellite collection.
Group names are arbitrary strings defined in the Satellite Catalog for each satellite and are more similar to the concept of "tags" than a hierarchical grouping. A satellite may not belong to any group at all.
By convention, group names are in lowercase. The GUI translates some of the groups used in the default catalog.
Satellite Catalog
The satellite catalog is stored on the disk in JSON format, in a file named "satellites.json". A default copy is embedded in the plug-in at compile time. A working copy is kept in the user data directory.
Configuration
The plug-ins' configuration data is stored in Stellarium's main configuration file.
class gTimeSpan |
Public Member Functions | |
gTimeSpan (double timeSpanSrc=0) | |
gTimeSpan (long lDays, int nHours, int nMins, double nSecs) | |
gTimeSpan (const gTimeSpan &timeSpanSrc) | |
const gTimeSpan & | operator= (const gTimeSpan &timeSpanSrc) |
const gTimeSpan & | operator= (const double &timeSpanSrc) |
long | getDays () const |
Operation: getDays() This method returns the integer days number stored in the gTimeSpan object. More... | |
int | getHours () const |
Operation: getHours() This method returns the integer hours number stored in the gTimeSpan object. More... | |
int | getMinutes () const |
Operation: getMinutes() This method returns the integer Minutes number stored in the gTimeSpan object. More... | |
int | getSeconds () const |
Operation: getSeconds() This method returns the integer seconds number stored in the gTimeSpan object. More... | |
double | getDblSeconds () const |
Operation: getDblSeconds() This method returns the total seconds number stored in the gTimeSpan object. More... | |
double | getDblDays () const |
Operation: getDblDays() This method returns the total days number stored in the gTimeSpan object. More... | |
gTimeSpan | operator- (gTimeSpan timeSpan) const |
gTimeSpan | operator+ (gTimeSpan timeSpan) const |
const gTimeSpan & | operator+= (gTimeSpan timeSpan) |
const gTimeSpan & | operator-= (gTimeSpan timeSpan) |
bool | operator== (gTimeSpan timeSpan) const |
bool | operator!= (gTimeSpan timeSpan) const |
bool | operator< (gTimeSpan timeSpan) const |
bool | operator> (gTimeSpan timeSpan) const |
bool | operator<= (gTimeSpan timeSpan) const |
bool | operator>= (gTimeSpan timeSpan) const |
long gTimeSpan::getDays | ( | ) | const |
double gTimeSpan::getDblDays | ( | ) | const |
double gTimeSpan::getDblSeconds | ( | ) | const |
int gTimeSpan::getHours | ( | ) | const |
int gTimeSpan::getMinutes | ( | ) | const |
int gTimeSpan::getSeconds | ( | ) | const |
class gSatWrapper |
Public Types | |
enum | Visibility { UNKNOWN =0, RADAR_SUN =1, VISIBLE =2, RADAR_NIGHT =3, NOT_VISIBLE =4 } |
Public Member Functions | |
gSatWrapper (QString designation, QString tle1, QString tle2) | |
void | setEpoch (double ai_julianDaysEpoch) |
This operation update Epoch timestamp for gSatTEME object from Stellarium Julian Date. More... | |
Vec3d | getTEMEPos () const |
This operation isolate gSatTEME getPos operation. More... | |
Vec3d | getTEMEVel () const |
This operation isolate gSatTEME getVel operation. More... | |
Vec3d | getSubPoint () const |
This operation isolate getSubPoint method of gSatTEME object. More... | |
Vec3d | getAltAz () const |
This operation compute the coordinates in StelCore::FrameAltAz. More... | |
void | getSlantRange (double &ao_slantRange, double &ao_slantRangeRate) const |
This operation compute the slant range (distance between the satellite and the observer) and its variation/seg. More... | |
Visibility | getVisibilityPredict () const |
This operation predicts the satellite visibility contidions. More... | |
double | getPhaseAngle () const |
double | getOrbitalPeriod () const |
Get orbital period in minutes. | |
double | getOrbitalInclination () const |
Get orbital inclination in degrees. | |
Vec2d | getPerigeeApogeeAltitudes () const |
Get perigee/apogee altitudes in kilometers for equatorial radius of Earth. | |
Static Public Member Functions | |
static Vec3d | getSunECIPos () |
Get Sun positions in ECI system. More... | |
static gTime | getEpoch () |
static void | calcObserverECIPosition (Vec3d &ao_position, Vec3d &ao_vel) |
This operation computes the observer ECI coordinates in Geocentric Equatorial Coordinate System (IJK) for the ai_epoch time. More... | |
This position can be asumed as observer position in TEME framework without an appreciable error. ECI axis (IJK) are parallel to StelCore::EquinoxEQ Framework but centered in the earth centre instead the observer position.
[out] | ao_position | Observer ECI position vector measured in Km |
[out] | ao_vel | Observer ECI velocity vector measured in Km/s |
Vec3d gSatWrapper::getAltAz | ( | ) | const |
void gSatWrapper::getSlantRange | ( | double & | ao_slantRange, |
double & | ao_slantRangeRate | ||
) | const |
&ao_slantRange | Reference to a output variable where the method store the slant range measured in Km |
&ao_slantRangeRate | Reference to a output variable where the method store the slant range variation in Km/s |
Vec3d gSatWrapper::getSubPoint | ( | ) | const |
|
static |
Vec3d gSatWrapper::getTEMEPos | ( | ) | const |
Vec3d gSatWrapper::getTEMEVel | ( | ) | const |
Visibility gSatWrapper::getVisibilityPredict | ( | ) | const |
This prediction can return 4 different states RADAR_SUN when satellite and observer are in the sunlight VISIBLE when satellite is in sunlight and observer is in the dark. Satellite could be visible in the sky. RADAR_NIGHT when satellite is eclipsed by the earth shadow. NOT_VISIBLE The satellite is under the observer horizon
void gSatWrapper::setEpoch | ( | double | ai_julianDaysEpoch | ) |
class SatellitesDialog |
Public Slots | |
void | retranslate () |
Public Slots inherited from StelDialog | |
virtual void | retranslate ()=0 |
Retranslate the content of the dialog. More... | |
virtual void | setVisible (bool) |
On the first call with "true" populates the window contents. | |
virtual void | close () |
Closes the window (the window widget is not deleted, just not visible). | |
void | handleMovedTo (QPoint newPos) |
Adds dialog location to config.ini; should be connected in createDialogContent() | |
virtual void | handleDialogSizeChanged (QSizeF size) |
Stores dialog sizes into config.ini; should be connected from the proxy. More... | |
QString | getDialogName () const |
Protected Member Functions | |
void | createDialogContent () |
Initialize the dialog widgets and connect the signals/slots. | |
Protected Member Functions inherited from StelDialog | |
void | connectColorButton (QToolButton *button, QString propertyName, QString iniName, QString moduleName="") |
Prepare a QToolButton so that it can receive and handle askColor() connections properly. More... | |
bool | askConfirmation () |
Additional Inherited Members | |
Signals inherited from StelDialog | |
void | visibleChanged (bool) |
Public Member Functions inherited from StelDialog | |
StelDialog (QString dialogName="Default", QObject *parent=Q_NULLPTR) | |
virtual void | styleChanged () |
Notify that the application style changed. | |
bool | visible () const |
Returns true if the dialog contents have been constructed and are currently shown. | |
Protected Slots inherited from StelDialog | |
void | askColor () |
To be called by a connected QToolButton with a color background. More... | |
void | enableKineticScrolling (bool b) |
enable kinetic scrolling. This should be connected to StelApp's StelGui signal flagUseKineticScrollingChanged. | |
void | handleFontChanged () |
connect from StelApp to handle font and font size changes. | |
Static Protected Member Functions inherited from StelDialog | |
static void | connectCheckBox (QAbstractButton *checkBox, const QString &actionName) |
Helper function to connect a checkbox to the StelAction with the specified name. | |
static void | connectCheckBox (QAbstractButton *checkBox, StelAction *action) |
Helper function to connect a checkbox to the given StelAction. | |
static void | connectIntProperty (QLineEdit *lineEdit, const QString &propName) |
Helper function to connect a QLineEdit to an integer StelProperty. More... | |
static void | connectIntProperty (QSpinBox *spinBox, const QString &propName) |
Helper function to connect a QSpinBox to an integer StelProperty. More... | |
static void | connectIntProperty (QComboBox *comboBox, const QString &propName) |
Helper function to connect a QComboBox to an integer StelProperty. More... | |
static void | connectIntProperty (QSlider *slider, const QString &propName, int minValue, int maxValue) |
Helper function to connect a QSlider to an double or float StelProperty. More... | |
static void | connectDoubleProperty (QDoubleSpinBox *spinBox, const QString &propName) |
Helper function to connect a QDoubleSpinBox to an double or float StelProperty. More... | |
static void | connectDoubleProperty (QSlider *slider, const QString &propName, double minValue, double maxValue) |
Helper function to connect a QSlider to an double or float StelProperty. More... | |
static void | connectStringProperty (QComboBox *comboBox, const QString &propName) |
Helper function to connect a QComboBox to an QString StelProperty. More... | |
static void | connectBoolProperty (QAbstractButton *checkBox, const QString &propName) |
Helper function to connect a checkbox to a bool StelProperty. More... | |
static void | connectBoolProperty (QGroupBox *checkBox, const QString &propName) |
Helper function to connect a groupbox to a bool StelProperty. More... | |
Protected Attributes inherited from StelDialog | |
QWidget * | dialog |
The main dialog. | |
class CustomProxy * | proxy |
QString | dialogName |
The name should be set in derived classes' constructors and can be used to store and retrieve the panel locations. | |
QList< QWidget * > | kineticScrollingList |
A list of widgets where kinetic scrolling can be activated or deactivated The list must be filled once, in the constructor or init() of fillDialog() etc. More... | |
Properties inherited from StelDialog | |
bool | visible |
class SatellitesImportDialog |
Public Slots | |
void | retranslate () |
void | setVisible (bool visible=true) |
Public Slots inherited from StelDialog | |
virtual void | retranslate ()=0 |
Retranslate the content of the dialog. More... | |
virtual void | setVisible (bool) |
On the first call with "true" populates the window contents. | |
virtual void | close () |
Closes the window (the window widget is not deleted, just not visible). | |
void | handleMovedTo (QPoint newPos) |
Adds dialog location to config.ini; should be connected in createDialogContent() | |
virtual void | handleDialogSizeChanged (QSizeF size) |
Stores dialog sizes into config.ini; should be connected from the proxy. More... | |
QString | getDialogName () const |
Signals | |
void | satellitesAccepted (const TleDataList &newSatellites) |
Signals inherited from StelDialog | |
void | visibleChanged (bool) |
Additional Inherited Members | |
Public Member Functions inherited from StelDialog | |
StelDialog (QString dialogName="Default", QObject *parent=Q_NULLPTR) | |
virtual void | styleChanged () |
Notify that the application style changed. | |
bool | visible () const |
Returns true if the dialog contents have been constructed and are currently shown. | |
Protected Slots inherited from StelDialog | |
void | askColor () |
To be called by a connected QToolButton with a color background. More... | |
void | enableKineticScrolling (bool b) |
enable kinetic scrolling. This should be connected to StelApp's StelGui signal flagUseKineticScrollingChanged. | |
void | handleFontChanged () |
connect from StelApp to handle font and font size changes. | |
Protected Member Functions inherited from StelDialog | |
void | connectColorButton (QToolButton *button, QString propertyName, QString iniName, QString moduleName="") |
Prepare a QToolButton so that it can receive and handle askColor() connections properly. More... | |
bool | askConfirmation () |
Static Protected Member Functions inherited from StelDialog | |
static void | connectCheckBox (QAbstractButton *checkBox, const QString &actionName) |
Helper function to connect a checkbox to the StelAction with the specified name. | |
static void | connectCheckBox (QAbstractButton *checkBox, StelAction *action) |
Helper function to connect a checkbox to the given StelAction. | |
static void | connectIntProperty (QLineEdit *lineEdit, const QString &propName) |
Helper function to connect a QLineEdit to an integer StelProperty. More... | |
static void | connectIntProperty (QSpinBox *spinBox, const QString &propName) |
Helper function to connect a QSpinBox to an integer StelProperty. More... | |
static void | connectIntProperty (QComboBox *comboBox, const QString &propName) |
Helper function to connect a QComboBox to an integer StelProperty. More... | |
static void | connectIntProperty (QSlider *slider, const QString &propName, int minValue, int maxValue) |
Helper function to connect a QSlider to an double or float StelProperty. More... | |
static void | connectDoubleProperty (QDoubleSpinBox *spinBox, const QString &propName) |
Helper function to connect a QDoubleSpinBox to an double or float StelProperty. More... | |
static void | connectDoubleProperty (QSlider *slider, const QString &propName, double minValue, double maxValue) |
Helper function to connect a QSlider to an double or float StelProperty. More... | |
static void | connectStringProperty (QComboBox *comboBox, const QString &propName) |
Helper function to connect a QComboBox to an QString StelProperty. More... | |
static void | connectBoolProperty (QAbstractButton *checkBox, const QString &propName) |
Helper function to connect a checkbox to a bool StelProperty. More... | |
static void | connectBoolProperty (QGroupBox *checkBox, const QString &propName) |
Helper function to connect a groupbox to a bool StelProperty. More... | |
Protected Attributes inherited from StelDialog | |
QWidget * | dialog |
The main dialog. | |
class CustomProxy * | proxy |
QString | dialogName |
The name should be set in derived classes' constructors and can be used to store and retrieve the panel locations. | |
QList< QWidget * > | kineticScrollingList |
A list of widgets where kinetic scrolling can be activated or deactivated The list must be filled once, in the constructor or init() of fillDialog() etc. More... | |
Properties inherited from StelDialog | |
bool | visible |
struct CommLink |
struct TleData |
struct TleSource |
class SatellitesListFilterModel |
Public Member Functions | |
SatellitesListFilterModel (QObject *parent=Q_NULLPTR) | |
SatFlag | getFilterFlag () const |
void | setFilterFlag (const SatFlag &flag) |
QString | getFilterGroup () const |
void | setFilterGroup (const QString &groupId) |
void | setSecondaryFilters (const QString &groupId, const SatFlag &flag) |
Protected Member Functions | |
bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const |
Reimplementation of the filtering method. | |
Properties | |
SatFlag | filterFlag |
Only satellites with this flag raised will be returned. More... | |
QString | filterGroup |
Only satellites belonging to this group will be returned. More... | |
|
readwrite |
Use Satellite::NoFlags for no filtering. Setting the flag with setFilterFlag() or setSecondaryFilters() will cause the model to be re-filtered.
|
readwrite |
Use an empty group ID for no filtering. Setting the group with setFilterGroup() or setSecondaryFilters() will cause the model to be re-filtered.
class SatellitesListModel |
Used for GUI presentation purposes.
It can show satellite names in their hint colors. This behavior can be toggled with enableColoredNames(), e.g. to honor night mode.
Public Slots | |
void | beginSatellitesChange () |
Tell the model that its internal data structure is about to be modified. More... | |
void | endSatellitesChange () |
Tell the model that its internal data has been modified. More... | |
void | enableColoredNames (bool enable=true) |
Public Member Functions | |
SatellitesListModel (QList< SatelliteP > *satellites, QObject *parent=Q_NULLPTR) | |
void | setSatelliteList (QList< SatelliteP > *satellites) |
Reimplemented model handling methods. | |
Qt::ItemFlags | flags (const QModelIndex &index) const |
QVariant | data (const QModelIndex &index, int role) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role) |
int | rowCount (const QModelIndex &parent) const |
int | columnCount (const QModelIndex &parent) const |
|
slot |
This should be called every time when the underlying data structure is about to be modified outside the model! (That is, when satellites are about to be added or removed.) Otherwise views that use this model won't work correctly.
|
slot |
Don't call this without calling beginSatellitesChange() first! This should be called every time when the underlying data structure has been modified outside the model! (That is, when satellites have been added or removed.) Otherwise views that use this model won't work correctly.
class gSatTEME |
Class to abstract all the SGP4 complexity. It implementation wrap whit an object oriented class the revised David. A. Vallado code for SGP4 Calculation. (Spacetrack report #6 revised AIAA-2006-6753-rev1)
Public Member Functions | |
gSatTEME (const char *pstrName, char *pstrTleLine1, char *pstrTleLine2) | |
Default class gSatTEME constructor. More... | |
void | setEpoch (gTime ai_time) |
Set compute epoch for prediction. More... | |
void | setEpoch (double ai_time) |
Set compute epoch for prediction. More... | |
void | setMinSinceKepEpoch (double ai_minSinceKepEpoch) |
Set compute epoch for prediction in minutes since Keplerian data Epoch. More... | |
const Vec3d & | getPos () const |
Get the TEME satellite position Vector. More... | |
const Vec3d & | getVel () const |
Get the TEME satellite Velocity Vector. More... | |
const Vec3d & | getSubPoint () const |
Get the Geographic satellite subpoint Vector calculated by the method compute SubPoint. More... | |
int | getErrorCode () const |
double | getPeriod () const |
double | getInclination () const |
Vec2d | getPerigeeApogee () const |
gSatTEME::gSatTEME | ( | const char * | pstrName, |
char * | pstrTleLine1, | ||
char * | pstrTleLine2 | ||
) |
[in] | pstrName | Pointer to a null end string with the Sat. Name |
[in] | pstrTleLine1 | Pointer to a null end string with the first TLE Kep. data line |
[in] | pstrTleLine2 | Pointer to a null end string with the second TLE Kep. data line |
|
inline |
|
inline |
To implement this operation, next references has been used: Orbital Coordinate Systems, Part III By Dr. T.S. Kelso http://www.celestrak.com/columns/v02n03/
|
inline |
void gSatTEME::setEpoch | ( | gTime | ai_time | ) |
[in] | ai_time | gTime object storing the compute epoch time. |
|
inline |
[in] | ai_time | double variable storing the compute epoch time in Julian Days. |
void gSatTEME::setMinSinceKepEpoch | ( | double | ai_minSinceKepEpoch | ) |
[in] | ai_minSinceKepEpoch | Time since Keplerian Epoch measured in minutes and fraction of minutes. |
class Satellite |
Details about the satellite are passed with a JSON-representation structure that contains a Satellite Catalog entry.
Thanks to operator<() overloading, container classes (QList, QMap, etc.) with Satellite or SatelliteP objects can be sorted by satellite name/ID.
Public Types | |
enum | OptStatus { StatusOperational = 1, StatusNonoperational = 2, StatusPartiallyOperational = 3, StatusStandby = 4, StatusSpare = 5, StatusExtendedMission = 6, StatusDecayed = 7, StatusUnknown = 0 } |
operational statuses | |
Public Types inherited from StelObject | |
enum | InfoStringGroupFlags { None = 0x00000000, Name = 0x00000001, CatalogNumber = 0x00000002, Magnitude = 0x00000004, RaDecJ2000 = 0x00000008, RaDecOfDate = 0x00000010, AltAzi = 0x00000020, Distance = 0x00000040, Elongation = 0x00000080, Size = 0x00000100, Velocity = 0x00000200, ProperMotion = 0x00000400, Extra = 0x00000800, HourAngle = 0x00001000, AbsoluteMagnitude = 0x00002000, GalacticCoord = 0x00004000, SupergalacticCoord = 0x00008000, OtherCoord = 0x00010000, ObjectType = 0x00020000, EclipticCoordJ2000 = 0x00040000, EclipticCoordOfDate = 0x00080000, IAUConstellation = 0x00100000, SiderealTime = 0x00200000, RTSTime = 0x00400000, Script = 0x00800000, DebugAid = 0x01000000, NoFont = 0x02000000, PlainText = 0x04000000 } |
Used as named bitfield flags as specifiers to filter results of getInfoString. More... | |
Public Member Functions | |
Satellite (const QString &identifier, const QVariantMap &data) | |
QVariantMap | getMap (void) |
Get a QVariantMap which describes the satellite. More... | |
virtual QString | getType (void) const |
Return object's type. It should be the name of the class. | |
virtual QString | getID (void) const |
Returns a unique identifier for this object. More... | |
virtual float | getSelectPriority (const StelCore *core) const |
Return a priority value which is used to discriminate objects by priority As for magnitudes, the lower is the higher priority. | |
virtual QString | getInfoString (const StelCore *core, const InfoStringGroup &flags) const |
Get an HTML string to describe the object. More... | |
virtual QVariantMap | getInfoMap (const StelCore *core) const |
Return a map like StelObject::getInfoMap(), but with a few extra tags also available in getInfoString(). More... | |
virtual Vec3f | getInfoColor (void) const |
Get a color used to display info about the object. | |
virtual Vec3d | getJ2000EquatorialPos (const StelCore *) const |
Get observer-centered equatorial coordinates at equinox J2000. | |
virtual float | getVMagnitude (const StelCore *core) const |
Return object's apparent V magnitude as seen from observer, without including extinction. | |
virtual double | getAngularSize (const StelCore *) const |
Get angular size, degrees. | |
virtual QString | getNameI18n (void) const |
Return translated object's name. | |
virtual QString | getEnglishName (void) const |
Return object's name in english. | |
QString | getCatalogNumberString () const |
Returns the (NORAD) catalog number. (For now, the ID string.) | |
void | setNewTleElements (const QString &tle1, const QString &tle2) |
Set new tleElements. More... | |
void | update (double deltaTime) |
double | getDoppler (double freq) const |
void | recalculateOrbitLines (void) |
void | setNew () |
bool | isNew () const |
SatFlags | getFlags () const |
Get internal flags as a single value. | |
void | setFlags (const SatFlags &flags) |
Sets the internal flags in one operation (only display flags)! | |
bool | operator< (const Satellite &another) const |
Needed for sorting lists (if this ever happens...). More... | |
float | calculateIlluminatedFraction () const |
Calculation of illuminated fraction of the satellite. | |
QString | getOperationalStatus () const |
Get operational status of satellite. | |
void | recomputeEpochTLE () |
Public Member Functions inherited from StelObject | |
virtual SphericalRegionP | getRegion () const |
Default implementation of the getRegion method. More... | |
virtual Vec3d | getPointInRegion () const |
Default implementation of the getPointInRegion method. More... | |
Vec3d | getEquinoxEquatorialPos (const StelCore *core) const |
Get observer-centered equatorial coordinate at the current equinox The frame has its Z axis at the planet's current rotation axis At time 2000-01-01 this frame is almost the same as J2000, but ONLY if the observer is on earth. | |
Vec3d | getEquinoxEquatorialPosApparent (const StelCore *core) const |
Like getEquinoxEquatorialPos(core), but always adds refraction correction to the position. | |
Vec3d | getEquinoxEquatorialPosAuto (const StelCore *core) const |
Like getEquinoxEquatorialPos(core), but adds refraction correction to the position if atmosphere is active. | |
Vec3d | getGalacticPos (const StelCore *core) const |
Get observer-centered galactic coordinates. | |
Vec3d | getSupergalacticPos (const StelCore *core) const |
Get observer-centered supergalactic coordinates. | |
Vec3d | getSiderealPosGeometric (const StelCore *core) const |
Get observer-centered hour angle + declination (at current equinox) It is the geometric position, i.e. More... | |
Vec3d | getSiderealPosApparent (const StelCore *core) const |
Get observer-centered hour angle + declination (at current equinox) It is the apparent position, i.e. More... | |
Vec3d | getAltAzPosGeometric (const StelCore *core) const |
Get observer-centered alt/az position It is the geometric position, i.e. More... | |
Vec3d | getAltAzPosApparent (const StelCore *core) const |
Get observer-centered alt/az position It is the apparent position, i.e. More... | |
Vec3d | getAltAzPosAuto (const StelCore *core) const |
Get observer-centered alt/az position It is the automatic position, i.e. More... | |
float | getParallacticAngle (const StelCore *core) const |
Get parallactic angle, which is the deviation between zenith angle and north angle. [radians]. | |
bool | isAboveHorizon (const StelCore *core) const |
Checking position an object above mathematical horizon for current location. More... | |
bool | isAboveRealHorizon (const StelCore *core) const |
Checking position an object above real horizon for current location. More... | |
Vec3f | getRTSTime (StelCore *core) const |
Get today's time of rise, transit and set for celestial object for current location. More... | |
float | getVMagnitudeWithExtinction (const StelCore *core) const |
Return object's apparent V magnitude as seen from observer including extinction. More... | |
virtual double | getCloseViewFov (const StelCore *) const |
Return the best FOV in degree to use for a close view of the object. | |
virtual double | getSatellitesFov (const StelCore *) const |
Return the best FOV in degree to use for a global view of the object satellite system (if there are satellites) | |
virtual double | getParentSatellitesFov (const StelCore *) const |
Static Public Member Functions | |
static double | roundToDp (float n, int dp) |
Static Public Attributes | |
static const QString | SATELLITE_TYPE |
static bool | showLabels |
Static Public Attributes inherited from StelObject | |
static const InfoStringGroupFlags | AllInfo |
A pre-defined set of specifiers for the getInfoString flags argument to getInfoString. More... | |
static const InfoStringGroupFlags | ShortInfo = static_cast<InfoStringGroupFlags>(Name|CatalogNumber|Magnitude|RaDecJ2000) |
A pre-defined set of specifiers for the getInfoString flags argument to getInfoString. | |
Friends | |
class | Satellites |
class | SatellitesDialog |
class | SatellitesListModel |
Additional Inherited Members | |
Public Slots inherited from StelObject | |
virtual void | setExtraInfoString (const InfoStringGroup &flags, const QString &str) |
Allow additions to the Info String. More... | |
virtual void | addToExtraInfoString (const StelObject::InfoStringGroup &flags, const QString &str) |
Add str to the extra string. More... | |
QStringList | getExtraInfoStrings (const InfoStringGroup &flags) const |
Retrieve an (unsorted) QStringList of all extra info strings that match flags. More... | |
void | removeExtraInfoStrings (const InfoStringGroup &flags) |
Remove the extraInfoStrings with the given flags. More... | |
Protected Member Functions inherited from StelObject | |
QString | getCommonInfoString (const StelCore *core, const InfoStringGroup &flags) const |
Format the positional info string containing J2000/of date/altaz/hour angle positions and constellation, sidereal time, etc. More... | |
virtual QString | getMagnitudeInfoString (const StelCore *core, const InfoStringGroup &flags, const double alt_app, const int decimals=1) const |
Format the magnitude info string for the object. More... | |
void | postProcessInfoString (QString &str, const InfoStringGroup &flags) const |
Apply post processing on the info string. More... | |
Satellite::Satellite | ( | const QString & | identifier, |
const QVariantMap & | data | ||
) |
identifier | unique identifier (currently the Catalog Number) |
data | a QMap which contains the details of the satellite (TLE set, description etc.) |
|
inlinevirtual |
The ID should be unique for all objects of the same type, but may freely conflict with IDs of other types, so getType() must also be tested.
With this it should be possible to at least identify the same object in a different instance of Stellarium running the same version, but it would even be better if the ID provides some degree of forward-compatibility. For some object types (e.g. planets) this may simply return getEnglishName(), but better candidates may be official designations or at least (stable) internal IDs.
An object may have multiple IDs (different catalog numbers, etc). StelObjectMgr::searchByID() should search through all ID variants, but this method only returns one of them.
Implements StelObject.
|
virtual |
Reimplemented from StelObject.
|
virtual |
core | A pointer to the core |
flags | a set of flags with information types to include. Supported types for Satellite objects:
|
Implements StelObject.
QVariantMap Satellite::getMap | ( | void | ) |
Could be used to create a duplicate.
bool Satellite::operator< | ( | const Satellite & | another | ) | const |
Compares #name fields. If equal, #id fields, which can't be.
void Satellite::setNewTleElements | ( | const QString & | tle1, |
const QString & | tle2 | ||
) |
This assumes the designation is already set, populates the tleElements values and configures internal orbit parameters.
class Satellites |
Public Types | |
enum | UpdateState { Updating, CompleteNoUpdates, CompleteUpdates, DownloadError, OtherError } |
Used for keeping track of the download/update status. More... | |
enum | Status { Visible, NotVisible, Both, NewlyAdded, OrbitError } |
Flags used to filter the satellites list according to their status. | |
Public Types inherited from StelModule | |
enum | StelModuleSelectAction { AddToSelection, ReplaceSelection, RemoveFromSelection } |
Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More... | |
enum | StelModuleActionName { ActionDraw, ActionUpdate, ActionHandleMouseClicks, ActionHandleMouseMoves, ActionHandleKeys } |
Define the possible action for which an order is defined. More... | |
Public Slots | |
bool | getUpdatesEnabled (void) const |
get whether or not the plugin will try to update TLE data from the internet More... | |
void | setUpdatesEnabled (bool enabled) |
Set whether the plugin will try to download updates from the Internet. More... | |
bool | isAutoAddEnabled () const |
void | setAutoAddEnabled (bool enabled) |
Emits settingsChanged() if the value changes. | |
bool | isAutoRemoveEnabled () const |
void | setAutoRemoveEnabled (bool enabled) |
Emits settingsChanged() if the value changes. | |
void | setFlagHintsVisible (bool b) |
Set whether satellite position hints (icons or star-like dot) should be displayed. More... | |
bool | getFlagHintsVisible () const |
void | setFlagLabelsVisible (bool b) |
Set whether text labels should be displayed next to satellite hints. More... | |
bool | getFlagLabelsVisible () const |
void | setFlagIconicMode (bool b) |
Emits settingsChanged() if the value changes. | |
bool | getFlagIconicMode () const |
bool | getFlagHideInvisible () const |
void | setFlagHideInvisible (bool b) |
Vec3f | getInvisibleSatelliteColor () const |
Get color for invisible satellites. More... | |
void | setInvisibleSatelliteColor (const Vec3f &c) |
Set color for invisible satellites. | |
Vec3f | getTransitSatelliteColor () const |
Get color for satellites in transit through the Sun or the Moon (color of markers) More... | |
void | setTransitSatelliteColor (const Vec3f &c) |
Set color for satellites in transit through the Sun or the Moon (color of markers) | |
int | getLabelFontSize () const |
get the label font size. More... | |
void | setLabelFontSize (int size) |
set the label font size. More... | |
void | setUpdateFrequencyHours (int hours) |
Set the Internet update frequency. More... | |
void | updateFromOnlineSources () |
Start an Internet update. More... | |
void | setFlagOrbitLines (bool b) |
Choose whether or not to draw orbit lines. More... | |
bool | getFlagOrbitLines () const |
Get the current status of the orbit line rendering flag. | |
int | getOrbitLineSegments () const |
return number of segments for orbit lines | |
void | setOrbitLineSegments (int s) |
set number of segments for orbit lines | |
int | getOrbitLineFadeSegments () const |
return number of fading segments at end of orbit | |
void | setOrbitLineFadeSegments (int s) |
set number of fading segments at end of orbit | |
int | getOrbitLineSegmentDuration () const |
return duration of a single segments | |
void | setOrbitLineSegmentDuration (int s) |
set duration of a single segments | |
void | recalculateOrbitLines (void) |
void | displayMessage (const QString &message, const QString hexColor="#999999") |
Display a message on the screen for a few seconds. More... | |
void | saveCatalog (QString path=QString()) |
Save the current satellite catalog to disk. | |
Signals | |
void | flagHintsVisibleChanged (bool b) |
void | flagLabelsVisibleChanged (bool b) |
void | labelFontSizeChanged (int s) |
void | flagOrbitLinesChanged (bool b) |
void | flagIconicModeChanged (bool b) |
void | flagHideInvisibleChanged (bool b) |
void | updatesEnabledChanged (bool b) |
void | updateFrequencyHoursChanged (int i) |
void | autoAddEnabledChanged (bool b) |
void | autoRemoveEnabledChanged (bool b) |
void | orbitLineSegmentsChanged (int i) |
void | orbitLineFadeSegmentsChanged (int i) |
void | orbitLineSegmentDurationChanged (int i) |
void | invisibleSatelliteColorChanged (Vec3f) |
void | transitSatelliteColorChanged (Vec3f) |
void | settingsChanged () |
Emitted when some of the plugin settings have been changed. More... | |
void | updateStateChanged (Satellites::UpdateState state) |
emitted when the update status changes, e.g. More... | |
void | tleUpdateComplete (int updated, int total, int added, int missing) |
Emitted after an update has run. More... | |
void | satGroupVisibleChanged () |
Public Member Functions | |
virtual void | init () |
Initialize itself. More... | |
virtual void | deinit () |
Called before the module will be delete, and before the openGL context is suppressed. More... | |
virtual void | update (double deltaTime) |
Update the module with respect to the time. More... | |
virtual void | draw (StelCore *core) |
Execute all the drawing functions for this module. More... | |
virtual void | drawPointer (StelCore *core, StelPainter &painter) |
virtual double | getCallOrder (StelModuleActionName actionName) const |
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations. More... | |
virtual QList< StelObjectP > | searchAround (const Vec3d &v, double limitFov, const StelCore *core) const |
Used to get a list of objects which are near to some position. More... | |
virtual StelObjectP | searchByNameI18n (const QString &nameI18n) const |
Return the matching satellite object's pointer if exists or Q_NULLPTR. More... | |
virtual StelObjectP | searchByName (const QString &name) const |
Return the matching satellite if exists or Q_NULLPTR. More... | |
virtual StelObjectP | searchByID (const QString &id) const |
Return the matching satellite if exists or Q_NULLPTR. More... | |
StelObjectP | searchByNoradNumber (const QString &noradNumber) const |
Return the satellite with the given catalog number. More... | |
virtual QStringList | listMatchingObjects (const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const |
Find and return the list of at most maxNbItem objects auto-completing the passed object name. More... | |
virtual QStringList | listAllObjects (bool inEnglish) const |
List all StelObjects. More... | |
virtual QString | getName () const |
Gets a user-displayable name of the object category. | |
virtual QString | getStelObjectType () const |
Returns the name that will be returned by StelObject::getType() for the objects this module manages. | |
virtual bool | configureGui (bool show=true) |
Implement this to tell the main Stellarium GUI that there is a GUI element to configure this plugin. More... | |
void | restoreDefaults (void) |
Set up the plugin with default values. More... | |
void | loadSettings () |
Read (or re-read) the plugin's settings from the configuration file. More... | |
void | saveSettingsToConfig () |
Save the plugin's settings to the main configuration file. | |
QSet< QString > | getGroups () const |
Get the groups used in the currently loaded satellite collection. More... | |
QStringList | getGroupIdList () const |
Get a sorted list of group names. More... | |
void | addGroup (const QString &groupId) |
Add this group to the global list. | |
QHash< QString, QString > | getSatellites (const QString &group=QString(), Status vis=Both) const |
get satellite objects filtered by group. More... | |
SatellitesListModel * | getSatellitesListModel () |
Get a model representing the list of satellites. | |
SatelliteP | getById (const QString &id) const |
Get a satellite object by its identifier (i.e. NORAD number). | |
QStringList | listAllIds () const |
Returns a list of all satellite IDs. | |
void | add (const TleDataList &newSatellites) |
Add to the current collection the satellites described by the data list. More... | |
void | remove (const QStringList &idList) |
Remove the selected satellites. More... | |
QDateTime | getLastUpdate (void) const |
get the date and time the TLE elements were updated | |
int | getUpdateFrequencyHours (void) const |
get the update frequency in hours | |
int | getSecondsToUpdate (void) |
get the number of seconds till the next update | |
UpdateState | getUpdateState (void) const |
get the update frequency in hours More... | |
QStringList | getTleSources (void) const |
Get a list of URLs which are sources of TLE data. More... | |
void | setTleSources (QStringList tleSources) |
Set the list of URLs which are sources of TLE data. More... | |
void | saveTleSources (const QStringList &urls) |
Saves the current list of update URLs to the configuration file. | |
void | updateFromFiles (QStringList paths, bool deleteFiles=false) |
Reads update file(s) in celestrak's .txt format, and updates the TLE elements for existing satellites from them. More... | |
void | updateSatellites (TleDataHash &newTleSets) |
Updates the loaded satellite collection from the provided data. More... | |
void | loadExtraData () |
Reads qs.mag and rcs files and its parsing for getting id, standard magnitude and RCS values for satellites. More... | |
Public Member Functions inherited from StelObjectModule | |
virtual QStringList | listAllObjectsByType (const QString &objType, bool inEnglish) const |
List all StelObjects by type. More... | |
bool | matchObjectName (const QString &objName, const QString &objPrefix, bool useStartOfWords) const |
Auxiliary method of listMatchingObjects() More... | |
Public Member Functions inherited from StelModule | |
virtual QSettings * | getSettings () |
Return module-specific settings. More... | |
virtual QString | getModuleVersion () const |
Get the version of the module, default is stellarium main version. | |
virtual QString | getAuthorName () const |
Get the name of the module author. | |
virtual QString | getAuthorEmail () const |
Get the email adress of the module author. | |
virtual void | handleMouseClicks (class QMouseEvent *) |
Handle mouse clicks. More... | |
virtual void | handleMouseWheel (class QWheelEvent *) |
Handle mouse wheel. More... | |
virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
Handle mouse moves. More... | |
virtual void | handleKeys (class QKeyEvent *e) |
Handle key events. More... | |
virtual bool | handlePinch (qreal scale, bool started) |
Handle pinch gesture events. More... | |
Static Public Member Functions | |
static void | parseTleFile (QFile &openFile, TleDataHash &tleList, bool addFlagValue=false) |
Reads a TLE list from a file to the supplied hash. More... | |
static QString | getSatIdFromLine2 (const QString &line) |
Insert a three line TLE into the hash array. More... | |
Properties | |
bool | flagHintsVisible |
bool | flagLabelsVisible |
int | labelFontSize |
bool | flagIconicMode |
bool | flagHideInvisible |
bool | flagOrbitLines |
int | orbitLineSegments |
int | orbitLineFadeSegments |
int | orbitLineSegmentDuration |
Vec3f | invisibleSatelliteColor |
Vec3f | transitSatelliteColor |
Updater module | |
bool | autoAddEnabled |
Flag enabling the automatic addition of new satellites on update. More... | |
bool | autoRemoveEnabled |
Flag enabling the automatic removal of missing satellites on update. | |
bool | updatesEnabled |
Flag enabling automatic Internet updates. | |
int | updateFrequencyHours |
Additional Inherited Members | |
Protected Member Functions inherited from StelModule | |
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action (call to slot) to the StelActionMgr object. More... | |
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action (call to own slot) to the StelActionMgr object. More... | |
StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *contextObject, std::function< void()> lambda, const QString &shortcut="", const QString &altShortcut="") |
convenience methods to add an action (call to Lambda functor) to the StelActionMgr object. More... | |
void Satellites::add | ( | const TleDataList & | newSatellites | ) |
The changes are not saved to file. Calls add(TleData).
|
virtual |
Reimplemented from StelModule.
|
virtual |
Deinitialize all openGL texture in this method.
Reimplemented from StelModule.
|
slot |
This is used for plugin-specific warnings and such.
|
virtual |
core | the core to use for the drawing |
Reimplemented from StelModule.
|
virtual |
actionName | the name of the action for which we want the call order |
Reimplemented from StelModule.
QStringList Satellites::getGroupIdList | ( | ) | const |
See groups for details. Use getGroups() if you don't need a list.
QSet<QString> Satellites::getGroups | ( | ) | const |
See groups for details. Use getGroupIdList() if you need a list.
|
slot |
|
inlineslot |
QHash<QString,QString> Satellites::getSatellites | ( | const QString & | group = QString() , |
Status | vis = Both |
||
) | const |
If an empty string is used for the group name, return all satallites
|
static |
[in] | line | The second line from the TLE |
|
inline |
|
slot |
|
inlineslot |
|
inline |
Get the current updateState
|
virtual |
If the initialization takes significant time, the progress should be displayed on the loading bar.
Implements StelModule.
|
virtual |
inEnglish | list names in English (true) or translated (false) |
Implements StelObjectModule.
|
virtual |
objPrefix | the case insensitive first letters of the searched object |
maxNbItem | the maximum number of returned object names |
useStartOfWords | the autofill mode for returned objects names |
Reimplemented from StelObjectModule.
void Satellites::loadExtraData | ( | ) |
void Satellites::loadSettings | ( | ) |
This will be called from init() and also when restoring defaults (i.e. from the configuration dialog / restore defaults button).
|
static |
If an entry with the same ID exists in the given hash, its contents are overwritten with the new values.
openFile | a reference to an open file. | |
[in,out] | tleList | a hash with satellite IDs as keys. |
[in] | addFlagValue | value to be set to TleData::addThis for all. |
void Satellites::remove | ( | const QStringList & | idList | ) |
The changes are not saved to file.
void Satellites::restoreDefaults | ( | void | ) |
This means clearing out the Satellites section in the main config.ini (if one already exists), and populating it with default values. It also creates the default satellites.json file from the resource embedded in the plugin lib/dll file.
|
virtual |
v | a vector representing the position in th sky around which to search for satellites. |
limitFov | the field of view around the position v in which to search for satellites. |
core | the StelCore to use for computations. |
Implements StelObjectModule.
|
virtual |
id | The satellite id (NORAD) |
Implements StelObjectModule.
|
virtual |
name | The case in-sensitive standard program name |
Implements StelObjectModule.
|
virtual |
nameI18n | The case in-sensitive satellite name |
Implements StelObjectModule.
StelObjectP Satellites::searchByNoradNumber | ( | const QString & | noradNumber | ) | const |
Used as a helper function by searchByName() and searchByNameI18n().
noradNumber | search string in the format "NORAD XXXX". |
|
slot |
Note that hint visibility also applies to satellite labels. Emits settingsChanged() if the value changes.
|
slot |
Emits settingsChanged() if the value changes.
|
slot |
Each satellite has its own setting as well, but this can be used to turn on/off all those satellites which elect to have orbit lines all in one go.
b | - true to turn on orbit lines, false to turn off |
|
slot |
size | the pixel size of the font Emits settingsChanged() if the value changes. |
|
signal |
Used to communicate with the configuration window.
void Satellites::setTleSources | ( | QStringList | tleSources | ) |
In addition to replacing the current list of sources, it also saves them to the configuration file. Allows marking sources for auto-addition by adding a prefix to the URL string.
|
slot |
Emits settingsChanged() if the value changes.
|
slot |
Emits settingsChanged() if the value changes.
b | if true, updates will be enabled, else they will be disabled. |
|
signal |
updated | the number of updated satellites; |
total | the total number of satellites in the catalog; |
added | the number of newly added satellites; |
missing | the number of satellites that were not found in the update source(s) (and were removed, if autoRemoveEnabled is set). |
|
virtual |
deltaTime | the time increment in second since last call. |
Implements StelModule.
void Satellites::updateFromFiles | ( | QStringList | paths, |
bool | deleteFiles = false |
||
) |
Indirectly emits signals updateStateChanged() and tleUpdateComplete(), as it calls updateSatellites(). See updateFromOnlineSources() for the other kind of update operation.
paths | a list of paths to update files |
deleteFiles | if set, the update files are deleted after they are used, else they are left alone |
|
slot |
This method starts the process of an Internet update: it tries to download TLE lists from online resources and then use them to update the orbital data (and names, etc.) of the included satellites. This only initialized the download. The rest of the work is done by saveDownloadedUpdate() and updateSatellites(). Update sources are described in updateUrls (see for accessors details). If autoAddEnabled is true when this function is called, new satellites in the chosen update sources will be added during the update. If autoRemoveEnabled is true when this function is called, any existing satellite that can't be found in the downloaded update lists will be removed. See updateFromFiles() for the other type of update operation.
void Satellites::updateSatellites | ( | TleDataHash & | newTleSets | ) |
Worker function called by updateFromFiles() and saveDownloadedUpdate(). (Respectively, user-initiated update from file(s) and user- or auto- initiated update from online source(s).) Emits updateStateChanged() and tleUpdateComplete().
[in,out] | newTleSets | a hash with satellite IDs as keys; it's modified by the method! |
|
signal |
when an update starts, completes and so on. Note that on completion of an update, tleUpdateComplete is also emitted with the number of updates done.
state | the new update state. |
|
readwrite |
This will apply only for the selected update sources.