siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
Loading...
Searching...
No Matches
trackable.hpp
Go to the documentation of this file.
1#pragma once
2
35#include "altitude.hpp"
36#include "azimuth.hpp"
37#include "coordinates.hpp"
38#include "time.hpp"
39#include <memory>
40#include <string>
41#include <vector>
42
43namespace siderust {
44
54class Target {
55public:
56 virtual ~Target() = default;
57
58 // ------------------------------------------------------------------
59 // Identity
60 // ------------------------------------------------------------------
61
66 virtual std::string name() const = 0;
67
68 // ------------------------------------------------------------------
69 // Altitude queries
70 // ------------------------------------------------------------------
71
75 virtual qtty::Degree altitude_at(const Geodetic &obs, const Time<TT, MJD> &mjd) const = 0;
76
80 virtual std::vector<Period<TT, MJD>> above_threshold(const Geodetic &obs,
81 const Period<TT, MJD> &window,
82 qtty::Degree threshold,
83 const SearchOptions &opts = {}) const = 0;
84
88 virtual std::vector<Period<TT, MJD>> below_threshold(const Geodetic &obs,
89 const Period<TT, MJD> &window,
90 qtty::Degree threshold,
91 const SearchOptions &opts = {}) const = 0;
92
96 virtual std::vector<CrossingEvent> crossings(const Geodetic &obs, const Period<TT, MJD> &window,
97 qtty::Degree threshold,
98 const SearchOptions &opts = {}) const = 0;
99
103 virtual std::vector<CulminationEvent> culminations(const Geodetic &obs,
104 const Period<TT, MJD> &window,
105 const SearchOptions &opts = {}) const = 0;
106
107 // ------------------------------------------------------------------
108 // Azimuth queries
109 // ------------------------------------------------------------------
110
114 virtual qtty::Degree azimuth_at(const Geodetic &obs, const Time<TT, MJD> &mjd) const = 0;
115
119 virtual std::vector<AzimuthCrossingEvent>
120 azimuth_crossings(const Geodetic &obs, const Period<TT, MJD> &window, qtty::Degree bearing,
121 const SearchOptions &opts = {}) const = 0;
122
123 // Non-copyable, movable from base
124 Target() = default;
125 Target(const Target &) = delete;
126 Target &operator=(const Target &) = delete;
127 Target(Target &&) = default;
128 Target &operator=(Target &&) = default;
129};
130
133
134} // namespace siderust
Altitude computations for Sun, Moon, stars, and arbitrary ICRS directions.
Azimuth computations for Sun, Moon, stars, and arbitrary ICRS directions.
Abstract base for any celestial object that can be tracked from an observer location.
Definition trackable.hpp:54
Target & operator=(Target &&)=default
virtual std::vector< Period< TT, MJD > > below_threshold(const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) const =0
Find periods when the object is below a threshold altitude.
virtual std::vector< CrossingEvent > crossings(const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) const =0
Find threshold-crossing events (rising / setting).
virtual ~Target()=default
Target()=default
virtual std::vector< AzimuthCrossingEvent > azimuth_crossings(const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree bearing, const SearchOptions &opts={}) const =0
Find epochs when the object crosses a given azimuth bearing.
Target(Target &&)=default
virtual qtty::Degree altitude_at(const Geodetic &obs, const Time< TT, MJD > &mjd) const =0
Compute altitude (degrees) at a given Time<TT, MJD> instant.
Target & operator=(const Target &)=delete
virtual std::string name() const =0
Human-readable name for this target (e.g. "Sun", "Vega", "ICRS(279.2°, 38.8°)").
virtual std::vector< Period< TT, MJD > > above_threshold(const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) const =0
Find periods when the object is above a threshold altitude.
virtual std::vector< CulminationEvent > culminations(const Geodetic &obs, const Period< TT, MJD > &window, const SearchOptions &opts={}) const =0
Find culmination (local altitude extremum) events.
Target(const Target &)=delete
virtual qtty::Degree azimuth_at(const Geodetic &obs, const Time< TT, MJD > &mjd) const =0
Compute azimuth (degrees, N-clockwise) at a given Time<TT, MJD> instant.
Coordinate module umbrella.
tempoch::EncodedTime< Scale, Format > Time
Definition time.hpp:36
tempoch::Period< Time< Scale, Format > > Period
Definition time.hpp:37
Geodetic position (WGS84 ellipsoid).
Definition geodetic.hpp:29
Options for altitude search algorithms.
Definition altitude.hpp:58
Public siderust time tags and typed time/period aliases.