SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
Loading...
Searching...
No Matches
supernovas::CatalogSource Class Reference

A sidereal source, defined by its catalog coordinates and other catalog parameters. More...

#include <supernovas.h>

Inheritance diagram for supernovas::CatalogSource:

Public Member Functions

 CatalogSource (const CatalogEntry &e)
 Instantiates a new catalog source, from its catalog definition.
const CatalogEntrycatalog_entry () const
 Returns the catalog entry stored internally.
const Sourcecopy () const override
 Returns a pointer to a newly allocated copy of this catalog source instance.
std::string to_string () const override
 Returns a string representation of this catalog source.
Public Member Functions inherited from supernovas::Source
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.
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.
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().

Additional Inherited Members

Static Public Member Functions inherited from supernovas::Source
static void set_case_sensitive (bool value)
 Enables or disabled case-sensitive treatment of source names.
Protected Member Functions inherited from supernovas::Source
 Source ()
 stored data on source
Protected Member Functions inherited from supernovas::Validating
 Validating ()
 dummy constructor;
Protected Attributes inherited from supernovas::Source
struct novas_object _object = {}
Protected Attributes inherited from supernovas::Validating
bool _valid = false
 the state variable.

Detailed Description

A sidereal source, defined by its catalog coordinates and other catalog parameters.

Constructor & Destructor Documentation

◆ CatalogSource()

supernovas::CatalogSource::CatalogSource ( const CatalogEntry & e)
explicit

Instantiates a new catalog source, from its catalog definition.

ICRS coordinates are calculated for all catalog entries, regardless of what catalog system they were defined it. As such, it is important that for catalog entries that are not defined in ICRS or the J2000 catalog system, you set proper motion as appropriate, such that they may be 'moved' into the J2000 epoch for proper ICRS coordinates.

Parameters
ethe catalog entry

References supernovas::Source::Source(), supernovas::CatalogEntry::_cat_entry(), supernovas::Source::_object, supernovas::Validating::_valid, supernovas::Validating::is_valid(), make_cat_object_sys(), supernovas::Equinox::name(), NOVAS_CATALOG_OBJECT, and supernovas::CatalogEntry::system().

Referenced by copy().

Member Function Documentation

◆ catalog_entry()

const CatalogEntry & supernovas::CatalogSource::catalog_entry ( ) const

Returns the catalog entry stored internally.

Returns
a reference to the internal catalog entry.

◆ copy()

const Source * supernovas::CatalogSource::copy ( ) const
overridevirtual

Returns a pointer to a newly allocated copy of this catalog source instance.

Returns
pointer to new copy of this catalog source instance.

Implements supernovas::Source.

References CatalogSource(), and supernovas::Source::Source().

◆ to_string()

std::string supernovas::CatalogSource::to_string ( ) const
overridevirtual

Returns a string representation of this catalog source.

Returns
a string representation of this catalog source

Implements supernovas::Source.

References novas_cat_entry::dec, supernovas::Unit::deg, supernovas::Unit::hour_angle, novas_cat_entry::ra, novas_cat_entry::starname, supernovas::Angle::to_string(), and supernovas::TimeAngle::to_string().