Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added custom filter for satellites #2457

Merged
merged 7 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added guide/pictures/satellites_plugin_filters.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added guide/pictures/satellites_plugin_satellites.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed guide/pictures/satellites_plugin_satellites.png
Binary file not shown.
99 changes: 82 additions & 17 deletions guide/plg_catalogs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1239,12 +1239,18 @@ \section{Satellites Plugin}
To calculate satellite positions, the plugin uses an implementation of
the SGP4/SDP4 algorithms (J.L. Canales' \program{gsat} library), using
as its input data in NORAD's two-line element set
(TLE\footnote{TLE: \url{https://en.wikipedia.org/wiki/Two-line_element_set}})
(\indexterm[TLE, two-line element]{TLE}\footnote{TLE: \url{https://en.wikipedia.org/wiki/Two-line_element_set}})
format. Lists with TLEs for hundreds of satellites are available
online and are regularly updated. The plugin downloads the lists
prepared by \url{https://celestrak.com} to keep itself up-to-date, but the users can
specify other sources online or load updates from local files.

\begin{figure}[htbp]
\centering\includegraphics[width=0.8\textwidth]{satellites_plugin_configuration.jpg}
\caption{Configuration of the Satellites plugin.}
\label{fig:plugins:Satellites:Configuration}
\end{figure}

If the plugin has been enabled (see
section~\ref{sec:Plugins:EnablingPlugins}), just click on the
Satellite button \guibutton{0.6}{bt_hint.png} on the bottom
Expand All @@ -1265,22 +1271,55 @@ \section{Satellites Plugin}
section~\ref{sec:Eclipses:lunar}), at the distance of the currently
selected satellite, or at a fixed distance from Earth's surface.

\begin{figure}[htbp]
\centering\includegraphics[width=0.8\textwidth]{satellites_plugin_configuration.jpg}
\caption{Configuration of the Satellites plugin.}
\label{fig:plugins:Satellites:Configuration}
\end{figure}

\subsection{Satellite Properties}
\label{sec:plugins:Satellites:properties}

\begin{description}
\item[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.

\item[Satellite Catalog] In the \emph{Satellite Catalog} satellites are uniquely identified by their NORAD number, which is encoded in TLEs.
\begin{figure}[tbp]
\centering\includegraphics[width=0.8\textwidth]{satellites_plugin_satellites.jpg}
\caption{Configuration of the Satellites plugin --- satellites properties.}
\label{fig:plugins:Satellites:Configuration:Satellites}
\end{figure}

\item[Grouping]
\begin{description}
\item[Name] 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.
\item[Catalog number] In the \emph{Satellite Catalog} satellites are
uniquely identified by their NORAD number, which is encoded in
\indexterm[TLE, two-line element]{TLE}s.
\item[I.D. (The International Designator)] In the \emph{Satellite
Catalog} satellites are also uniquely identified by their
International Designator also known as \indexterm[COSPAR ID (satellite ID)]{COSPAR ID}, which is encoded
in TLEs.
\item[Standard magnitude] The \indexterm[standard magnitude
(satellites)]{standard magnitude} may be an estimate based on the
mean cross-sectional area derived from its dimensions, or it may be
a mean value derived from visual observations.\footnote{The standard
magnitude and RCS data were obtained from Mike McCants' quicksat
catalog with his permissions.}
\item[RCS] The \indexterm[RCS, Radar Cross Section]{Radar Cross
Section} is a median value derived from the last several years of
values in the Satellite Situation Report. The units of the RCS are
square meters.
\item[Perigee] The \indexterm{perigee} is the nearest point respectively of a
satellite's direct orbit around the Earth. The unit of perigee is
kilometers.
\item[Apogee] The \indexterm{apogee} is the farthest point
respectively of a satellite's direct orbit around the Earth. The
unit of apogee is kilometers.
\item[Period] The orbital period is simply how long an orbiting
satellite takes to complete one orbit. The unit of period is
minutes.
\item[Displayed] In the \emph{Satellite Catalog} tab this property
controls whether the selected satellite should be displayed on the
sky.
\item[Orbit] In the \emph{Satellite Catalog} tab this property
controls whether the orbit of the selected satellite should be
displayed in the sky.
\item[Do not update] In the \emph{Satellite Catalog} tab this property
marks satellites for which TLE should not be updated.
\item[Description] The user-defined notes for the selected satellite.
\item[Groups]
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
Expand All @@ -1289,14 +1328,40 @@ \subsection{Satellite Properties}
grouping. A satellite may also 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.

The group names also can be used as an additional filters for the satellites (see UI elements on the left side).

\item[TLE set] The raw TLE data of selected satellite. A two-line
element set (TLE) is a data format encoding a list of orbital
elements of an Earth-orbiting object for a given point in time, the
epoch. Using a suitable prediction model, the state (position and
velocity) at any point in the past or future can be estimated to
some accuracy.

\item[Epoch of the TLE] Human-readable epoch of current set of the TLE.
\end{description}

\begin{figure}[tbp]
\centering\includegraphics[width=0.8\textwidth]{satellites_plugin_satellites.png}
\caption{Configuration of the Satellites plugin --- satellites properties.}
\label{fig:plugins:Satellites:Configuration:Satellites}
On the left side of this tab you may see tools for filtering the
satellites. The upper part shows a drop-down list with many predefined
filters. Some filters are connected to user defined groups to quickly
get a list of satellites in some group, such as all satellites from
group ``navigation''. Some filters are connected to orbital properties
of satellites, e.g., selecting the filter ``[LEO]'' will show all
low-orbital satellites.

\begin{figure}[ht]
\centering\includegraphics[width=0.6\textwidth]{satellites_plugin_filters.jpg}
\caption{Configuration of the Satellites plugin --- satellites custom filter.}
\label{fig:plugins:Satellites:Configuration:SatellitesFilter}
\end{figure}

You can display \newFeature{0.22.2} a list of satellites by specific
selection of their properties, when filter ``[custom filter]'' has
been selected (see
\ref{fig:plugins:Satellites:Configuration:SatellitesFilter}). The
settings of this filter available through button
\guibutton{0.6}{uibtSettings.png}, which is located at the right of
the drop-down list.

\subsection{Satellite Catalog}
\label{sec:plugins:Satellites:catalog}
Expand Down
3 changes: 3 additions & 0 deletions plugins/Satellites/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ SET(Satellites_SRCS
gui/SatellitesDialog.cpp
gui/SatellitesImportDialog.hpp
gui/SatellitesImportDialog.cpp
gui/SatellitesFilterDialog.hpp
gui/SatellitesFilterDialog.cpp
)

SET(SatellitesDialog_UIS
gui/satellitesDialog.ui
gui/satellitesImportDialog.ui
gui/satellitesFilterDialog.ui
)
QT5_WRAP_UI(SatellitesDialog_UIS_H ${SatellitesDialog_UIS})

Expand Down
45 changes: 45 additions & 0 deletions plugins/Satellites/src/Satellite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,26 @@ Vec3f Satellite::transitSatelliteColor = Vec3f(0.f,0.f,0.f);
double Satellite::timeRateLimit = 1.0; // one JD per second by default
int Satellite::tleEpochAge = 30; // default age of TLE's epoch to mark TLE as outdated (using for filters)

bool Satellite::flagCFKnownStdMagnitude = false;
bool Satellite::flagCFApogee = false;
double Satellite::minCFApogee = 20000.;
double Satellite::maxCFApogee = 55000.;
bool Satellite::flagCFPerigee = false;
double Satellite::minCFPerigee = 200.;
double Satellite::maxCFPerigee = 1500.;
bool Satellite::flagCFEccentricity = false;
double Satellite::minCFEccentricity = 0.3;
double Satellite::maxCFEccentricity = 0.9;
bool Satellite::flagCFPeriod = false;
double Satellite::minCFPeriod = 0.;
double Satellite::maxCFPeriod = 150.;
bool Satellite::flagCFInclination = false;
double Satellite::minCFInclination = 120.;
double Satellite::maxCFInclination = 360.;
bool Satellite::flagCFRCS = false;
double Satellite::minCFRCS = 0.1;
double Satellite::maxCFRCS = 100.;

#if (SATELLITES_PLUGIN_IRIDIUM == 1)
double Satellite::sunReflAngle = 180.;
//double Satellite::timeShift = 0.;
Expand Down Expand Up @@ -854,6 +874,31 @@ SatFlags Satellite::getFlags() const
flags |= SatHGSO;
if (qAbs(StelApp::getInstance().getCore()->getJD() - tleEpochJD) > tleEpochAge)
flags |= SatOutdatedTLE;
// custom filters
bool cfa = true;
if (flagCFApogee)
cfa = (apogee>=minCFApogee && apogee<=maxCFApogee);
bool cfp = true;
if (flagCFPerigee)
cfp = (perigee>=minCFPerigee && perigee<=maxCFPerigee);
bool cfe = true;
if (flagCFEccentricity)
cfe = (eccentricity>=minCFEccentricity && eccentricity<=maxCFEccentricity);
bool cfm = true;
if (flagCFKnownStdMagnitude)
cfm = (stdMag<99.0);
bool cft = true;
if (flagCFPeriod)
cft = (orbitalPeriod>=minCFPeriod && orbitalPeriod<=maxCFPeriod);
bool cfi = true;
if (flagCFInclination)
cfi = (inclination>=minCFInclination && inclination<=maxCFInclination);
bool cfr = true;
if (flagCFRCS)
cfr = (RCS>=minCFRCS && RCS<=maxCFRCS);
if (cfa && cfp && cfe && cfm && cft && cfi && cfr)
flags |= SatCustomFilter;

return flags;
}

Expand Down
57 changes: 39 additions & 18 deletions plugins/Satellites/src/Satellite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,23 @@ typedef QSet<QString> GroupSet;
//! @ingroup satellites
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,
SatOutdatedTLE = 0x4000
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,
SatOutdatedTLE = 0x4000,
SatCustomFilter = 0x8000
};
typedef QFlags<SatFlag> SatFlags;
Q_DECLARE_OPERATORS_FOR_FLAGS(SatFlags)
Expand Down Expand Up @@ -116,11 +117,11 @@ class Satellite : public StelObject
//! @enum OptStatus operational statuses
enum OptStatus
{
StatusOperational = 1,
StatusOperational = 1,
StatusNonoperational = 2,
StatusPartiallyOperational = 3,
StatusStandby = 4,
StatusSpare = 5,
StatusSpare = 5,
StatusExtendedMission = 6,
StatusDecayed = 7,
StatusUnknown = 0
Expand Down Expand Up @@ -322,6 +323,26 @@ class Satellite : public StelObject
static double timeRateLimit;
static int tleEpochAge;

static bool flagCFKnownStdMagnitude;
static bool flagCFApogee;
static double minCFApogee;
static double maxCFApogee;
static bool flagCFPerigee;
static double minCFPerigee;
static double maxCFPerigee;
static bool flagCFEccentricity;
static double minCFEccentricity;
static double maxCFEccentricity;
static bool flagCFPeriod;
static double minCFPeriod;
static double maxCFPeriod;
static bool flagCFInclination;
static double minCFInclination;
static double maxCFInclination;
static bool flagCFRCS;
static double minCFRCS;
static double maxCFRCS;

void draw(StelCore *core, StelPainter& painter);

//Satellite Orbit Position calculation
Expand Down
Loading