- azel
- Return Azimuth and elevation for the currently stored time and telescope.
If no telescope is present the equator is used. Returns the Az and El as
"Astro::Coords::Angle" objects.
($az, $el) = $c->azel();
- ra_app
- Apparent RA for the current time.
$ra_app = $c->ra_app( format => "s" );
See "NOTES" for details on the supported format
specifiers and default calling convention.
- dec_app
- Apparent Dec for the currently stored time.
$dec_app = $c->dec_app( format => "s" );
See "NOTES" for details on the supported format
specifiers and default calling convention.
- ha
- Get the hour angle for the currently stored LST. By default HA is returned
as an "Astro::Coords::Angle::Hour"
object.
$ha = $c->ha;
$ha = $c->ha( format => "h" );
By default the Hour Angle will be normalised to +/- 12h if an
explicit format is specified.
See "NOTES" for details on the supported format
specifiers and default calling convention.
- az
- Azimuth of the source for the currently stored time at the current
telescope. See "NOTES" for details on the supported format
specifiers and default calling convention.
$az = $c->az();
If no telescope is defined the equator is used.
- el
- Elevation of the source for the currently stored time at the current
telescope. See "NOTES" for details on the supported format
specifiers and default calling convention.
$el = $c->el();
If no telescope is defined the equator is used.
- airmass
- Airmass of the source for the currently stored time at the current
telescope.
$am = $c->airmass();
Value determined from the current elevation.
- radec
- Return the J2000 Right Ascension and Declination for the target. Unless
overridden by a subclass, this converts from the apparent RA/Dec to J2000.
Returns two "Astro::Coords::Angle"
objects.
($ra, $dec) = $c->radec();
- ra
- Return the J2000 Right ascension for the target. Unless overridden by a
subclass this converts the apparent RA/Dec to J2000.
$ra2000 = $c->ra( format => "s" );
Calls the "radec" method.
See "NOTES" for details on the supported format specifiers and
default calling convention.
- dec
- Return the J2000 declination for the target. Unless overridden by a
subclass this converts the apparent RA/Dec to J2000.
$dec2000 = $c->dec( format => "s" );
Calls the "radec" method.
See "NOTES" for details on the supported format specifiers and
default calling convention.
- glong
- Return Galactic longitude. See "NOTES" for details on the
supported format specifiers and default calling convention.
$glong = $c->glong( format => "s" );
- glat
- Return Galactic latitude. See "NOTES" for details on the
supported format specifiers and default calling convention.
$glat = $c->glat( format => "s" );
- sglong
- Return SuperGalactic longitude. See "NOTES" for details on the
supported format specifiers and default calling convention.
$sglong = $c->sglong( format => "s" );
- sglat
- Return SuperGalactic latitude. See "NOTES" for details on the
supported format specifiers and default calling convention.
$glat = $c->sglat( format => "s" );
- ecllong
- Return Ecliptic longitude. See "NOTES" for details on the
supported format specifiers and default calling convention.
$eclong = $c->ecllong( format => "s" );
- ecllat
- Return ecliptic latitude. See "NOTES" for details on the
supported format specifiers and default calling convention.
$eclat = $c->ecllat( format => "s" );
- glonglat
- Calculate Galactic longitude and latitude. Position is calculated for the
current ra/dec position (as returned by the
"radec" method).
($long, $lat) = $c->glonglat;
Answer is returned as two
"Astro::Coords::Angle" objects.
- sglonglat
- Calculate Super Galactic longitude and latitude.
($slong, $slat) = $c->sglonglat;
Answer is returned as two
"Astro::Coords::Angle" objects.
- ecllonglat
- Calculate the ecliptic longitude and latitude for the epoch stored in the
object. Position is calculated for the current ra/dec position (as
returned by the "radec" method.
($long, $lat) = $c->ecllonglat();
Answer is returned as two
"Astro::Coords::Angle" objects.
- radec2000
- Convenience wrapper routine to return the J2000 coordinates for epoch
2000.0. This is not the same as calling the
"radec" method with equinox J2000.0.
($ra2000, $dec2000) = $c->radec2000;
It is equivalent to setting the epoch in the object to 2000.0
(ie midday on 2000 January 1) and then calling
"radec".
The answer will be location dependent in most cases.
Results are returned as two
"Astro::Coords::Angle" objects.
- radec1950
- Convenience wrapper to return the FK4 B1950 coordinates for the currently
defined epoch. Since the FK4 to FK5 conversion requires an epoch, the
J2000 coordinates are first calculated for the current epoch and the frame
conversion is done to epoch B1950.
This is technically not the same as calling the radec()
method with equinox B1950 since that would use the current epoch
associated with the coordinates when converting from FK4 to FK5.
In the base class these are calculated by precessing the J2000
RA/Dec for the current date and time, which are themselves derived from
the apparent RA/Dec for the current time.
($ra, $dec) = $c->radec1950;
Results are returned as two
"Astro::Coords::Angle" objects.
- pa
- Parallactic angle of the source for the currently stored time at the
current telescope. See "NOTES" for details on the supported
format specifiers and default calling convention.
$pa = $c->pa();
$padeg = $c->pa( format => 'deg' );
If no telescope is defined the equator is used.
- isObservable
- Determine whether the coordinates are accessible for the current time and
telescope.
$isobs = $c->isObservable;
Returns false if a telescope has not been specified (see the
"telescope" method) or if the
specified telescope does not know its own limits.
- array
- Return a summary of this object in the form of an array containing the
following:
coordinate type (eg PLANET, RADEC, MARS)
ra2000 (J2000 RA in radians [for equatorial])
dec2000 (J2000 dec in radians [for equatorial])
elements (up to 8 orbital elements)
- distance
- Calculate the distance (on the tangent plane) between the current
coordinate and a supplied coordinate.
$dist = $c->distance( $c2 );
@dist = $c->distance( $c2 );
In scalar context the distance is returned as an
"Astro::Coords::Angle" object In list
context returns the individual "x" and "y" offsets
(as "Astro::Coords::Angle"
objects).
Returns undef if there was an error during the calculation
(e.g. because the new coordinate was too far away).
- status
- Return a status string describing the current coordinates. This consists
of the current elevation, azimuth, hour angle and declination. If a
telescope is defined the observability of the target is included.
$status = $c->status;
- calculate
- Calculate target positions for a range of times.
@data = $c->calculate( start => $start,
end => $end,
inc => $increment,
units => 'deg'
);
The start and end times are either
"Time::Piece" or
"DateTime" objects and the increment
is either a "Time::Seconds" object, a
"DateTime::Duration" object (in fact,
an object that implements the
"seconds" method) or an integer. If
the end time will not necessarily be used explictly if the increment
does not divide into the total time gap exactly. None of the returned
times will exceed the end time. The increment must be greater than zero
but the start and end times can be identical.
Returns an array of hashes. Each hash contains
time [same object class as provided as argument]
elevation
azimuth
parang
lst [always in radians]
The angles are in the units specified (radians, degrees or
sexagesimal). They will be Angle objects if no units are specified.
Note that this method returns
"DateTime" objects if it was given
"DateTime" objects, else it returns
"Time::Piece" objects.
After running, the original time associated with the object
will be retained.
- rise_time
- Time at which the target will appear above the horizon. By default the
calculation is for the next rise time relative to the current reference
time. If the "event" key is used, this can control which rise
time will be returned. For event=1, this indicates the following rise (the
default), event=-1 indicates a previous rise and event=0 indicates the
nearest source rising to the current reference time.
If the "nearest" key is set in the argument hash,
this is synonymous with event=0 and supercedes the event key.
Returns "undef" if the
target is never visible or never sets. An optional argument can be given
specifying a different elevation to the horizon (in radians).
$t = $c->set_time();
$t = $c->set_time( horizon => $el );
$t = $c->set_time( nearest => 1 );
$t = $c->set_time( event => -1 );
Returns a "Time::Piece"
object or a "DateTime" object
depending on the type of object that is returned by the
"datetime" method.
For some occasions the calculation will be performed twice,
once for the meridian transit before the reference time and once for the
transit after the reference time.
Does not distinguish a source that never rises from a source
that never sets. Both will return undef for the rise time.
Next and previous depend on the adjacent transits. The routine
will not step forward multiple days looking for a rise time if the
source is not going to rise before the next or previous transit.
- set_time
- Time at which the target will set below the horizon. By default the
calculation is the next set time from the current reference time. If the
"event" key is used, this can control which set time will be
returned. For event=1, this indicates the following set (the default),
event=-1 indicates a previous set and event=0 indicates the nearest source
setting to the current reference time.
If the "nearest" key is set in the argument hash,
this is synonymous with event=0 and supercedes the event key.
Returns "undef" if the
target is never visible or never sets. An optional argument can be given
specifying a different elevation to the horizon (in radians).
$t = $c->set_time();
$t = $c->set_time( horizon => $el );
$t = $c->set_time( nearest => 1 );
$t = $c->set_time( event => -1 );
Returns a "Time::Piece"
object or a "DateTime" object
depending on the type of object that is returned by the
"datetime" method.
For some occasions the calculation will be performed twice,
once for the meridian transit before the reference time and once for the
transit after the reference time.
Does not distinguish a source that never rises from a source
that never sets. Both will return undef for the set time.
Next and previous depend on the adjacent transits. The routine
will not step forward multiple days looking for a set time if the source
is not going to set following the next or previous transit.
- ha_set
- Hour angle at which the target will set. Negate this value to obtain the
rise time. By default assumes the target sets at an elevation of 0 degrees
(except for the Sun and Moon which are special-cased). An optional hash
can be given with key of "horizon" specifying a different
elevation (in radians).
$ha = $c->ha_set;
$ha = $c->ha_set( horizon => $el );
Returned by default as an
"Astro::Coords::Angle::Hour" object
unless an explicit "format" is specified.
$ha = $c->ha_set( horizon => $el, format => 'h');
There are predefined elevations for events such as Sun
rise/set and Twilight (only relevant if your object refers to the Sun).
See "CONSTANTS" for more information.
Returns "undef" if the
target never reaches the specified horizon. (maybe it is
circumpolar).
For the Sun and moon this calculation will not be very
accurate since it depends on the time for which the calculation is to be
performed (the time is not used by this routine) and the rise Hour Angle
and setting Hour Angle will differ (especially for the moon) . These
effects are corrected for by the
"rise_time" and
"set_time" methods.
In some cases for the Moon, an iterative technique is used to
calculate the hour angle when the Moon is near transit (the simple
geometrical arguments do not correctly calculate the transit
elevation).
- meridian_time
- Calculate the meridian time for this target (the time at which the source
transits).
MT(UT) = apparent RA - LST(UT=0)
By default the next transit following the current time is
calculated and returned as a
"Time::Piece" or
"DateTime" object (depending on what
is stored in "datetime").
If you want control over which transit should be calculated
this can be specified using the "event" hash key:
$mt = $c->meridian_time( event => 1 );
$mt = $c->meridian_time( event => 0 );
$mt = $c->meridian_time( event => -1 );
A value of "1" indicates the next transit following
the current reference time (this is the default behaviour for reasons of
backwards compatibility). A value of "-1" indicates that the
closest transit event before the reference time should be used. A valud
of "0" indicates that the nearest transit event should be
returned. If the parameter value is not one of the above, it will
default to "1".
A synonym for event=>0 is provided by using the
"nearest" key. If present and true, this key overrides
"event". If present and false the "event" key is
used (defaulting to "1" if event indicates
"nearest"=1).
$mt = $c->meridian_time( nearest => 1 );
- transit_el
- Elevation at transit. This is just the elevation at Hour Angle = 0.0. (ie
at "meridian_time").
Format is supported as for the
"el" method. See "NOTES" for
details on the supported format specifiers and default calling
convention.
$el = $c->transit_el( format => 'deg' );
- apply_offset
- Applies the offsets of an
"Astro::Coords::Offset" object.
my $coords_offset = $coords->apply_offset($offset);
The current implementation works by calling
"radec2000" or
"glonglat" on the original object and
will return a new
"Astro::Coords::Equatorial"
object.