News:

Howdy, Com-Pac'ers!
Hope you'll find the Forum to be both a good resource and
a place to make sailing friends.
Jump on in and have fun, folks! :)
- CaptK, Crewdog Barque, and your friendly CPYOA Moderators

Main Menu

US Naval Observatory CelNav calculator

Started by HenryC, January 07, 2010, 09:36:20 AM

Previous topic - Next topic

HenryC

http://aa.usno.navy.mil/data/docs/celnavtable.php

I think I've pointed out the above website in a previous post, but since the topic of celnav is up, I thought I'd bring it up again.  This interactive calculator takes the place of the Nautical Almanac (from 1700 to 2035!) by allowing you to enter a date, Universal Time* and a lat/lon and it instantly gives you the celestial coordinates--Greenwich Hour Angle (degrees W of the Greenwich Meridian) and Declination (Degrees N/S of the Equator) for every navigational star or planet visible from that Assumed Position (AP).  This is information a navigator normally has to determine from the Almanac by looking up that body for that moment in time. 

The table also lists the altitude above the horizon in degrees (Hc) and Azimuth (Zn) of that body from that AP.  By comparing these calculated values of these quantities with the value actually observed by the sextant, the navigator can determine how far away his true position is from the AP, giving him a fix.  Have some fun and plug in your day, UT and lat/lon, print out the table and then go out and locate the celestial bodies visible from your location.

The other three numbers; Refraction, SemiDiameter and PArallax, are corrections to the sextant reading which must be applied from that particular lat/lon.  These are not trivial corrections, every minute of arc is 1 nautical mile measured at the earth's surface.

You won't have this handy internet calculator available with you on your boat, it will be your job to calculate these results, but it is a very useful tool to have when you're practicing so you can compare the values you derive with the correct ones.  However, once you've convinced yourself you have mastered this skill, you can buy a navigational calculator or laptop software that will do the number crunching and Almanac look-ups for you. But what's the point of learning celestial if you're going to rely on electronics to do the job for you?

Incidentally, "Aries" is not a celestial body, it is the point on the the celestial equator where the Sun is on the first day of spring, and it is the starting point of the astronomical celestial coordinate system.  Its GHA is provided for that moment of time because it is needed for a number of intermediate navigational calculations.

*Note: Universal Time is Eastern Standard Time plus 5 hours.

Craig Weis

#1
Dick Chaney's home for eight glorious years.

And was the brain child of Matthew Fontaine Maury. Henry. I don't get it. What's a "Love Child?"



skip.

HenryC

For a split second there, I thought you were saying Dick Cheney was Matthew Fontaine Maury's LOVE child!

Salty19

Henry-

Would you happen to know if there is a webpage that shows all formulas and calculations to compute the nav tables based on time/location and all other variables?  Something that someone who is good at math and programming, but not celnav can take and build tables with and allow for user inputs (date/time,etc) that would do the calcs for you? Of course some celnav knowledge would be needed with coaching and guidance from someone like yourself.

I will not pretend to know much about nav on water (with topo map and compass on land...I can get by pretty good). But I am good at programming formulas based on variable inputs and fixed calculations in Excel.

Something that we (I) could build an Excel spreadsheet to autocompute values and share with fellow sailors?   I personally don't need it...I'm a small lake sailor.  But it would be helpful for others to use and helpful for me to learn celnav, mostly for the fun of learning how.  It may be too complex to take on, but I'm willing to take a stab at putting it down in a program for review/testing/feedback, etc.


"Island Time" 1998 Com-pac 19XL # 603

Craig Weis




There in here. "formulas and calculations to compute the nav tables based on time/location and all other variables?"
skip.

HenryC


"What's a "Love Child?"

A quaint Victorian euphemism for "born out of wedlock", or as we would say it today, "a bastard".


HenryC

#6
"Would you happen to know if there is a webpage that shows all formulas and calculations to compute the nav tables based on time/location and all other variables? "

Look in page 277 of the Nautical Almanac, "Sight Reduction Procedures", "Methods and Formulae for Direct Computation"
for the full treatment (with examples). These are the formulas I used to code it up on my Casio fx7000G, HP28 and HP48 calculators.  See section six, "The calculated altitude and azimuth", on page 279.

Reduced to its essentials:

A) Come up with an Assumed Position (AP), of your location ( A nice round LAT and LON within a hundred miles or so of your DR or estimated position).

B) Observe the celestial body making all the appropriate corrections etc to your sextant reading, and noting the exact Universal Time (UT).

C) Look up the Declination (Dec) and Greenwich Hour Angle (GHA) of the celestial body in the Almanac for the precise instant of observation.

You are now ready to reduce the sight

1) Calculate the Local Hour Angle (LHA)

   LHA = GHA + LON

Add or subtract multiples of 360 to set LHA in the range 0-360.

2) Calculate the intermediate values S and C and the Computed Altitude Hc

    S = sin Dec
    C = cos Dec cos LHA
    Hc = INV sin (S sin LAT + C cos LAT)   

"INV" is the INVERSE trig function found on any scientific calculator)

3) Calculate the intermediate values X and A

  X = (S cos Lat - C sin LAT)/cos Hc

  If  X is greater than 1, set it to 1
  If X is less than -1,  set it to -1

  A = INV cos X

4) Determine the Azimuth Z

If LHA is greater than 180, Z = A
Otherwise, Z = 360 - A

Plotting Step:  You now have the Computed Altitude Hc and the Azimuth Z of the body as it would appear from your Assumed Position, AP.  Go to the spot on the chart where you plotted the AP, and draw through it an Azimuth line pointing to the body. But your actual altitude was measured with the sextant; you want the difference between computed and observed, known as the Intercept (the difference in minutes is the difference in Nautical Miles). Subtract one from the other. If the Computed is GREATER than the Observed, plot the Intercept as a line at right angles to the Azimuth AWAY from the body at a distance equal to the Intercept.  If the Computed is LESS than the Observed, draw the Intercept Line that many miles TOWARD the body on the Azimuth line.  Keep this straight by using the memory aid "Coast Guard Academy = CGA = Computed Greater Away".

This Intercept line you've just plotted at right angles to the Azimuth is your Line Of Position (LOP).  It is a tiny piece of a huge circle on the surface of the earth, representing all the points where you would have gotten that sextant reading..  Your ship is somewhere on that line.

Repeat the entire process above for another celestial body to generate another LOP.  Where the two LOPs cross is where you are.  Of course, any fool can make two lines cross, so you will need a third observation and LOP to get a fix.  To be safe, you should should shoot at least 5 so if you make a mistake you will be able to eliminate the bad LOP without ambiguity.

In practice, you shoot as many stars as you can as quickly as you can, then go below and reduce all the sights at leisure, plotting all the Intercepts.  Where they cross is your position.  I recommend Steve Ewing's article on CelNav Basics

http://www.qmss.com/article/celestial.html

as a very lucid introduction to the theory involved.  On that same "Articles" page are two of my own articles describing an actual observing session ("Morning Sights") and use of my favorite sight reduction tables ("Review of Pepperday's...").

By using preprinted sight reduction forms to guide you through this process, you can actually get through it quite quickly.  Each star should take about ten minutes.  The actual calculations are either done with a pocket calculator using those equations, or pre-programmed software on a calculator or laptop, or using navigational tables which simplify the whole process to a set of additions and subtractions (no you don't need to know what a sin, cos or INVERSE is!).

Good luck.

Salty19

Whew--Ok the math stuff I get and that will be easy.  I'll study up on what you've sent.  Thank you. And thanks to you too skip the book link.
"Island Time" 1998 Com-pac 19XL # 603

HenryC

I strongly suggest you get the Nautical Almanac, (The Commercial Edition, available at any chandlery, is cheaper).Even an expired version will have that same article.  I also think it is downloadable online.  The NA will also show you how to derive GHA, Dec and your sextant corrections, too, which can also be complex processes.  But do not use the "Compact Sight Reduction Tables" in the back of the Almanac, either use the the much faster Pepperday tables or the much easier HO214 and HO 249. 

Code up the basic calculation first and then get used to it.  Then when you write your complete nav system, modify it so it is a callable subroutine from your complete system.  My final version did everything except provide the GHA and Dec, it either prompted you for or calculated everything you needed, and even did a least squares analysis of the LOPs to give you a lqt/lon posit and an  RMS error on the fix.  Commercial software brings its own ephemeris (the actual stellar data contained in the white pages of the Almanac). 

Then one day I decided to forget the calculator and go strictly manual.  After all, the sextant is supposed to back up your electronics, not rely on them!

PS, also make sure you check that you print out the latest version of my post.  I've already had to do several correction edits.

curtisv

Henry,

For some people the point of doing celestial nav is as a backup, for example if out to sea and hit by lightning, with loss of all electronics.

If you do the calculations in a calculator, then it defeats the goal of a backup for the case where electronics got fried.  That is why some sailors have mechanical watches (besides the ones that buy a Rolex just because everyone knows that they cost more).

The tough part about celestial nav is first buying a sextant (that is more than a toy) and then keeping up to date almanacs without dumping lots of money into something that is only used for practice, just in case.

[ All non-nerds, please stop reading here. ]

A really useful program would be one that allows computation of the almanac data such as declinations from scratch.  By from stratch I mean without a calculator, just pencil and paper, eliminating the need for updated almanacs but yielding accurate results (with quite a bit of hand calculation).

Note that trig functions, sine, cos, tan, can be computed fairly accurately with two tables and using sin(a+b) = cos(a)sin(b) + sin(a)cos(b).  Using two small tables one with 90 integer values of degree, the other 100 values past the decimal point you get rough answers without a calculator.  Better tables might have 450 values (down to 0.2) and 500 values for very accurate calculations requiring tables on two peices of paper (and stratch paper).  Then there is always taylor series expansion requiring no tables at all, but lets not go there.

I haven't found any good books or clear references on computing the declinations but if someone else has, please speak up.

Some places to start: bibliography in http://moshier.net/aadoc.html, documentation here http://homepage.mac.com/pclwillmott/GAL/Library.html, reverse engineer this function/library http://libnova.sourceforge.net/group__apparent.html, or try the forum here http://www.clearskyinstitute.com/xephem/xephem.html.  This is more than I have spare time for.

Curtis
----------------------------------
Remote Access  CP23/3 #629
Orleans (Cape Cod) MA
http://localweb.occnc.com/remote-access

HenryC

#10
I agree about the calculator, for sight reductions I use Pepperday's tables,   ( http://www.qmss.com/article/pepperday.html ) which eliminates all need for any mechanical calculation, but still allows them as a check for the student.  Also, any set of trig tables can be used to solve the equations in the Nautical Almanac by brute force.  As far as replacing a digital watch with a  mechanical chronometer, that Rolex is a bit out of my financial league.  Still, I have a briefcase full of $40 Timex "Ironman" watches with broken wristbands, which will give me several years of accurate GMT before all their batteries die ). I keep them and a solar-powered calculator in a tin box that doubles as a Faraday cage (duct tape it to a chain plate or some piece of plumbing to ground it). I also keep a chronometer log so I can predict their error and drift for years into the future, after which I can always fall back on Latitude sailing.

For ephemeral data, getting up to date declinations and SHAs is not as critical as you might think, switch from the sun to stars, and select stars which are relatively little affected by precession of the equinoxes.  In a pinch, you can also use the precession table in any old edition of the Royal Astronomical Society of Canada's "Observer's Handbook" to get past the requirement of using this year's Almanac.  The table does not go out of date. Of course, there is calculator software that doubles as a perpetual almanac, but that, as you point out, is cheating.

As for a sextant, I have a 20 year old Astra that shoots straighter than I can.  I'm all ready for the supernova that will blast us back to the dark ages. And I can always learn lunars.  Celestaire sells a book with all the needed tables and a long term lunar ephemeris. That got Slocum around the world with an alarm clock for a timepiece.

curtisv

Henry

If you want to rely on a Faraday cage "ammo box", then it might be easier to put a handheld GPS in the box.

Quote from: HenryC on February 15, 2010, 09:43:54 PM
For ephemeral data, getting up to date declinations and SHAs is not as critical as you might think, switch from the sun to stars, and select stars which are relatively little affected by precession of the equinoxes.  In a pinch, you can also use the precession table in any old edition of the Royal Astronomical Society of Canada's "Observer's Handbook" to get past the requirement of using this year's Almanac.  The table does not go out of date. Of course, there is calculator software that doubles as a perpetual almanac, but that, as you point out, is cheating.

Do you know where I could get precession tables and a method of calculating declinations and SHA for any arbitrary date in the near future (my lifetime, not for necessarily accurate for the remaining lifetime of the solar system)?  How "old" do these Royal Astronomical Society of Canada's "Observer's Handbook" editions have to be, do they have what I'm interested in, and are they available (or should I search Amazon used books)?

btw- this is largely academic.  It *is* much easier to put the handheld GPS in the ammo box and assume the satellites will still be there after the next thunderstorm.

Curtis
----------------------------------
Remote Access  CP23/3 #629
Orleans (Cape Cod) MA
http://localweb.occnc.com/remote-access

HenryC

#12
A Precession Table for the next 50 years is available on page 42 of the Observer's Handbook for 2010. As I recall, every edition has one, so you don't need the current year's issue.

You can order the RASC Observer's Handbook  from  http://www.rasc.ca/publications/index.shtml

I highly recommend it for all things astronomical.

If you just want to update for a particular body, use

http://aa.usno.navy.mil/data/docs/celnavtable.php

Jan Meeus publishes a set of spherical astronomy books, with titles like "Mathematical Astronomy for Calculators" which will give you algorithms for precessing coordinates to and from any date. Its computationally intensive, but not conceptually very difficult.  It is essentially a coordinate transformation problem.  But IMHO, it would be pushing traditionalism way too far to insist on doing it by hand.

I have some software which will run on on HP28 and HP48 calculators (written in Reverse Polish Lisp) I can send you if you can use it.  Send me a message if you're interested.

curtisv

Quote from: HenryC on February 15, 2010, 11:34:38 PM
A Precession Table for the next 50 years is available on page 42 of the Observer's Handbook for 2010. As I recall, every edition has one, so you don't need the current year's issue.

You can order the RASC Observer's Handbook  from  http://www.rasc.ca/publications/index.shtml

I highly recommend it for all things astronomical.

Thanks.  This looks like what I had in mind.  I'll put it on my list of books to look for used.

Quote
Jan Meeus publishes a set of spherical astronomy books, with titles like "Mathematical Astronomy for Calculators" which will give you algorithms for precessing coordinates to and from any date.

I have "Astronomical Algorithms" by Jean Meesus and I didn't find that very useful, though looking at where the bookmark is I never got to the chapter on precession.  Maybe I should pick it up again.

Quote
Its computationally intensive, but not conceptually very difficult.  It is essentially a coordinate transformation problem.  But IMHO, it would be pushing traditionalism way too far to insist on doing it by hand.

Would I be dating myself too much if I told you I went through engineering school with a slide rule?  That's low precision but I did do a lot of computation using pencil and paper.  Its good to know that you can do the hand computation if you need to and for me its always good to know how things are derived.  Otherwise, if the computer is working, use it.

Curtis
----------------------------------
Remote Access  CP23/3 #629
Orleans (Cape Cod) MA
http://localweb.occnc.com/remote-access

HenryC

#14
Yes, I too am a survivor of the "slide rule era".  The closest thing I had to a pocket calculator as a student was the Wang.  The Wang was a calculating device that had more or less the functionality of a modern student scientific calculator, like a TI or HP.  The only problem is that it cost several hundred thousand dollars and was the size of a piano, and you had to make an an appointment several days ahead of time to get a few minutes alone with it (it was in high demand from the other students).  It had the advantage that you had to learn to algebraically simplify your calculations and reduce them to as simple an algorithm as possible. It taught you to pre-compute and organize your work so that when you actually sat in front of the beast and punched in your numbers you could do it cleanly and quickly.  The Wang was soon made obsolete by the computer.  I learned fortran on the PDP-8 and IBM 360 in 1964 (paper tape and punch cards!).

I have a copy of P.Duffett-Smith's "Practical Astronomy with your Calculator", 2nd edition, and here is his precession algorithm where a1, d1 are the precessed Right Ascension and Declination and a0, d0 are the original right ascension and declination, respectively.  The Nautical Almanac will show you how to convert from Right Ascension to Sidereal Hour Angle.

a1 = a0 + (m + n sin a0 tan d0) x N
d1 = d0 + (n' cos a0) X N

where N is the number of years elapsed since the Epoch.  The  Epoch is the base date from which the star positions in your star catalog are plotted to.  Most modern sources are plotted to Epoch 2000.0,  The Nautical Almanac is published every year with all positions already reduced to the current Epoch.  In fact, that's why they publish a new one every year!  So for example, this year's Almanac has all positions plotted for the Epoch at the moment they are looked up for, so you don't need to precess at all.

The constants m,  n and n' for Epoch 2000.0 are 3.07420 sec, 1.33589 sec  and 20.0383 arcsec, respectively.

Here are the constants for m, n and n', respectively,  for some other common Epochs.

Epoch 1900.0 --- 3.07234, 1.33646, 20.0468

Epoch 1950.0 --- 3.07327, 1.33617, 20.0426

Epoch 1975.0 --- 3.07374, 1.33603, 20.0405

You can interpolate these values for "Epochs" falling on other dates.


This is considered an approximate formula, but is probably accurate enough for celestial navigation purposes for dates within our lifetime.

For a more rigorous formula good for longer periods of time, I refer you to page xiii of the Introduction to
"Sky Catalogue 2000.0, Vol I: Stars to Magnitude 8.0", Hirscheld and Sinnott.

BTW, please don't think I'm trying to impress you guys  by throwing all this stuff at you, I majored in astronomy in college, and I still do it as a hobby, so it was and is my job to know all this math.  I'm sure every one of you guys knows things and does stuff at work every day that I would be helpless with.  I for example, need my wife  to program my TV to record a show I want to watch later, and it once took me a whole day to figure out how to re-pack a boat trailer bearing even with the instructions right in front of me.  On the other hand, the Navy taught me how to field-strip and reassemble a .45 Auto blindfolded.  Believe me, once you know how to do something, it is never as hard as it looks.  It's learning that is hard, not doing.