RFC: Astro::ECI (or Astro::Coord::ECI, or ...)



All,

I have been attempting to put together some satellite tracking (or at least observing) modules in Perl. The code has fallen into three (so far) modules: one representing the satellite, one representing the Sun, and a superclass representing "static" (i.e. Earthbound) coordinates and providing all the coordinate transformations. For the sake of discussion, call the superclass Astro::ECI (for Earth-Centered Inertial), and the subclasses Astro::ECI::TLE (for Two- (or three-, both are handled) Line Element), and Astro::ECI::Sun (an exercise for the student).

The question is, what should I actually call these things? Does Astro::TLE cut it, or do people think something like Astro::Coord::TLE would be better? Or something else? I assume that if the superclass changes names the subclasses will too, though Perl does not require it.

There's about 50% overlap between Astro::ECI (or whatever) and Astro::Coords. The differences that come to mind are:

* Astro::Coords doesn't seem to be interested in the Earthbound side of things. Astro::ECI does ECI (of course), geocentric Cartesian, geocentric latitude/longitude, and geodetic latitude/longitude, with a mechanism for user-defined reference ellipsoids. Different objects can use different ellipsoids

* Astro::Coords relies on Astro::SLA and SLALIB, whereas Astro::ECI is pure Perl.

* Astro::ECI is designed to be the superclass for a position predictor. I can't really say about Astro::Coords.

* Astro::Coords spends a fair amount of time and effort worrying about alternate representations of data (hour angles, degrees/minutes/seconds of arc ...). Astro::ECI is radians and kilometers, period.

* Astro::Coords uses either Time::Piece or DateTime objects. Currently, Astro::TLE uses scalar times, though it may support DateTime in the future (and the check is in the mail ...).

* Astro::Coords is published under the GPL. I intend to publish under the Perl Artistic License.

There's not as much overlap between the proposed Astro::ECI::Sun (or whatever) and the Astro::Sun.* modules as might appear. Astro::ECI::Sun calculates the position of the Sun at any given time, whereas the Astro::Sun.* modules calculate local sunrise/sunset. The superclass provides a method that gets you sunrise and sunset (or begin/end twilight), and another for meridian passage (local noon, local midnight). I _think_ that Astro::Coords will give the position of the Sun and Moon, at least.

Astro::ECI::TLE implements the NORAD SGP.* and SDP.* orbital models. If there's anything remotely similar in CPAN, I haven't found it.

Both suggestions and metasuggestions (i.e. possible additional or alternate places to take the questions) are welcome. I can't guarantee what will come out of all this, because I still need to figure out what permissions I need before I publish, and whether I can get them.

Thanks,
Tom Wyant (mailing address to the contrary notwithstanding)
.



Relevant Pages

  • Re: Reference overloading helps inheritance
    ... AS> Inheritance in Perl OO has its difficulties when it comes to data ... AS> implementation of the superclass. ... AS> Time::Piece does, this means I can compare tapes with each other, or ... Search or Offer Perl Jobs ...
    (comp.lang.perl.misc)
  • Re: Overridden methods
    ... It's a more advanced question than most, ... >> If a sublass has overrides a method in a superclass, ... Perl does not enforce private and public parts of its modules as you may ...
    (perl.beginners)
  • Re: Recursive Directory Copy (with resource forks) in Mac OS X
    ... this is due to its reliance on the copymethod in the superclass ... And all of this is due to the fact that perl does not ... resource forks in Mac OS 10.4 or later). ...
    (comp.lang.perl.misc)
  • Check for extension.
    ... I think this might be a regular expression type of thing. ... I need to check that a string variable, representing a save file name ends ... I know how to do this in perl... ... my $filename = "fred"; ...
    (comp.lang.pascal.delphi.misc)