Astro:...elpers(3pm)
π Astro:...elpers(3pm) β the bestie's guide
okay so real talk: this is Astro::Montenbruck::Helpers, it lives in the 3pm section of the manual (user contributed perl docs, if you were wondering π), and it's basically the little helper squad that does the string-y grunt work so your scripts don't have to. no cap.
π VERSION
Version 1.00 β she's v1.00 and she's thriving β¨
π NAME
Astro::Montenbruck::Helpers β helper functions for scripts. that's it, that's the whole vibe π«Ά
πΈ DESCRIPTION
Helper functions for scripts, mainly string related. like, they're the friends who show up with a label maker when you're formatting coordinates at 2am. lowkey essential, highkey underrated π
β¨ EXPORT
here's the whole squad, exported and ready to go π
parse_geocoords(l => number, m => number)dmsz_str($x, decimal => boolean)dms_str($x)dms_or_dec_str($x, decimal => boolean, places => N, sign => boolean)hms_str($x, $decimal => boolean)latde_str($h, $decimal => boolean)
π¦ FUNCTIONS
π§ parse_geocoords(l => number, m => number)
Parse geographical coordinates. it takes your raw numbers and hands you back something pretty.
Named Arguments:
lβ longitude in degreesmβ latitude in degrees
Returns:
A list of formatted longitude and latitude, e.g: 037E35, "55N45". cute, right? π«
π dmsz_str($x, decimal => boolean)
Given ecliptic longitude $x, return a string with the Zodiac position: "12:30 Aqu" or "312.50 Aqu", depending on the decimal option. the way it just knows which sign you're in π
Options:
decimalβ return decimal degrees instead of degrees and minutes.
π dms_str($x)
Given ecliptic longitude $x, return a string of formatted degrees, minutes and seconds, e.g.: "312:30:02". full three-part glamour, no shortcuts π
β dms_or_dec_str($x, decimal => boolean, places => N, sign => boolean)
Format ecliptic longitude $x. the flexible icon of the group.
Options:
decimalβ return decimal degrees instead of degrees and minutes. Default is false.placesβ number of arc-degrees digits. If"$x = 1",3gives001,2gives01,1gives1. Default is3.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. hours, minutes, seconds β the whole clock aesthetic β°
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. this one eats, fr fr.
Arguments:
$latβ latitude, degrees, positive northward$latβ longitude, degrees, positive westward
π not me pointing out that the second argument is also labelled $lat up there β that's literally what the page says, so I'm passing it along verbatim, bestie. no edits, no cap.
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". iconic behaviour πβ¨
π«Ά SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Astro::Montenbruck::CoCo
π yes, the page really saysAstro::Montenbruck::CoCothere and not...::Helpers. I'm just the messenger, don't come for me.
πΈ AUTHOR
Sergey Krushinsky, "<krushi at cpan.org>" β shoutout to the legend who built the squad π
π 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.
and that's the whole page, bestie π this gem is documented by the perl peeps, version perl v5.42.2, dated 2026-02-15, and it's filed under Astro:...elpers(3pm) in case you need to find her again. go format some coordinates, you absolute main character πβ¨π¦
π¦ where this page comes from
- alpine 3.24: perl-astro-montenbruck-doc 1.26-r1 Β· Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms