++ed by:
1 non-PAUSE user
Author image Sergey Krushinsky
and 1 contributors

NAME

Astro::Montenbruck::Helpers - Helper functions for scripts.

VERSION

Version 1.00

DESCRIPTION

Helper functions for scripts, mainly string related.

EXPORT

FUNCTIONS

parse_geocoords(l => number, m => number)

Parse geographical coordinates

Named Arguments

  • l — longitude in degrees

  • m — latitude in degrees

Returns

List of formatted longitude and latitude, e.g: 037E35, 55N45.

dmsz_str($x, decimal => boolean)

Given ecliptic longitude $x, return string with Zodiac position: 12:30 Aqu or 312.50 Aqu depending on decimal option.

Options

  • decimal — return decimal degrees instead of degrees and minutes.

dms_str($x)

Given ecliptic longitude $x, return string of formatted degrees, minutes and seconds, e.g.: 312:30:02.

dms_or_dec_str($x, decimal => boolean, places => N, sign => boolean)

Format ecliptic longitude $x.

Options

  • decimal — return decimal degrees instead of degrees and minutes. Default is false

  • places — number of arc-degrees digits. If $x = 1, 3 gives 001, 2 gives 01, 1 gives 1. Default is 3

  • sign — if true, the number will be prefixed with + or -, depending on its sign. Default: false.

hms_str($x, $decimal => boolean)

Format time value $x.

Options

  • decimal — return decimal degrees instead of degrees and minutes.

latde_str($h, $decimal => boolean)

Format time value $h.

Options

  • decimal — return decimal degrees instead of degrees and minutes.

format_geo( $lat, $lon)

Format geographical latitude and longitude.

Arguments

  • $lat — latitude, degrees, positive northward

  • $lat — longitude, degrees, positive westward

Return

A string DD[N|S]MM, DDD[W|E]MM. For instance, latitude 55.75 and longitude -37.58 will be formatted to 55N45, 037E35.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Astro::Montenbruck::CoCo

AUTHOR

Sergey Krushinsky, <krushi at cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009-2019 by Sergey Krushinsky

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.