1#ifndef ORBITALELEMENTSDATABASE_HH
2#define ORBITALELEMENTSDATABASE_HH
4#include <QAbstractTableModel>
5#include <QNetworkAccessManager>
18 unsigned int microsecond;
23 Epoch(
unsigned int year,
unsigned int month,
unsigned int day,
24 unsigned int hour,
unsigned int minute,
unsigned int second,
unsigned int microsecond);
30 static Epoch parse(
const QString &datetime);
31 double toEpoch()
const;
32 QString toString()
const;
48 unsigned int id()
const;
50 const QString &
name()
const;
79 double _meanMotionDerivative;
85 unsigned int _revolutionNumber;
97 bool contains(
unsigned int id)
const;
102 unsigned int dbAge()
const;
105 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
106 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
107 QVariant data(
const QModelIndex &index,
int role)
const;
121 void downloadFinished(QNetworkReply *reply);
124 bool load(
const QString &filename);
128 unsigned int _updatePeriod;
130 QVector<OrbitalElement> _elements;
132 QHash<unsigned int, unsigned int> _idIndexMap;
134 QNetworkAccessManager _network;
Definition orbitalelementsdatabase.hh:9
const Epoch & epoch() const
Epoch of the orbital elements.
Definition orbitalelementsdatabase.cc:110
const QString & name() const
Retunrs the name of the satellite.
Definition orbitalelementsdatabase.cc:105
unsigned int revolutionNumber() const
Returns the revolution number.
Definition orbitalelementsdatabase.cc:150
double meanMotionDerivative() const
Returns the first derivative of the mean motion.
Definition orbitalelementsdatabase.cc:120
double eccentricity() const
Returns the eccentricity.
Definition orbitalelementsdatabase.cc:135
unsigned int id() const
Returns the NORAD catalog id.
Definition orbitalelementsdatabase.cc:100
double ascension() const
Returns the right ascension of the ascending node.
Definition orbitalelementsdatabase.cc:130
OrbitalElement(const OrbitalElement &other)=default
Copy constructor.
double meanMotion() const
Returns the mean motion.
Definition orbitalelementsdatabase.cc:115
double meanAnomaly() const
Returns the mean anomaly.
Definition orbitalelementsdatabase.cc:145
OrbitalElement()
Default constructor.
Definition orbitalelementsdatabase.cc:77
double inclination() const
Returns the inclination.
Definition orbitalelementsdatabase.cc:125
bool isValid() const
Returns true, if this represents a valid satellite information.
Definition orbitalelementsdatabase.cc:95
OrbitalElement & operator=(const OrbitalElement &other)=default
Copy assignemnt.
double perigee() const
Returns the argument of perigee.
Definition orbitalelementsdatabase.cc:140
Definition orbitalelementsdatabase.hh:91
void loaded()
Gets emitted once the satellite orbitals has been loaded.
void error(const QString &msg)
Gets emitted if the loading one of the sources fails.
void download()
Starts the download of the orbital elements.
Definition orbitalelementsdatabase.cc:318
Definition orbitalelementsdatabase.hh:11
Epoch()
Default constructor.
Definition orbitalelementsdatabase.cc:16
Epoch & operator=(const Epoch &other)=default
Copy assignment.
Epoch(const Epoch &other)=default
Copy constructor.