Astro::Nova::GalPosn - Perl representation of a libnova ln_gal_posn


Astro-Nova documentation  | view source Contained in the Astro-Nova distribution.

Index


NAME

Top

Astro::Nova::GalPosn - Perl representation of a libnova ln_gal_posn

SYNOPSIS

Top

  use Astro::Nova qw(functions ...);
  my $date = Astro::Nova::GalPosn->new();
  $date->set_year(...);
  # ...
  print $date->as_ascii(), "\n";
  my @members = $date->get_all();

DESCRIPTION

Top

This class represents a libnova ln_gal_posn struct. The struct has the following layout:

  ln_gal_posn {
    double  l # galactic longitude
    double  b # galactic latitude
  }

METHODS

Top

new

Constructor returns a new Astro::Nova::GalPosn. Optionally takes key/value pairs for setting the struct members. Extra arguments are ignored. Uninitialized struct members are set to zero.

get_... / set_...

Get or set any of the class attributes. (See list above)

get_all

Returns all members as a list.

set_all

Sets all members. Takes a list of values which must be in the order shown above. Any missing values are ignored, undefs are skipped.

as_ascii

Returns a human-readable ASCII table of the date information.

members

Returns a list of all members in order.

to_equatorial_B1950 / to_equatorial_J2000

Convert to equatorial coordinates with respect to the B1950 or J2000 epochs (returns an Astro::Nova::EquPosn object).

from_equatorial_B1950 / from_equatorial_J2000

When called as a class method, creates a new Astro::Nova::GalPosn object from the given Astro::Nova::EquPosn object. Uses the B1950/J2000 epochs according to the method name.

When called as an object method, sets the current object's state instead.

SEE ALSO

Top

Astro::Nova

libnova website: http://libnova.sourceforge.net/

AUTHOR

Top

Steffen Mueller, <smueller@cpan.org>

COPYRIGHT AND LICENSE

Top


Astro-Nova documentation  | view source Contained in the Astro-Nova distribution.