mhuss utils 1.1.5ws

mhuss utils version 1.1.5ws
API Specification

AstroLib

See:
          Description

Packages
com.mhuss.AstroLib  
com.mhuss.Util  

 

AstroLib

A Java library of Astronomical Algorithms

com.mhuss.AstroLib

This is a library of (hopefully) useful astronomical algorithms. This library is based on a class-oriented C++ library I wrote. The C++ library, in turn, was originally based on the C source code written by Bill Gray and available at the Project Pluto website.

It has been "transmogrified" a bit since it's origins. I've changed some things, reorganized some things, and added some things, using information from Jean Meeus' excellent book Astronomical Algorithms.

The biggest differences between this code and the Bill's original code are

  1. It's in Java (duh ;-), so everything is a class or part of a class.
  2. I added a lot of static constants to avoid "magic numbers" as much as possible - there's plenty enough of those in the orbital elements and formulas!
  3. I used native types like int whereever possible, dropping Bill's original byte-frugal storage strategies. This eliminates Bill's "wrong-endian" byte alignment worries. In addition, Java only runs on 32-bit general-purpose platforms, so there's no need to fit things in a 64K segment :-).
  4. I unwound some of Bill's clever algorithm implementations. I find as I get older (and hopefully wiser) that performance can always be tweaked if necessary, but code readability needs to be "baked in."

I use this code to run the astronomical servlets on the DVAA web site, in particular, the lunar phase display on the home page, and the " Darkness Planner" information page.

Questions are welcome.

Copyright Restrictions: In the spirit of Bill's original source, you are free to use this for non-commercial purposes - but please give us a mention if you do so! For commercial usage, please contact me first.

Mark Huss - March 2003
 


History


mhuss utils 1.1.5ws

bottom text