![]() |
SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
|
An abstract astronomical source, or target of observation. More...
#include <supernovas.h>
Public Member Functions | |
| virtual | ~Source () |
| const struct novas_object * | _novas_object () const |
| Returns a pointer to the NOVAS C novas_object data structure that stores data internally. | |
| Angle | angle_to (const Source &source, const Frame &frame) const |
| Returns the angular separation of this source from another source, for the given observer location and time of observation. | |
| Apparent | apparent_in (const Frame &frame) const |
| Returns the apparent position of a source (if possible), or else an invalid position. | |
| virtual const Source * | copy () const =0 |
| Returns a pointer to a newly allocated copy of this instance. | |
| EquatorialTrack | equatorial_track (const Frame &frame, const Interval &range) const |
| Returns the short-term equatorial trajectory of this source on the observer's sky, which can be used for extrapolating its apparent position in the near-term to avoid the repeated full-fledged position calculation, which may be expensive. | |
| EquatorialTrack | equatorial_track (const Frame &frame, double range_seconds=Unit::hour) const |
| Returns the short-term equatorial trajectory of this source on the observer's sky, which can be used for extrapolating its apparent position in the near-term to avoid the repeated full-fledged position calculation, which may be expensive. | |
| Geometric | geometric_in (const Frame &frame, enum novas_reference_system system=NOVAS_TOD) const |
| Returns the geometric position of a source (if possible), or else an invalid position. | |
| HorizontalTrack | horizontal_track (const Frame &frame, RefractionModel ref=NULL, const Weather &weather=Weather::standard()) const |
| Returns the short-term horizontal trajectory of this source on the observer's sky, which can be used for extrapolating its apparent position in the near-term to avoid the repeated full-fledged position calculation, which may be expensive. | |
| Angle | moon_angle (const Frame &frame) const |
| Returns the angular separation of this source from the Moon, for the given observer location and time of observation. | |
| std::string | name () const |
| Returns the name given to this source at instantiation. | |
| Time | rises_above (const Angle &el, const Frame &frame, RefractionModel ref=NULL, const Weather &weather=Weather::standard()) const |
| Returns the time when the source rises above the specified elevation next for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface. | |
| Time | sets_below (const Angle &el, const Frame &frame, RefractionModel ref=NULL, const Weather &weather=Weather::standard()) const |
| Returns the time when the source sets below the specified elevation next for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface. | |
| Angle | sun_angle (const Frame &frame) const |
| Returns the angular separation of this source from the Sun, for the given observer location and time of observation. | |
| virtual std::string | to_string () const =0 |
| Time | transits_in (const Frame &frame) const |
| Returns the time when the source transits for an observer located on or near Earth's surface, or else std::nullopt if the observer is not near Earth's surface. | |
| enum novas_object_type | type () const |
| Returns the type of this source. | |
| Public Member Functions inherited from supernovas::Validating | |
| bool | is_valid () const |
| Returns the previously set 'valid' stae of the implementing instance. | |
| operator bool () const | |
| Objects that implement Validating can be used in conditionals directly, without explicitly calling is_valid(). | |
Static Public Member Functions | |
| static void | set_case_sensitive (bool value) |
| Enables or disabled case-sensitive treatment of source names. | |
Protected Member Functions | |
| Source () | |
| stored data on source | |
| Protected Member Functions inherited from supernovas::Validating | |
| Validating () | |
| dummy constructor; | |
Protected Attributes | |
| struct novas_object | _object = {} |
| Protected Attributes inherited from supernovas::Validating | |
| bool | _valid = false |
| the state variable. | |
An abstract astronomical source, or target of observation.
|
inlineprotected |
stored data on source
Referenced by supernovas::CatalogSource::CatalogSource(), angle_to(), supernovas::CatalogSource::copy(), and copy().
|
inlinevirtual |
| const struct novas_object * supernovas::Source::_novas_object | ( | ) | const |
Returns a pointer to the NOVAS C novas_object data structure that stores data internally.
References _object.
Referenced by equatorial_track(), and horizontal_track().
|
pure virtual |
Returns a pointer to a newly allocated copy of this instance.
Implemented in supernovas::CatalogSource, supernovas::EphemerisSource, supernovas::OrbitalSource, and supernovas::Planet.
References Source(), supernovas::Unit::hour, NOVAS_TOD, and supernovas::Weather::standard().
| std::string supernovas::Source::name | ( | ) | const |
Returns the name given to this source at instantiation.
It may be lower-case unless the set_case_sensitive(true) was called before instantiating the source.
References _object.
Referenced by supernovas::EphemerisSource::EphemerisSource(), supernovas::OrbitalSource::OrbitalSource(), supernovas::Planet::for_name(), supernovas::EphemerisSource::to_string(), supernovas::OrbitalSource::to_string(), supernovas::OrbitalSystem::to_string(), and supernovas::Planet::to_string().
|
static |
Enables or disabled case-sensitive treatment of source names.
It only affect sources that are instantiated after the change has been made.
| value | true to enable case sensitive processing of name for newly defined sources or else false to convert all future source names to lower-case for case-insensitive processing. |
References novas_case_sensitive().
|
pure virtual |
Implemented in supernovas::CatalogSource, supernovas::EphemerisSource, supernovas::OrbitalSource, and supernovas::Planet.
| enum novas_object_type supernovas::Source::type | ( | ) | const |
|
protected |
Referenced by supernovas::CatalogSource::CatalogSource(), supernovas::EphemerisSource::EphemerisSource(), supernovas::OrbitalSource::OrbitalSource(), supernovas::Planet::Planet(), _novas_object(), supernovas::OrbitalSource::_novas_orbital(), angle_to(), apparent_in(), geometric_in(), supernovas::SolarSystemSource::helio_distance(), supernovas::SolarSystemSource::helio_rate(), supernovas::Planet::mass(), supernovas::Planet::mean_radius(), moon_angle(), name(), supernovas::Planet::novas_id(), supernovas::EphemerisSource::number(), supernovas::OrbitalSource::orbital(), rises_above(), sets_below(), supernovas::SolarSystemSource::solar_illumination(), supernovas::SolarSystemSource::solar_power(), sun_angle(), transits_in(), and type().