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

Approximate trajectory of a source in equatorial coordinates, using a local quadratic approximation around a time instant. More...

#include <supernovas.h>

Inheritance diagram for supernovas::EquatorialTrack:

Public Member Functions

 EquatorialTrack (const Equinox &system, const Time &ref_time, const Interval &range, const ScalarEvolution &ra, const ScalarEvolution &dec, const ScalarEvolution &distance=ScalarEvolution::stationary(Unit::Gpc), const ScalarEvolution &z=ScalarEvolution::undefined())
 Instantiates a short-term equatorial source trajectory on sky for a given reference time, time evolution, and time range of validity.
Equatorial projected_at (const Time &time) const override
 Returns the momentary extrapolated equatorial coordinates (if valid), or else Equatorial::undefined() if the time is outside the range of validity.
Public Member Functions inherited from supernovas::Track< Equatorial >
Coordinate distance_at (const Time &time) const
 Returns the momentary extrapolated distance (if valid), or else std::nullopt if the time is outside the range of validity.
const ScalarEvolutiondistance_evolution () const
 Returns the time evolution of radial distance in this trajectory.
bool is_valid_at (const Time &time) const
 Checks if the trajectory provides valid extrapolated data at a given astrometric time.
Angle latitude_at (const Time &time) const
 Returns the momentary extrapolated latitude angle (if valid), or else std::nullopt if the time is outside the range of validity.
const ScalarEvolutionlatitude_evolution () const
 Returns the latitudinal time evolution component of this trajectory.
Angle longitude_at (const Time &time) const
 Returns the momentary extrapolated longitude angle (if valid), or else std::nullopt if the time is outside the range of validity.
const ScalarEvolutionlongitude_evolution () const
 Returns the longitudinal time evolution component of this trajectory.
ScalarVelocity radial_velocity_at (const Time &time) const
 Returns the momentary extrapolated radial velocity (if valid), or else std::nullopt if the time is outside the range of validity.
const Intervalrange () const
 Returns the time range of validity for this trajectory.
double redshift_at (const Time &time) const
 Returns the momentary extrapolated redshift measure (if valid), or else NAN if the time is outside the range of validity.
const ScalarEvolutionredshift_evolution () const
 Returns the redshift evolution in this trajectory.
const Timereference_time () const
 Returns the astrometic time of reference, at which the (quadratic) trajectory has been defined.
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 EquatorialTrack from_novas_track (const Equinox &system, const novas_track *track, const Interval &range)
 Instantiates a short-term trajectory estimate for a source in equatorial coordinates, which can be used to extrapolate the equatorial (RA/Dec) positions of the source around the specified reference time inside an interval of validity.

Additional Inherited Members

Protected Member Functions inherited from supernovas::Track< Equatorial >
 Track ()
virtual ~Track ()
Coordinate unchecked_distance (const Time &time) const
 Returns the momentary extrapolated distance, without checking if the requested time is inside the range of validity.
Angle unchecked_latitude (const Time &time) const
 Returns the momentary extrapolated latitude angle, without checking if the requested time is inside the range of validity.
Angle unchecked_longitude (const Time &time) const
 Returns the momentary extrapolated longitude angle, without checking if the requested time is inside the range of validity.
double unchecked_redshift (const Time &time) const
 Returns the momentary extrapolated redshift, without checking if the requested time is inside the range of validity.
Protected Member Functions inherited from supernovas::Validating
 Validating ()
 dummy constructor;
Protected Attributes inherited from supernovas::Validating
bool _valid = false
 the state variable.

Detailed Description

Approximate trajectory of a source in equatorial coordinates, using a local quadratic approximation around a time instant.

This may be used e.g., to control telescope drive systems in equatorial mounts, by providing instantaneous positions, rate, and acceletation along the R.A. and declination axes. Or, one may use the trajectory to obtain interpolated instantaneous R.A./Dec positions, distances, spectroscopic redshifts or radial velocities within the interval of validity, at very low computational cost.

See also
Apparent::equatorial(), HorizontalTrack

Constructor & Destructor Documentation

◆ EquatorialTrack()

supernovas::EquatorialTrack::EquatorialTrack ( const Equinox & system,
const Time & ref_time,
const Interval & range,
const ScalarEvolution & ra,
const ScalarEvolution & dec,
const ScalarEvolution & distance = ScalarEvolution::stationary(Unit::Gpc),
const ScalarEvolution & z = ScalarEvolution::undefined() )

Instantiates a short-term equatorial source trajectory on sky for a given reference time, time evolution, and time range of validity.

The returned track may be invalid if the input parameters are invalid. As such it is best practice to check on its validity before use, e.g. as:

EquatorialTrack tr(...);
if(!tr) {
// Oops, the track is not valid
return;
}
Parameters
systemthe equatorial coordinate system in which the trajectory is defined.
ref_timeastrometric reference time for which the data is defined.
rangetime range of validity around the reference time for extrapolating.
rashort-term time evolution of the right-ascention (R.A.) coordinate.
decshort-term time evolution of the declination coordinate.
distance(optional) short-term time evolution of distance (default: static at 1 Gpc).
z(optional) time evolution of redshift, including gravitational effects. If it's kinetic only, then you can leave it undefined to let the distance evolution determine it automatically.
See also
from_novas_track(), HorizontalTrack::HorizontalTrackTrack()

References supernovas::Track< Equatorial >::Track(), supernovas::Validating::is_valid(), and supernovas::Track< Equatorial >::range().

Member Function Documentation

◆ from_novas_track()

EquatorialTrack supernovas::EquatorialTrack::from_novas_track ( const Equinox & system,
const novas_track * track,
const Interval & range )
static

Instantiates a short-term trajectory estimate for a source in equatorial coordinates, which can be used to extrapolate the equatorial (RA/Dec) positions of the source around the specified reference time inside an interval of validity.

The returned track may be invalid if the input parameters are invalid. As such it is best practice to check on its validity before use, e.g. as:

EquatorialTrack tr = EquatorialTrack::from_novas_track(...);
if(!tr) {
// Oops, the track is not valid
return;
}
static EquatorialTrack from_novas_track(const Equinox &system, const novas_track *track, const Interval &range)
Instantiates a short-term trajectory estimate for a source in equatorial coordinates,...
Definition Track.cpp:602
Parameters
systemequatorial coordinate system
trackPointer to the C tajectory data structure
rangetime range of validity around the reference time. Attempts to extrapolate outside this interval will produce invalid data.
See also
HorizontalTrack::from_novas_track()

References supernovas::Validating::is_valid(), and supernovas::Track< Equatorial >::range().

Referenced by supernovas::Source::equatorial_track().

◆ projected_at()

Equatorial supernovas::EquatorialTrack::projected_at ( const Time & time) const
overridevirtual

Returns the momentary extrapolated equatorial coordinates (if valid), or else Equatorial::undefined() if the time is outside the range of validity.

It is best practice to check the valifity of the returned value before using it, e.g. as:

Equatorial eq = track.projected_at(...);
if(!eq) {
// Oops, we could not interpolate valid data
return;
}
Equatorial coordinates (RA, Dec = α, δ), representing the direction ob the sky, for a particular type...
Definition supernovas.h:838
Parameters
Time of observation and astronomical timescalesastrometric time for which we want the extrapolated value.
Returns
the momentary extrapolated equatorial coordinates (if valid), or else std::nullopt.
See also
HorizontalTrack::projected_at()

Implements supernovas::Track< Equatorial >.

References supernovas::Validating::is_valid(), supernovas::Track< Equatorial >::is_valid_at(), supernovas::Track< Equatorial >::unchecked_latitude(), supernovas::Track< Equatorial >::unchecked_longitude(), and supernovas::Equatorial::undefined().