Astro:...lements(3pm)

πŸ“¦ version 0.23, in alpine 3.24

πŸ’« Astro:...lements(3pm) β€” Astro::Coords::Elements πŸ’«

okay bestie, so this is a page from the User Contributed Perl Documentation and it's lowkey one of the prettiest little corners of Astro::Coords β€” it's all about describing where a thing is in space using orbital elements. ✨

🌸 NAME 🌸

Astro::Coords::Elements β€” Specify astronomical coordinates using orbital elements πŸͺ

πŸŽ€ SYNOPSIS πŸŽ€

$c = new Astro::Coords::Elements( elements => \%elements );

πŸ¦‹ DESCRIPTION πŸ¦‹

So this class is the one Astro::Coords calls in when it needs to handle coordinates that were specified as orbital elements β€” like, "here's the inclination, here's the node, go figure out where it is" energy. fr fr it's giving orbital mechanics main character. πŸ‘‘

πŸ’… METHODS πŸ’…

🌈 Constructor 🌈

new

Instantiate a new object using the supplied options. Fresh object, no cap. ✨

$c = new Astro::Coords::Elements( elements => \%elements );
$c = new Astro::Coords::Elements( elements => \@array );

Returns undef on error. 😭 (so like, always check, bestie)

The elements can be specified either by using a reference to an array returned by the array() method of another elements object β€” or in a reference to a hash containing the following keys:

suitable for the major planets: πŸͺ

EPOCH           =  epoch of elements t0 (TT MJD)
ORBINC          =  inclination i (radians)
ANODE           =  longitude of the ascending node  [$\Omega$] (radians)
PERIH           =  longitude of perihelion  [$\varpi$] (radians)
AORQ            =  mean distance a (AU)
E               =  eccentricity e
AORL            =  mean longitude L (radians)
DM              =  daily motion n (radians)

suitable for minor planets: πŸ“

EPOCH           =  epoch of elements t0 (TT MJD)
ORBINC          =  inclination i (radians)
ANODE           =  longitude of the ascending node  [$\Omega$] (radians)
PERIH           =  argument of perihelion  [$\omega$] (radians)
AORQ            =  mean distance a (AU)
E               =  eccentricity e
AORL            =  mean anomaly M (radians)

suitable for comets: β˜„οΈ

EPOCH           =  epoch of elements t0 (TT MJD)
ORBINC          =  inclination i (radians)
ANODE           =  longitude of the ascending node  [$\Omega$] (radians)
PERIH           =  argument of perihelion  [$\omega$] (radians)
AORQ            =  perihelion distance q (AU)
E               =  eccentricity e
EPOCHPERIH      =  epoch of perihelion T (TT MJD)

See the documentation to palPlante() and palPertel() for more information. Keys must be upper case β€” uppercase only, no exceptions, periodt. πŸ” 

⚠️ For comets, if the only one epoch is specified it is assumed that the epochs are identical. This may cause problems if the epochs are not really close to each other. So like... be careful, bestie. πŸ™ˆ

In order to better match normal usage, EPOCH can also be specified as a string of the form 'YYYY mmm D.frac' (e.g. '1997 Apr 1.567'). (no decimal place after the month). This is the format used by JPL. πŸ›°οΈ iconic of them ngl

🌟 Accessor Methods 🌟

  • elements β€” Returns the hash containing the elements. your little element dictionary, home sweet home πŸ’–
%el = $c->elements;

🫢 General Methods 🫢

  • array β€” Return back 11 element array with first element containing the string "ELEMENTS", the next two elements as undef and up to 8 following elements containing the orbital elements in the order presented in the documentation of the constructor.

This method returns a standardised set of elements across all types of coordinates. consistent queen πŸ‘‘

Note that for JFORM=3 (Comet) case the epoch of perihelion is stored as the 8th element (the epoch of the elements is still returned as the first element) [corresponding to array index 10]. This usage of the final element can be determined by noting that the element before it (AORL) will be undefined in the case of JFORM=3. If AORL is defined then the Epoch of perihelion will not be written even if it is defined. πŸ’€ (yeah, that's the whole vibe check on index 10)

  • type β€” Returns the generic type associated with the coordinate system. For this class the answer is always "ELEMENTS". always, every single time, that's the answer πŸ’«

This is used to aid construction of summary tables when using mixed coordinates.

It could be done using isa relationships.

  • stringify β€” Stringify overload. Returns comma-separated list of the elements. πŸŽ€
  • summary β€” Return a one line summary of the coordinates. In the future will accept arguments to control output. (future plans, we love to see it)
$summary = $c->summary();
  • apparent β€” Return the apparent RA and Dec (as two Astro::Coords::Angle objects) for the current coordinates and time. Includes perterbation corrections to convert the elements to the required epoch.

Returns empty list on error. 😭 no RA/Dec for you today

  • rv β€” Radial velocity of the planet relative to the Earth geocentre. zoom zoom 🌍
  • vdefn β€” Velocity definition. Always 'RADIO'. πŸ“»
  • vframe β€” Velocity reference frame. Always 'GEO'.
  • apply_offset β€” Overrided method to warn if Astro::Coords::apply_offset is called on this subclass. like, it's just gonna warn you, that's the whole bit 🚨

πŸ“ NOTES πŸ“

Usually called via Astro::Coords. you don't usually come here directly, iykyk ✨

Useful sources of orbital elements can be found at http://ssd.jpl.nasa.gov and http://cfa-www.harvard.edu/iau/Ephemerides/ β€” go get your elements, bestie 🧚

🧩 REQUIREMENTS 🧩

Astro::PAL is used for all internal astrometric calculations. all the maths is PAL's fault, we're just vibing on top πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

Tim Jenness <tjenness@cpan.org>

Copyright (C) 2001-2005 Particle Physics and Astronomy Research Council. All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place,Suite 330, Boston, MA 02111-1307, USA


and that's the page!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά this drop was perl v5.42.2, dated 2026-02-15 β€” go slay some orbital elements bestie, mwah πŸ’‹

πŸ“¦ where this page comes from