Celestial AlgorithmsJava Algorithms for Celestial ComputationSuitable for Navigation and Astronomy |
Mainly based on Jean MEEUS' "Astronomical Algorithms".
Check out the project page, where you can download sources and binaries from.
Check out the javadoc.
For any message or request you'd have regarding this project, please use sourceforge messaging service, from the project page. On the right column (Developer Info), use the [View Members] link to send emails. Thanks!
We intend here to provide a couple of samples, regarding the way to use what is provided on the project page.
Related - and valuated - links:
+------------------------------+ ! Celestial Computer Dashboard ! +------------------------------+ J. Java version A. Ephemerides for one day B. Ephemerides for one month C. Ephemerides for one year D. Basic Dead Reckoning E. Basic Dead Reckoning with Almanac Data F. Basic Dead Reckoning (with Swing UI) G. Real Time data (with Swing UI) H. Current Config I. Lunar Distances K. Lunar Distances (with Swing UI) L. Lunar Distances Publisher --------------------------------------- Q. Quit --------------------------------------- Type the letter and press Enter:
Prompt> chmod +x celest
We will use in the following examples the jar-file called CelestialComputer.jar, provided from the downloaded section on sourceforge.
Current Configuration |
Back to Content |
Prompt> java -classpath CelestialComputer.jar main.Main Current Time:Thu, 18 Mar 2004 12:48:29 -0800 Required date and time (current GMT) : 2004-03-18 20:48:29 GHA Sun : 130°09.54' SHA Sun : 001°17.58' DEC Sun : S 00°33.64' SD Sun : 16.1' HP Sun : 0.1' EOT : -07m 50.8s GHAmoon : 152°06.29' SHAmoon : 023°14.33' DECmoon : S 14°51.99' SDmoon : 15.7' HPmoon : 57.7' Illum : 5.0% (-) GHA Aries : 128°51.96' GHApolaris: 090°12.55' SHApolaris: 321°20.59' DECpolaris: N 89°17.17' GMST : 128°52.13' GAST : 128°51.96' EoE : -0.682s delta_psi : -11.154" delta_eps : 7.293" OoE : 23°26'19.476" tOoE : 23°26'26.769" JD : 2453083.367002 JDE : 2453083.367002 LDS : 025°58.72' DoW : THU Moon-Sun deltaHA : 334°26.31'(26.01 day(s)) Between last quarter and new (Process completed in 20 ms)
Data Publisher |
Back to Content |
Prompt> java -classpath CelestialComputer.jar astro.runtime.DataPublisher Year > 2004 Month > 3 Day > 18 Hour Angle (1) or Right Ascension (2) ? > [1] 1 Angles in Degrees Minutes 100th of minutes (1) or Degrees Minutes Seconds (2) ? > [1] 1 +-------------------------------------------------------------------------------------------------------------------+ | Ephemerides for thu 18-Mar-2004 | +----+------------+------------+-----------------------------------------+------------------------------------------+ | | Equation | Aries | Sun | Moon | | UT | of |------------+-----------------------------------------+------------------------------------------+ | | Time | GHA | GHA | Dec | sd | hp | GHA | Dec | sd | hp | +----+------------+------------+------------+-------------+-------+------+------------+-------------+-------+-------+ | 00 | -08m 06.0s | 175°53.44' | 177°58.51' - S 00°54.22' | 16.1' | 0.1' | 210°34.42' - S 19°13.76' | 15.8' | 58.1' | | 01 | -08m 05.2s | 190°55.90' | 192°58.69' - S 00°53.23' | 16.1' | 0.1' | 225°02.94' - S 19°02.05' | 15.8' | 58.0' | | 02 | -08m 04.5s | 205°58.37' | 207°58.87' - S 00°52.24' | 16.1' | 0.1' | 239°31.57' - S 18°50.23' | 15.8' | 58.0' | | 03 | -08m 03.8s | 221°00.83' | 222°59.05' - S 00°51.25' | 16.1' | 0.1' | 254°00.29' - S 18°38.32' | 15.8' | 58.0' | | 04 | -08m 03.1s | 236°03.29' | 237°59.23' - S 00°50.27' | 16.1' | 0.1' | 268°29.11' - S 18°26.32' | 15.8' | 58.0' | | 05 | -08m 02.3s | 251°05.76' | 252°59.42' - S 00°49.28' | 16.1' | 0.1' | 282°58.02' - S 18°14.22' | 15.8' | 58.0' | | 06 | -08m 01.6s | 266°08.22' | 267°59.60' - S 00°48.29' | 16.1' | 0.1' | 297°27.03' - S 18°02.04' | 15.8' | 58.0' | | 07 | -08m 00.9s | 281°10.69' | 282°59.78' - S 00°47.30' | 16.1' | 0.1' | 311°56.14' - S 17°49.76' | 15.8' | 57.9' | | 08 | -08m 00.2s | 296°13.15' | 297°59.96' - S 00°46.31' | 16.1' | 0.1' | 326°25.34' - S 17°37.40' | 15.8' | 57.9' | | 09 | -07m 59.4s | 311°15.61' | 313°00.14' - S 00°45.32' | 16.1' | 0.1' | 340°54.64' - S 17°24.95' | 15.8' | 57.9' | | 10 | -07m 58.7s | 326°18.08' | 328°00.32' - S 00°44.33' | 16.1' | 0.1' | 355°24.03' - S 17°12.42' | 15.8' | 57.9' | | 11 | -07m 58.0s | 341°20.54' | 343°00.51' - S 00°43.34' | 16.1' | 0.1' | 009°53.52' - S 16°59.80' | 15.8' | 57.9' | | 12 | -07m 57.3s | 356°23.01' | 358°00.69' - S 00°42.35' | 16.1' | 0.1' | 024°23.09' - S 16°47.10' | 15.8' | 57.8' | | 13 | -07m 56.5s | 011°25.47' | 013°00.87' - S 00°41.36' | 16.1' | 0.1' | 038°52.76' - S 16°34.32' | 15.8' | 57.8' | | 14 | -07m 55.8s | 026°27.93' | 028°01.05' - S 00°40.38' | 16.1' | 0.1' | 053°22.52' - S 16°21.47' | 15.8' | 57.8' | | 15 | -07m 55.1s | 041°30.40' | 043°01.23' - S 00°39.39' | 16.1' | 0.1' | 067°52.38' - S 16°08.54' | 15.7' | 57.8' | | 16 | -07m 54.3s | 056°32.86' | 058°01.42' - S 00°38.40' | 16.1' | 0.1' | 082°22.32' - S 15°55.53' | 15.7' | 57.8' | | 17 | -07m 53.6s | 071°35.33' | 073°01.60' - S 00°37.41' | 16.1' | 0.1' | 096°52.35' - S 15°42.45' | 15.7' | 57.7' | | 18 | -07m 52.9s | 086°37.79' | 088°01.78' - S 00°36.42' | 16.1' | 0.1' | 111°22.47' - S 15°29.29' | 15.7' | 57.7' | | 19 | -07m 52.2s | 101°40.25' | 103°01.96' - S 00°35.43' | 16.1' | 0.1' | 125°52.68' - S 15°16.07' | 15.7' | 57.7' | | 20 | -07m 51.4s | 116°42.72' | 118°02.14' - S 00°34.44' | 16.1' | 0.1' | 140°22.98' - S 15°02.78' | 15.7' | 57.7' | | 21 | -07m 50.7s | 131°45.18' | 133°02.33' - S 00°33.45' | 16.1' | 0.1' | 154°53.36' - S 14°49.42' | 15.7' | 57.7' | | 22 | -07m 50.0s | 146°47.65' | 148°02.51' - S 00°32.46' | 16.1' | 0.1' | 169°23.83' - S 14°35.99' | 15.7' | 57.6' | | 23 | -07m 49.2s | 161°50.11' | 163°02.69' - S 00°31.48' | 16.1' | 0.1' | 183°54.39' - S 14°22.50' | 15.7' | 57.6' | | 24 | -07m 48.5s | 176°52.57' | 178°02.88' - S 00°30.49' | 16.1' | 0.1' | 198°25.02' - S 14°08.95' | 15.7' | 57.6' | +----+------------+------------+------------+-------------+-------+------+------------+-------------+-------+-------+ | Sun Meridian Passage : 12:07:57.251 | | Moon Meridian Passage : 10:19:02.616 | | Moon Anti-Meridian Passage : 22:43:50.745 | | Moon Age : 25.65 - Phase : 6.9% (-) | +-------------------------------------------+ Between last quarter and newIt is also possible to publish Ephemerides Data for a given period. This is what is actually done in the Windows scripts described and available from here.
Dead Reckoning |
Back to Content |
Prompt> java -classpath CelestialComputer.jar main.DeadReckoningMain GHA > Deg : 137 GHA > Min : 44.55 Declination > Deg : 21 Declination > Min : 50.3 North[N] or South[S] > s Assumed Latitude > Deg : 37 Assumed Latitude > Min : 35 North[N] or South[S] > n Assumed Longitude > Deg : 122 Assumed Longitude > Min : 0 Est[E] or West[W] > w Est. Alt. : 28°45.53' aZimuth : 196°41.71' Eye Height above sea level (meters) :1.8 Corr. Alt. : 28°57.69' Done.
Dead Reckoning, with Data |
Back to Content |
Prompt> java -classpath CelestialComputer.jar astro.runtime.Minimal Enter UT: Year [9999] :2004 Month [99] :3 Day [99] :1 Hours [99] :22 Minutes [99] :9 Seconds [99] :0 For Mon, 1 Mar 2004 22:09:00 UT ----------- Almanac Data ---------- Aries GHA:132°17.66' Sun GHA:149°12.21' Sun Dec:S 07°11.24' Sun HP:0.1' Sun SD:16.1' Moon GHA:028°49.90' Moon Dec:N 27°13.16' Moon HP:54.8' Moon SD:14.9' Polaris GHA:093°32.63' Polaris Dec:N 89°17.22' ----------------------------------- Enter your assumed position: Latitude Degrees [99] :37 Latitude Minutes [99.99] :56 Latitude Sign [N|S] :n Longitude Degrees [999] :123 Longitude Minutes [99.99] :4 Longitude Sign [E|W] :w Eye Height above sea level :2 Enter Instrumental Altitude (from sextant) Sextant Altitude Degrees [999] :38 Sextant Altitude Minutes [99.99] :30 Index Error (to *add*) in minutes :0.1 Ea Sun: 38°43.57' (38.726) Z Sun : 214°04.26' (214.071) Obs. Alt. Sun: 38°42.77' (38.713) Intercept: 0.793' toward the sun, Z: 214.071 true
Lunar Distances |
Back to Content |
Prompt>java -classpath CelestialComputer.jar astro.runtime.LunarDistance Enter UT: Year [9999] :2003 Month [99] :10 Day [99] :1 Hours [99] :18 Minutes [99] :38 Seconds [99] :47 Enter your assumed position Latitude Degrees [99] :12 Latitude Minutes [99.99] :56.9 Latitude Sign [N|S] :n Longitude Degrees [999] :61 Longitude Minutes [99.99] :17.6 Longitude Sign [E|W] :w Enter the sextant Index Correction This correction is to be *added* to what's read : Sextant Index Correction in minutes [99.99] :0.1 Enter the Moon-Sun distance measured with the sextant: Sextant Lunar Distance Degrees [999] :76 Sextant Lunar Distance Minutes [99.99] :45.6 Limb - Near[N] or Far[F] : (N) n For Wed, 1 Oct 2003 18:38:47 UT ----------- Almanac Data ---------- Aries GHA:289°46.62' Sun GHA:102°16.35' Sun Dec:S 03°14.47' Sun HP:0.1' Sun SD:16.0' Moon GHA:025°28.55' Moon Dec:S 26°12.45' Moon HP:59.2' Moon SD:16.1' Polaris GHA:250°34.34' Polaris Dec:N 89°16.66' ----------------------------------- Ea Sun: 46°12.72' (46.212) Z Sun : 251°06.81' (251.113) App. Alt. Sun: 46°13.55' (46.226) with parallax and refraction Ea Moon: 37°35.68' (37.595) Z Moon : 138°29.87' (138.498) App. Alt. Moon: 36°49.55' (36.826) with parallax and refraction Lunar Distance to Sun (to Observe): 76°43.70' (76.728) Sextant:76.760 Sun SD:0.266, Moon SD:0.272 Apparent Distance:77.300 Delta Z:112.615 Observed Distance (with sextant): 76°43.69' (76.728) Calc Dist at Wed, 1 Oct 2003 18:00:00 UT:76.375 Calc Dist at Wed, 1 Oct 2003 19:00:00 UT:76.922 -------------------------------------------------------------------------------------------------- GMT diff per Lunar Dist:Wed, 1 Oct 2003 18:38:46 UT instead of Wed, 1 Oct 2003 18:38:47 UT --------------------------------------------------------------------------------------------------
Real Time Almanac, with Swing UI |
Back to Content |
Prompt> java -classpath CelestialComputer.jar astro.runtime.ui.AstroGUI
The data in the panel are updated every seconds. The time is given by the computer's internal clock.
Sun Fix data, Lunar Distance, with Swing UI |
Back to Content |
Prompt> java -classpath CelestialComputer.jar astro.runtime.ui.FixApplication
Allows you to use an artificial horizon, like a bucket full of water. In this case, you have to bring down the image of the Sun onto its image on the surface of the water in the bucket. The observed altitude will then have to be divided by two. Also, it will have not to consider the semi-diameter correction, nor the eye height above the water correction.
Prompt> java -classpath CelestialComputer.jar astro.runtime.ui.LunarApplication
End of Text