Loading...
Searching...
No Matches
supernovas::CatalogSource Class Reference
Astronomical object of interest

A sidereal source, defined by its catalog coordinates and various other available 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 CatalogEntry & | catalog_entry () const
| Returns the catalog entry stored internally.
const Source * | copy () 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 apparent 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.
bool | equals (const Source &other) const
| Checks if this astronomical source is the same as another within typical tolerances.
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) relative to the observer, or else an invalid position if the source could not be positioned in the observing frame.
HorizontalTrack | horizontal_track (const Frame &frame, RefractionModel ref=NULL, const Weather &weather=Weather::standard()) const
| Returns a 1-minute horizontal trajectory of this source on the observer's sky, which can be used for extrapolating its apparent position for within a 1-minute interval to avoid the repeated full-fledged position calculation at higher rates, which may be expensive.
Angle | moon_angle (const Frame &frame) const
| Returns the apparent 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.
bool | operator!= (const Source &other) const
| Checks if this astronomical source differs another given typical tolerances.
bool | operator== (const Source &other) const
| Checks if this astronomical source is the same as another within typical tolerances.
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 an undefined (invalid) time 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 an undefined (invalid) time if the observer is not near Earth's surface.
Angle | sun_angle (const Frame &frame) const
| Returns the pparent 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 an undefined (invalid) time 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' state 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 various other available catalog parameters.

Since
  1.6

## 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

  e | the catalog entry

Since
  1.6

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.

Since
  1.6

## copy()

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

override virtual

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

Returns
  pointer to new copy of this catalog source instance.

Since
  1.6

Implements supernovas::Source.

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

## to_string()

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

override virtual

Returns a string representation of this catalog source.

Returns
  a string representation of this catalog source

Since
  1.6

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().