Astro:...elpers(3pm)

πŸ“¦ version 1.26, in alpine 3.24

πŸ’… 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 degrees
  • m β€” 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", 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. 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 says Astro::Montenbruck::CoCo there 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 (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