Loading...
Searching...
No Matches
supernovas::HorizontalTrack Class Reference
Telescope tracking

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

`#include <supernovas.h>`

Inheritance diagram for supernovas::HorizontalTrack:

## Public Member Functions

| HorizontalTrack (const Time &ref_time, const Interval &range, const ScalarEvolution &azimuth, const ScalarEvolution &elevation, const ScalarEvolution &distance=ScalarEvolution::stationary(Unit::Gpc), const ScalarEvolution &z=ScalarEvolution::undefined())
| Instantiates a short-term horizontal source trajectory on sky for a given reference time, time evolution, and time range of validity.
Horizontal | projected_at (const Time &time) const override
| Returns the momentary extrapolated horizontal coordinates (if valid), or else Horizontal::undefined() if the time is outside the range of validity.
Public Member Functions inherited from supernovas::Track< Horizontal >
Coordinate | distance_at (const Time &time) const
| Returns the momentary extrapolated distance (if valid), which may be invalid if the time is outside the range of validity.
const ScalarEvolution & | distance_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), which may be invalid if the time is outside the range of validity.
const ScalarEvolution & | latitude_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), which may be invalid if the time is outside the range of validity.
const ScalarEvolution & | longitude_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), which may be invalid if the time is outside the range of validity.
const Interval & | range () 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 ScalarEvolution & | redshift_evolution () const
| Returns the redshift evolution in this trajectory.
const Time & | reference_time () const
| Returns the astrometric 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' state 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 HorizontalTrack | from_novas_track (const novas_track *track, const Interval &range)
| Instantiates a short-term trajectory estimate for a source in horizontal coordinates, which can be used to extrapolate the horizontal (Az/El) positions of the source around the specified reference time inside an interval of validity.
static const HorizontalTrack & | undefined ()
| Returns a reference to a static instance of a standard undefined horizontal source trajectory.

## Additional Inherited Members

Protected Member Functions inherited from supernovas::Track< Horizontal >
| 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 horizontal coordinates, using a local quadratic approximation around a time instant.

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

Since
  1.6

See also
  Apparent::horizontal(), EquatorialTrack

## Constructor & Destructor Documentation

## HorizontalTrack()

supernovas::HorizontalTrack::HorizontalTrack | ( | const Time & | ref_time,
|  | const Interval & | range,
|  | const ScalarEvolution & | azimuth,
|  | const ScalarEvolution & | elevation,
|  | const ScalarEvolution & | distance = ScalarEvolution::stationary(Unit::Gpc),
|  | const ScalarEvolution & | z = ScalarEvolution::undefined() )

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

Parameters

  ref_time | astrometric reference time for which the data is defined.
  range | time range of validity around the reference time for extrapolating.
  azimuth | short-term time evolution of the azimuth coordinate.
  elevation | short-term time evolution of the elevation 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.

Since
  1.6

See also
  from_novas_track(), EquatorialTrack::EquatorialTrack()

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

## Member Function Documentation

## from_novas_track()

HorizontalTrack supernovas::HorizontalTrack::from_novas_track | ( | const novas_track * | track,
|  | const Interval & | range )

static

Instantiates a short-term trajectory estimate for a source in horizontal coordinates, which can be used to extrapolate the horizontal (Az/El) 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:

HorizontalTrack tr = HorizontalTrack::from_novas_track(...);
if(!tr) {
// Oops, the track is not valid
return;
}
supernovas::HorizontalTrack::from_novas_track
static HorizontalTrack from_novas_track(const novas_track *track, const Interval &range)
Instantiates a short-term trajectory estimate for a source in horizontal coordinates,...
Definition Track.cpp:490

Parameters

  track | Pointer to the C trajectory data structure
  range | time range of validity around the reference time. Attempts to extrapolate outside this interval will produce invalid data.

Since
  1.6

See also
  EquatorialTrack::from_novas_track()

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

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

## projected_at()

Horizontal supernovas::HorizontalTrack::projected_at | ( | const Time & | time | ) | const

override virtual

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

It is best practice to check on its validity before use, e.g. as:

Horizontal hor = track.projected_at(...);
if(!hor) {
// Oops, not valid
return;
}
supernovas::Horizontal
Horizontal (azimuth, elevation = Az/El) sky coordinates at a geodetic observing location,...
Definition supernovas.h:2713

Parameters

  time | astrometric time for which we want the extrapolated value.

Returns
  the momentary extrapolated horizontal coordinates (if valid), or else undefined (invalid) horizontal coordinates.

Since
  1.6

See also
  EquatorialTrack::projected_at()

Implements supernovas::Track< Horizontal >.

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

## undefined()

const HorizontalTrack & supernovas::HorizontalTrack::undefined | ( |  | ) |

static

Returns a reference to a static instance of a standard undefined horizontal source trajectory.

Returns
  the reference to a standard undefined horizontal track.

Since
  1.6

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