NAV48 TRICKS AND SHORTCUTS Version K: October, 1994 by Thomas R. Metcalf Table of Contents 1. Saving Positions 2. Using the CST Custom Menu 3. Artificial Horizons 4. Course-Vector Solutions 5. Using a Larger PICT 6. Horizontal Sextant Angles in Piloting 7. Dip Short of the Horizon 8. Accessing ROM Routines Directly 9. Accessing Calculator Functions 10. Visible Stars 11. Timing Sights 12. True Wind 13. Geographic Range 14. Other Software ---------------------------------------- This software and manual is provided "as is" and is subject to change without notice. No warranty of any kind is made with regard to this software or manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The author shall not be liable for any errors or for direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this software. The programs included here should not be relied on for solving a problem whose incorrect solution could result in injury to a person or loss of property. If you do use the programs in such a manner it is AT YOUR OWN RISK. Copyright 1994 by Thomas R. Metcalf. Permission is granted to any individual or institution to use, copy, or redistribute this software and manual provided that it is not sold for profit and provided that this copyright notice and the above disclaimer are retained. ---------------------------------------- This document gives shortcuts and tricks for very advanced users of Sparcom's Celestial Navigation Pac for the HP48-SX calculator (Sparcom Inc., 897 N.W. Grant Ave., Corvallis OR, 97330; Phone: 503-757-8416, 800-827-8416). Be warned: some of the programs listed here could cause a memory loss if they are not installed correctly. In particular, all the programs which utilize DONAV48 in section 8 have this potential. The code runs on an HP48-SX revision D and E ROM, but has not been tested on any others. In particular, it has NOT been tested on an HP48-GX. This text is heavy on programming and navigation but light on words. Consult the HP48 manual and "The American Practical Navigator" (Bowditch) for assistance. THE CONTENTS OF THIS DOCUMENT ARE NOT SUPPORTED BY SPARCOM OR HP, SO DON'T ASK THEM FOR ASSISTANCE! +-----------------------------------------------------------------------------+ | The software listed here can be directly downloaded to the HP48 in ASCII | | mode if you cut the code out from all the text. The codes (starting with a | | "\") which are used to represent non-ascii characters on the HP48 are | | discussed in the HP48 manual. The lines starting with something like %%HP: | | T(3)A(D)F(.) are the header for the ASCII transfer and must be included in | | the download. | +-----------------------------------------------------------------------------+ 1. Saving Positions ************************************************* A very useful feature of the NAV48 program is the ability to run your own programs at prompts. Several examples of this are given in the NAV48 manual. A useful program, an example of which is given below, generates positions which you use repeatedly. For example, the position of your home port or a waypoint. Suppose that your way point is at 22 degrees 50 minutes north latitude and 157 degrees 20 minutes west longitude. Rather than entering this position repeatedly, you can enter a short program to automatically input this position at any position prompt in NAV48. All the position prompts in NAV48 require a position in the current angle format (DMT, DMS, or decimal). Thus, our program must output the position in the current format, whatever it is. To do this, we use decimal format in the program and convert to the current format with the ->FMT program included in the NAV48 library. In our example, the position in decimal format is 22.8333 north latitude and 157.3333 west longitude. The program we write must leave the latitude in level 2 on the stack and the longitude in level 1: << 22.8333 \->FMT 157.3333 \->FMT >> Call this program WAY1 and store it in the {HOME SPARCOM NAV48D} directory. It must be stored in this directory so that the program is visible to NAV48 which runs from the {HOME SPARCOM NAV48D VARBLS} directory. Now run NAV48. Run the DREC program in the PILOT menu. At the dead reckoning prompt, press ON once to clear the display and key in WAY1 (you will have to put the calculator in ALPHA mode). Press ENTER, and the waypoint is entered as the dead reckoning position. In the next section, we will see how the HP-48SX's custom menu can be used to make this even easier. Following is a program, PSAVE, which will create, in a user-friendly way, the program in which positions are stored. Be extremely careful typing in the numbers before the SYSEVALS in PSAVE. If you type them wrong you could lose the contents of your HP48 memory. See section 8 below for the DONAV48 program which is used by PSAVE. You must input DONAV48 before running PSAVE. PSAVE should be stored in the {HOME SPARCOM NAV48D} directory. PSAVE Bytes: 565.5 Checksum: #18166d %%HP: T(3)A(D)F(.); \<< DEPTH RCLMENU PATH RCLF \-> dsv om path fl \<< IFERR 28 MENU { HOME SPARCOM NAV48D VARBLS } EVAL "Position to Save? " FMT + "Lat" "Lon" DRLAT DRLON DOPOS SWAP \<< \->FMT \>> SWAP \<< \->FMT \>> 4 \->LIST # 11677d # 23043d SYSEVAL # 23219d SYSEVAL "Variable name to save data in?" { "" \Ga } INPUT "'" "'" 3 ROLLD + + OBJ\-> { HOME SPARCOM NAV48D } EVAL IF DUP VARS SWAP POS 0 > THEN CLLCD "Overwrite existing data? (" OVER \->STR + ")" + 3 DISP 23 DONAV48 IF 11.1 \=/ THEN 0 DOERR END END STO CLLCD THEN DEPTH dsv - DROPN END om MENU path EVAL fl STOF \>> \>> PSAVE is used as follows. Run PSAVE from any data prompt inside NAV48 or from any directory outside NAV48. For example, run PSAVE from the DREC program in the PILOT menu. Press PILOT followed by DREC. You will be prompted for your dead reckoning position. Append the dead reckoning longitude with PSAVE: |------------------------| |Dead Reckoning? | |(dd.mmt) | |:DR_Lat: 32.39 N | |:DR_Lon: 117.15 W PSAVE | |------------------------| Press ENTER. This runs PSAVE and you are prompted for the position to save. Set the position to San Diego (32 degrees 39 minutes N, 117 degrees 15 minutes W) and press ENTER. |---------------------| |Position to Save? | |(dd.mmt) | |:Lat: 32.39 N | |:Lon: 117.15 W | |---------------------| Press ENTER. You are now prompted for the name of the variable in which the position will be stored (note that ALPHA mode has already been invoked): |----------------------| |Variable name to save | |data in? | | | |SAND | |----------------------| Press ENTER The position of San Diego has been saved and can be used at any position prompt. For example, run the almanac program, ALMN, and set the position to San Diego. Press ALMN and when prompted for a position press ON (ATTN) once to clear the display. Then type SAND: |----------------------| |Position (dd.mmt)? | | | | | |SAND | |----------------------| Press ENTER. The position of San Diego has been input to ALMN. See section 2 for tips on saving the names of the most used positions in the custom menu. 2. Using the CST Custom Menu ***************************************** The HP-48SX calculator has a powerful custom menu feature built into it. This feature can be used very effectively with the NAV48 program. For example, suppose we want to use the custom menu so that we don't have to type "WAY1" every time we want to use the waypoint position we set in the previous section. Enter the following list into a variable called CST in the {HOME SPARCOM NAV48D} directory: { WAY1 } Now run NAV48 and execute the DREC program from the PILOT menu again. As before press ON once to clear the display but, rather than typing in "WAY1", press the CST key on the calculator's keyboard. You will see a single menu key WAY1. Press this menu key to put WAY1 on the screen. Press ENTER to input the waypoint as the dead reckoning position. Another useful thing to put in the CST list is "_ft" which allows easy entry of the feet unit if you measure your height of eye in feet. Exit NAV48 and add "_ft" to the CST list in the {HOME SPARCOM NAV48D} directory. Your CST variable now looks like { WAY1 "_ft" } Note that the quotes must be present around the feet unit. Now run NAV48 again and press INIT. Press IX/HT to enter the index error and the height of eye. Suppose our height of eye is 9 feet. Erase the default height of eye a type 9 CST _FT to enter 9_ft at the height prompt. Another useful unit to put in the CST variable is "_h" which is often used in the ADV program to indicate a "distance" in hours rather than nautical miles. Other useful program names to enter in the custom menu are M->T, RUN (see NAV48 manual), and PSAVE: { M->T RUN PSAVE WAY1 "_ft" "_h"} 3. Artificial Horizons ************************************************* The artificial horizon is basically a pool of liquid that you can use to obtain sights when the true horizon is not visible. By bringing the image of the body observed through the sextant down to the image of the body reflected in the pool of liquid, you can compute the altitude of the body: the altitude is simply 1/2 the reading on the sextant. However, inputting this type of data into NAV48 is not quite as simple as just dividing the observed altitude by two. The process is complicated by the corrections which are required to the data. The index error has nothing to do with the type of observation: it is a property of the sextant. Thus, the observation must be corrected for index error before dividing by two. Since the observation is not made relative to the actual horizon, there is no dip correction, regardless of the height of eye. The rest of the data corrections (refraction etc.) depend on the true altitude and must be applied after dividing by two. It is quite simple to include a sight from an artificial horizon in NAV48. These sights can be treated just like "normal" sights, with the exception that the index error must be applied immediately and then the observed altitude must be divided by 2. Also, the dip correction must be turned off. Following is a program ("AH") to compute sights from an artificial horizon. The trick used here is to apply the index error within the AH program and then subtract the index error to offset the index correction done later in the NAV48 code. This effectively "turns off" the built in index correction. We use the same trick, applying the dip correction with the "wrong" sign, to offset the dip correction made by the ADDOB program. This "turns off" the dip correction which is not applicable to an artificial horizon. AH Bytes: 89.0 Checksum: #7816d << -> hs << FMT-> INDX + 2 / INDX - HGT SQRT 0.0293 * + ->FMT >> >> Save this program in the {HOME SPARCOM NAV48D} directory in a variable called 'AH'. Note this program is included on ROM version 2.50 and above. It need be entered by the user only for ROM version 2.00. This code is used in the ADDOB program to input the H_s value from an artificial horizon observation. For example, suppose that we observed the lower limb of the Moon with an artificial horizon by bring the lower limb of the Moon observed through the sextant into contact with the apparent upper limb of the reflected image of the Moon. Our sextant has an index error of 2.0' on the arc and the time of the sight is November 23, 1992 at 02:33:22 UT. The observed sextant altitude is 44 degrees 28.3'. Run INIT and set the index error to 2.0'. The height of eye would be set to zero for an artificial horizon sight, but we have already accounted for that in the AH program, so it is not necessary to set the height of eye to zero (the value is effectively ignored). Set the motion to 0 knots and the zone description to 0 hours. Now run the RESET program to clear out any old observations and then run ADDOB. Set the date to 1992.1123 and the time to 02.3322. Now set the H_s value to 'AH(44.283)'. The body is the Moon and the limb is the lower limb. Compute the almanac, and accept the default time of fix. The final screen shows 1992,Nov 23,02:33:22UT Alt: 23 20.7' GHA: 239 11.2' Dec: 19 18.3' S If you use an artificial horizon often, you may want to put the AH program into your CST list in {HOME SPARCOM NAV48D}. 4. Course-Vector Solutions ********************************************** This section is only for users with version 2.00 of NAV48. If you have any other version, skip this section. In the INIT program, to compute your motion, you input both your course and speed through the water and the set and drift of the current. These are combined into your net motion which is displayed on the INIT screen. Sometimes, however, you want to input a desired course and the set and drift of the current and have the calculator compute the course and speed you should steer to make this desired course. You can do this with NAV48 using a program object at the course/speed prompt. However, since the computation depends on the set and drift of the current you will have to enter this first. Run MOTION and set the course and speed to anything convenient (press ENTER to accept the default). Then run MOTION again and use the following program object at the course/speed prompt. Store this program in the {HOME SPARCOM NAV48D} directory. You must have the DONAV48 program installed for this program to work. See section 8 below. Note CRSV is included on the NAV48 ROM for versions 2.50 and above. This code need only be input by the user for ROM version 2.00. CRSV Bytes: 318.5 Checksum: #22750d %%HP: T(3)A(D)F(.); \<< DEG \->NUM '1_knot' 40 DONAV48 'nSPD' STO \->NUM FMT\-> \-> \Gh \<< '\Gm?\191$%' PURGE \<< nSPD \Gm?\191$% \->V2 DRIFT SET \->V2 + V\-> SWAP DROP \Gh - 0 RANGE ABS \>> '\Gm?\191$%' \Gh IFERR -15 CF -16 SF ROOT -16 CF THEN -16 CF \Gh END '\Gm?\191$%' PURGE 360 MOD \->FMT nSPD \>> \>> To use this program, simply append CRSV to the input at the MOTION prompt after running INIT and MOTION. For example, suppose you want to move at a course of 48 degrees true and are moving through the water at 6 knots. There is a current of 1 knot due east. First, you must set the current. Run INIT and press the MOTION menu key. Set the course and speed to 48 and 6 respectively and press ENTER. Now set the set and drift to 90 and 1 respectively. Press ENTER. You have set the current. Run MOTION again to compute the course it is necessary to steer to account for the current. Append CRSV to indicate that this is the desired course/speed through the water. |---------------------| |Motion? (True/Knots) | | | |:COURSE: 48 | |:SPEED: 6 CRSV | |---------------------| Press ENTER. Press ENTER at the current prompt as well (accept the default which you keyed in previously). The net motion is displayed as 48 true at 6.7 knots. Note the net course is exactly what we asked for. What course must we steer? Run MOTION again and the default values will tell you: 41 degrees 35.8 minutes true at 6 knots. Press ENTER to retain these defaults. Press ENTER again at the current prompt to retain that default. CAUTION: There is not always a solution to the problem. If there is not a solution, the program will find the best answer it can. Always check that the course displayed in INIT is in fact what you requested. If it is not, then there was no exact solution. 5. Using a Larger PICT *************************************************** The size of the plotting window used in the HP48 is adjustable. You can use a larger window than the physical size of the screen in PLOT if you desire. This uses up some of your memory, though, so don't make the window too big! Use the PDIM command (built in to the HP 48) to set the size of the window. The default is 131 by 64, the physical size of the display. To adjust the size of the display, use the PDIM command (see the HP48 manual). For example, suppose you want to make the display 150 by 100. Enter the following on the stack OUTSIDE of NAV48. 2: #150d 1: #100d Run PDIM. Now, when you run PLOT, you can move the cursor "off the edge" of the display to force the displayed window to move. This way, you can see more of the plot if you desire. 6. Horizontal Sextant Angles in Piloting ******************************** This section is only for users with version 2.00 of NAV48. If you have any other version, skip this section. Measuring the horizontal angle between two objects which also appear on your chart can be a very accurate method of obtaining a line of position. To measure the horizontal angle, turn your sextant on its side and bring the image of one of the objects to the other object. Make sure you are holding the sextant horizontally! It is best to use two objects which have roughly the same apparent elevation above the shoreline to insure that the sextant is horizontal. The horizontal angle is input to the NAV48 program just as the bearing and range observations are. See Chapter 9 of the NAV48 manual. The following program takes the observed horizontal angle, in the current format, from the ADD prompt in the EDIT menu. The program corrects for the index error, so you should input the uncorrected angle and make sure that the index error is properly set in the INIT program. You will need to install the DONAV48 (see section 8, below) program for this program to work. Input the program and store it in a variable called 'HANG' in the {HOME SPARCOM NAV48D} directory. HANG is included in the NAV48 ROM for ROM versions 2.50 and above. It need only be input by the user for ROM version 2.00. HANG Bytes: 649.5 Checksum: #29194d %%HP: T(3)A(D)F(.); \<< \-> ha \<< ha 0 RANGE FMT\-> INDX + 'ha' STO DEG 114 DONAV48 164 DONAV48 164 DONAV48 \-> \Gl1 l1 \Gl2 l2 \<< l1 \Gl1 l2 \Gl2 45 DONAV48 DTAG 120 / ha SIN / SWAP DTAG FMT\-> 90 ha - DUP2 + 3 ROLLD - \-> r \Ga1 \Ga2 \<< \Gl1 l1 r \Ga1 36 DONAV48 \Gl1 l1 r \Ga2 36 DONAV48 \-> c\Gl1 cl1 c\Gl2 cl2 \<< DRLAT DRLON cl1 c\Gl1 45 DONAV48 SWAP DROP DRLAT DRLON cl2 c\Gl2 45 DONAV48 SWAP DROP \<= IF ha 90 > THEN NOT END IF THEN cl1 c\Gl1 ELSE cl2 c\Gl2 END 360 MOD \->FMT SWAP \->FMT 90 r - \->FMT \>> \>> \>> \>> \>> When you run HANG, you are first prompted for your dead reckoning position and then for the positions of the two observed objects. The dead reckoning position is used to decide on which side of the line connecting the two objects the vessel is on. The dead reckoning position need therefore only be accurate enough to make this distinction. Example: Suppose you observe that the horizontal angle between two objects is 102 degrees 50.8 minutes. The position of the two objects is 33:22.5 N, 117:33.5 W and 33:42.5 N, 117:31.9 W. To input these data, run EDIT and the ADD. At the ADD prompt, press ON once to clear the display and input the following |---------------------| |Input CORRECTED data | | | | | |102.508 HANG | |---------------------| Input the dead reckoning: |---------------------| |Dead Reckoning? | |(dd.mmt) | |:DR_Lat: 33.270 N | |:DR_Lon: 117.410 W | |---------------------| You are now prompted for the position of the two observed objects. |---------------------| |Position of observed | |feature? (dd.mmt) | |:Lat: 33.225 N | |:Lon: 117.335 W | |---------------------| and |---------------------| |Position of observed | |feature? (dd.mmt) | |:Lat: 33.425 N | |:Lon: 117.319 W | |---------------------| You are next prompted for the observation date and time and, if the vessel is moving, the dead reckoning position. The observation is input, and, with at least two observations, you can run SOLVE and PLOT to fix your position. The data from HANG can be used just like any other data, it can be advanced retarded or used to compute a position fix. 7. Dip Short of the Horizon ********************************************* This section is only for users with version 2.00 of NAV48. If you have any other version, skip this section. Dip short of the horizon is easily computed with a program object. Input the following program and store it under the name DS in the {HOME SPARCOM NAV48D} directory. DS is included on the NAV48 ROM for ROM versions 2.50 and above. It need only be input by the user for ROM version 2.00. DS Bytes: 263.0 Checksum: #33604d %%HP: T(3)A(D)F(.); \<< \-> hs \<< hs FMT\-> "Distance to Shore? (nmi)" { { 1 0 } V } INPUT OBJ\-> \->NUM '1_nmi' -55 CF IFERR CONVERT THEN DROP END UVAL IF DUP 2.11 HGT \v/ * < THEN DUP 8268 / SWAP HGT SWAP / 1851.99528 / + DEG ATAN - HGT \v/ .0293 * + ELSE DROP END \->FMT \>> \>> This program turns off the standard dip correction by applying it with the wrong sign and then applying the dip short of the horizon. Use this program when prompted for the height of the observation in the ADDOB program. For example, if the altitude of the observation is 45 degrees at noon (UT), input ----------------------- |Time(UT)/Altitude | |(hh.mmss)/(dd.mmt) | | | |:Time: 12.0000 | |:H_s: 'DS(45.000)' | ----------------------- This applies the dip short of the horizon to the observation. 8. Accessing ROM Routines Directly *************************************** The following program can be used to access the navigation subroutines in the NAV48 library directly, without running NAV48. If you type this program into the HP48, be very careful to get it exactly right. If the program is input incorrectly, it could cause all user memory in the HP48 to be erased! The program has been tested on Rev D and E HP-48 ROMs. It may or may not run on other HP-48 ROM revisions. The input to DONAV48 is a single number in level one of the stack, the index number of the routine in the library, as well as any input required by the NAV48 subroutine. DONAV48 Bytes: 113.0 Checksum: #11388d %%HP: T(3)A(D)F(.); \<< RCLF \-> fl \<< 833 SWAP IF DUP TYPE THEN # 514d DOERR END # 103671d SYSEVAL # 32336d SYSEVAL EVAL fl STOF \>> \>> Following is a list of the more useful routines available in the NAV48 library. The routine name is followed by the index number which is passes to DONAV48 and a description of the input and output to the routine. All these routines must be run from the {HOME SPARCOM NAV48D VARBLS} directory. THE INDEX NUMBERS FOR THE ROUTINES LISTED BELOW ARE VALID FOR VERSION 2.00 OF THE NAV48 LIBRARY. THEY MAY OR MAY NOT BE VALID FOR ANY LATER VERSIONS OF THE LIBRARY. All latitudes and declinations are north positive and south negative and all longitudes are west positive and east negative. ------------------------------------------------------------------------------- ADDOB 116 Runs the ADDOB program to add a celestial observation to the OBS variable No Input/Output from the HP48 stack, but the OBS variable is updated. ------------------------------------------------------------------------------- CCMOVE 36 Advance lat/lon along a rhumb line. Input: 4: lon 3: lat 2: dist 1: crs Output: 2: LonNew 1: LatNew Rhumb line. Input and Output are in decimal format. Input lat/lon is advanced along a rhumb line distance dist (in degrees, i.e. nmi/60) and course (radians). ------------------------------------------------------------------------------- CHKEP 62 Checks that a date is valid Input 1: Date (YYYY.MMDD) Output 2: Date (YYYY.MMDD) 1: 1 if the date is valid, 0 if the date is invalid ------------------------------------------------------------------------------- CKNVAR 58 Check the NAV48 variables and create {HOME SPARCOM NAV48D VARBLS} if necessary. No I/O. ------------------------------------------------------------------------------- COMP 43 Compute waypoints along a composite route Input 6: The distance between waypoints (nmi/60) 5: The limiting latitude of the route (decimal) 4: From latitude (decimal) 3: From longitude (decimal) 2: To latitude (decimal) 1: To longitude (decimal) Output 2: List of waypoints {{lat lon course}} (decimal) 1: Total distance (nmi) If the great circle is OK, or if the limiting latitude must be crossed, there is no output, but a message is displayed. ------------------------------------------------------------------------------- CTWI 101 Computes the times of Civil Twilight Input: 4: Longitude 3: Latitude 2: YYYY.MMDD 1: "CTWI" Output: 1: A list containing the data The CTWI list can be displayed using LSHOW ------------------------------------------------------------------------------- DANGLE 92 Distance between two points on a sphere Input 4: Lon1 (decimal) or GHA1 (decimal) or RA1 (decimal) 3: Lat1 (decimal) or DEC1 (decimal) 2: Lon2 (decimal) or GHA2 (decimal) or RA2 (decimal) 1: Lat2 (decimal) or DEC2 (decimal) Output 1: Angular distance (decimal) The input and output will be in degrees or radians depending on the current HP48 setting. ------------------------------------------------------------------------------- DOPLANET 139 Compute the x,y,z coordinates of a planet Input 2: T 1: "Name" Output 3: X in AU 2: Y in AU 1: Z in AU T is defined as (JD-2451545)/365250, with JD computed from TDT and JD, below. The name is one of "SEarth" Short data for Earth "Earth" Long data for Earth "Mercury" "Venus" "Mars" "Jupiter" "Saturn" ------------------------------------------------------------------------------- DOUNIT 40 Convert to proper units, if necessary Input 2: A number, possibly with a unit, to be converted 1: A unit number with the units to be converted to Output 1: The converted number If the level two input does not have a unit, it is left unchanged. ------------------------------------------------------------------------------- DR 114 Set dead reckoning position. No I/O Prompts for Dr and updates DRLAT and DRLON in the {HOME SPARCOM NAV48D VARBLS} directory. ------------------------------------------------------------------------------- DST 189 Run the Distance/Speed/Time calculator No Input/Output from the HP48 stack. ------------------------------------------------------------------------------- ->DSTR 126 Convert date/time into a string Input 3: Date (YYYY.MMDD) 2: Time (decimal hours, UT) 1: Zone description (whole hours to UT) Output 1: Date/time string (zone time) ------------------------------------------------------------------------------- DTIMENP 161 Prompt for date and time. Input 4: Prompt for date (string) 3: Prompt for time (string) 2: Default date (YYYY.MMDD) 1: Default time (decimal hours, zone time) Output 2: Date (YYYY.MMDD) 1: Time (decimal hours, UT) ------------------------------------------------------------------------------- EDIT 133 Run the observation editor No Input/Output from the HP48 stack. The OBS variable may be updated. ------------------------------------------------------------------------------- ->EP 48 Convert HP48 date format to YYYY.MMDD Input 1: HP48 date Output 1: YYYY.MMDD ------------------------------------------------------------------------------- EP-> 49 Convert YYYY.MMDD to HP48 date format Input 1: YYYY.MMDD Output 1: HP48 date ------------------------------------------------------------------------------- EPRANGE 59 Put a date/time into the proper range (0HMT 30 Convert from decimal angle to DMT angle Input 1: Angle in decimal format Output 1: Angle in DMT format ------------------------------------------------------------------------------- HMT-> 31 Convert from DMT angle to decimal angle Input 1: Angle in DMT format Output 1: Angle in decimal format ------------------------------------------------------------------------------- HORIZ-> 90 Convert horizon coordinates (altitude,azimuth) to right ascension and declination. Input 6: Date (YYYY.MMDD) 5: Time (decimal hours, UT) 4: Altitude (decimal degrees) 3: Azimuth (decimal degrees) 2: Longitude (decimal degrees) 1: Latitude (decimal degrees) Output 2: Right ascension (decimal degrees) 1: Declination (decimal degrees) ------------------------------------------------------------------------------- ->HORIZ 91 Convert GHA and declination to horizon coordinates (altitude, azimuth). Input 4: Greenwich Hour Angle (decimal degrees) 3: Declination (decimal degrees) 2: longitude (decimal degrees) 1: latitude (decimal degrees) Output 2: Altitude (Degrees, Current format (DMT, DMS or Decimal)) 1: Azimuth (Degrees, Current format (DMT, DMS or Decimal)) ------------------------------------------------------------------------------- HP 153 Computes the horizontal parallaz of the Moon Input 2: Date (YYYY.MMDD) 1: Time (decimal hours) Output 1: Horizontal Parallax (decimal degrees) ------------------------------------------------------------------------------- JD 64 Computes Julian Date Input 2: Date (YYYY.MMDD) 1: Time (decimal hours) Output 1: Julian date (decimal days) ------------------------------------------------------------------------------- LSHOW 52 Displays a list of strings Input: 1: A list of strings Output: None ------------------------------------------------------------------------------- MOONGD 154 Computes the RA and DEC of the Moon Input: 2: YYYY.MMDD 1: TDT (decimal hours): Computed from TDT program below Output: 2: RA (decimal degrees) 1: Declination (decial degrees) ------------------------------------------------------------------------------- MOONPH 156 Computes the Phase of the Moon Input: 2: YYYY.MMDD 1: UT (decimal hours) Output: 1: Phase (decimal fraction of full) ------------------------------------------------------------------------------- NTWI 101 Computes the times of Nautical Twilight Input: 4: Longitude 3: Latitude 2: YYYY.MMDD 1: "NTWI" Output: 1: A list containing the data The NTWI list can be displayed using LSHOW ------------------------------------------------------------------------------- PRECESS 81 Computes precession Input 5: Right Ascension (decimal degrees) 4: Declination (decimal degrees) 3: Epoch precessed FROM (YYYY.MMDD) 2: Epoch precessed TO (YYYY.MMDD) 1: UT (decimal hours) Output 2: Right Ascension (decimal degrees) 1: Declination (decimal degrees) ------------------------------------------------------------------------------- ->PSTR 51 Input 1: Position (current format, DMT, DMS, or decimal) Output 1: Formatted position string If the input is tagged by "Lat", "Lon", or "Dec", then the output is appended by "N", "S", "E", "W", as appropriate. ------------------------------------------------------------------------------- RHUMB 45 Computes rhumb Line Course/Distance Input: 4: fromlat (decimal) 3: fromlon (decimal) 2: tolat (decimal) 1: tolon (decimal) Output: 2: Course (current format) 1: Distance (nmi) ------------------------------------------------------------------------------- RISET 101 Computes the rise/set times of a body Input: 4: Longitude 3: Latitude 2: YYYY.MMDD 1: "RST" Output: 1: A list containing the data The RISET list can be displayed using LSHOW ------------------------------------------------------------------------------- SD 39 Computes the semi-diameter of the Sun Input 1: Date (YYYY.MMDD) Output 1: Semi-Diameter (decimal degrees) ------------------------------------------------------------------------------- SOLVE 117 Runs the solve program to compute a celestial fix Input: None (The OBS variable should already contain the sights) Output: None (The fix is displayed on the screen and the LAT and LON variables are updated) ------------------------------------------------------------------------------- ->STIME 46 Formats a time as a string Input 1: A time in decimal hours Output 1: Formatted string ------------------------------------------------------------------------------- STARDATA 183 A list of data for the 57 navigational stars + polaris Input No Input Output 1: The list of star data ------------------------------------------------------------------------------- STDT 175 Runs the ST/DT program to compute set and drift between two fixes. Input No input Output No output ------------------------------------------------------------------------------- TDT 89 Computes the Terrestrial Dynamical Time from UT Input: 2: YYYY.MMDD 1: UT (decimal hours) Output: 2: YYYY.MMDD 1: TDT (decimal hours) ------------------------------------------------------------------------------- VERTEX 42 Computes the vertex of a great circle Input: 4: fromlat (decimal) 3: fromlon (decimal) 2: tolat (decimal) 1: tolon (decimal) Output 2: Vertex latitude (Current format, decimal, DMT, or DMS) 1: Vertex longitude (Current format, decimal, DMT, or DMS) ------------------------------------------------------------------------------- WAY 41 Compute waypoints along a great circle Input 5: The distance between waypoints (nmi/60) 4: From latitude (decimal) 3: From longitude (decimal) 2: To latitude (decimal) 1: To longitude (decimal) Output 3: List of waypoints {{lat lon course}} (decimal) 2: Total distance (nmi) 1: Additional distance beyond the great circle ------------------------------------------------------------------------------- Example: Compute the GHA and declination of the sun on January 1, 1993 at 10 hours. Place the following on the stack: 3: 1993.0101 2: 10 1: 87 Change directories to {HOME SPARCOM NAV48D VARBLS} and execute DONAV48. Press the "SUN" menu key. The data is output in a list and the data is in the current format (DMT, DMS, or decimal). { "Sun" :GHA:329.0566 :Dec:-22.5898 } 9. Accessing Calculator Functions ************************************** It is possible to access the calculator from within the nav pac. However, since the HP48 was not designed with multi-tasking in mind, the technique has one major restriction: you can only access the calculator when you are at a data prompt. You can not access the calculator from the main NAV48 menu. To access the calculator input the following program into the variable 'CALC' and store it in the {HOME SPARCOM NAV48D} directory. CALC Bytes: 93.0 Checksum: #58628d %%HP: T(3)A(D)F(.); \<< DEPTH \->LIST PATH RCLMENU \-> s p m \<< 2 MENU HOME svflags STOF HALT p EVAL s OBJ\-> \->FMT DROP m MENU \>> \>> When appended to any data at any prompt NAV48 will be halted and you will be returned to the HP48 stack. To resume the NAV48 program, press CONT (orange-shift ON). For example, suppose you are at the IX/HT prompt in the INIT program. Append CALC to halt the program temporarily. Note that when you resume the program, you will be past the prompt, so be sure that CALC is appended after a valid response to the data prompt! |---------------------| |INDEX (dd.mmt) | |HEIGHT (m) | |:INDEX : 0.000 OFF~A | |:HEIGHT: 3.000 CALC | |---------------------- Press ENTER. This will input an index error of 0, a height of eye of 3 meters, and halt the NAV48 program until you press CONT. When you press CONT, you will be returned to the NAV48 program, at the INIT menu. Anything you leave on the stack before pressing CONT will be available to the NAV48 program through the EDIT menu (^STK) at every data prompt. A slight modification of the CALC program is useful for shutting down NAV48 so that you can restart it quickly, without waiting for the program to check all the variables. Following is SHUTD which can be used at any data prompt, just like CALC. The only difference is that SHUTD will return you to the main NAV48 menu instead of wherever you left off when you press CONT. SHUTD Bytes: 98.0 Checksum: #47420d %%HP: T(3)A(D)F(.); \<< DEPTH \->LIST PATH RCLMENU \-> s p m \<< 2 MENU HOME svflags STOF HALT p EVAL s OBJ\-> \->FMT DROP m MENU 0 DOERR \>> \>> ************************************************************************* It is possible to get into trouble using the CALC and SHUTD programs which is why they are not detailed in the Nav Pac manual. If you delete or change any of the variables in the {HOME SPARCOM NAV48D VARBLS} directory, unpredictable things may happen when you resume NAV48. ************************************************************************* As an alternative to the CALC program, you can input algebraic and program objects at data prompts to use the HP48 to do computations for you. See chapter 9 of the Navigation Pac manual. As a trivial example, suppose you are 6 feet tall and you are standing 3 feet above the water. You can input this in the IX/HT prompt in INIT as |---------------------| |INDEX (dd.mmt) | |HEIGHT (m) | |:INDEX : 0.000 OFF~A | |:HEIGHT: '6_ft+3_ft' | |---------------------| or as |---------------------| |INDEX (dd.mmt) | |HEIGHT (m) | |:INDEX : 0.000 OFF~A | |:HEIGHT: <<6_ft 3_ft + >> | |---------------------| 10. Visible Stars ******************************************************** Following is a program which plots the name and the position of the navigational stars currently visible. It uses a modified version of DONAV48 called DN (the same warnings which apply to DONAV48 also apply to DN): DN Bytes: 89.5 Checksum: #29917d %%HP: T(3)A(D)F(.); \<< 833 SWAP IF DUP TYPE THEN # 514d DOERR END # 103671d SYSEVAL # 32336d SYSEVAL EVAL \>> --------------------- SKY Bytes: 1700.0 Checksum: #1524d %%HP: T(3)A(D)F(.); \<< IF :&: 833 TYPE 12 \=/ THEN CLLCD "Install NAV48" 4 DISP 2 FREEZE ELSE DEPTH RCLMENU RCLF PATH { 54 21 16 50 57 22 49 46 2 20 33 13 6 15 55 45 30 23 48 4 3 31 53 19 27 40 9 5 7 26 41 35 18 8 17 43 10 34 42 44 25 39 12 36 47 24 56 28 11 52 29 14 51 37 38 32 58 1 } \-> d om f p L \<< IFERR { HOME SPARCOM NAV48D VARBLS } EVAL IF DEPTH d \=/ THEN 58 DN END "Position?" "Lat" "Lon" DRLAT DRLON DOPOS \-> \Gl l \<< "" "" DATE 48 DN TIME HMS\-> 161 DN \-> epoch UT \<< ERASE { # 0d # 0d } PVIEW FUNCTION -25 360 XRNG -12 90 YRNG { (0,0) "Z" "Hc" } AXES DRAX 1 58 PICT (-5,-6) "N" 1 \->GROB REPL PICT (350,-6) "N" 1 \->GROB REPL PICT (173,-6) "S" 1 \->GROB REPL PICT (85,-6) "E" 1 \->GROB REPL PICT (259,-6) "W" 1 \->GROB REPL PICT (-25,90) "90" 1 \->GROB REPL PICT (-15,2) "0" 1 \->GROB REPL FOR s 183 DN L s GET GET OBJ\-> DROP 4 ROLLD 4 ROLLD DROP2 SWAP DROP IF DUP 1582.1015 < THEN 2000.01015 + END epoch UT 81 DN \-> n r d \<< r epoch UT 84 DN d \Gl l 91 DN FMT\-> SWAP FMT\-> \-> Z h \<< IF h 0 \>= THEN Z 180 RANGE h R\->C C\->PX DUP OBJ\-> ROT B\->R 7 - 0 MAX R\->B ROT B\->R 6 - 0 MAX R\->B ROT \->LIST PICT SWAP n 1 4 SUB 1 \->GROB REPL PIXON END \>> \>> NEXT \>> \>> THEN DEPTH d - DROPN END GRAPH p EVAL f STOF om MENU \>> END \>> DN and SKY should be stored in the {HOME SPARCOM NAV48D} directory. As with DONAV48, be very careful inputting DN. SKY can be run from a NAV48 prompt, or from outside the NAV48 program. SKY prompts for the latitude and longitude of the observer and the time of the observations. It then plots the altitude, azimuth and the first 4 letters of the name of the visible navigational stars. Press ON (ATTN) at any time to freeze the display and enter the GRAPH utility. After the plot, the HP48 GRAPH utility is started - press ON to exit GRAPH. From GRAPH, you can move the cursor to the position of the star and read off the approximate coordinates (x=azimuth, y=altitude). 11. Timing a sight **************************************************** Install the following program in {HOME SPARCOM NAV48D} to time sights. TIMES Bytes: 411.5 Checksum: #58138d %%HP: T(3)A(D)F(.); \<< DEPTH RCLF RCLMENU PATH \-> d f m p \<< IFERR { HOME SPARCOM NAV48D VARBLS } EVAL IF DEPTH d \=/ THEN DEPTH d - DROPN 58 DONAV48 END "To set date/time, press ENTER" CLLCD 4 DISP 0 WAIT TIME DATE ROT DROP 48 DONAV48 SWAP HMS\-> ZONE + 59 DONAV48 DUP2 ZONE 126 DONAV48 CLLCD 4 DISP 2 FREEZE WATCH - 59 DONAV48 'SVTIME' STO 'SDATE' STO THEN DEPTH d - DROPN END f STOF m MENU p EVAL \>> \>> When you run the program you are prompted to press ENTER. After pressing ENTER, the HP48 system time is stored as the default time for ADDOB. After running TIMES, run ADDOB and accept the default date and time. TIMES assumes that the HP48 time is set to ZONE TIME. Make sure that the HP48 system time is accurate when you use TIMES or set the watch error in INIT to the error in the HP48 system time. 12. True Wind ************************************************************ Computing the true wind speed and direction from the apparent wind and the motion of the vessel is a simple vector problem easily handled on the HP48. The simplest method from NAV48 is to use the MOTION key in INIT. Since the MOTION algorithm adds two vectors (current and motion), it is mathematically the same as the problem of computing true wind. The only practical difference is that the current is added to the motion to yield the net motion whereas the vessel's motion should be subtracted from the apparent wind to yield the true wind. This is easily accounted for: enter the apparent wind as the current but input the vessel's true course and the *negative* of the vessel's speed. By inputting the negative of the vessel's speed, the motion is subtracted from the apparent wind. The true wind is displayed as the net motion in INIT. Be sure that you reset the motion and current to their actual values when you are finished computing true wind!! Suppose you are sailing at 7 knots on a course of 48 true and you measure the apparent wind at 14 knots at 10 true. What is the true wind speed and direction? Run INIT and then MOTION. Input the current drift as 14 knots and then set as 10 true. Input the vessel's course as 48 and speed as -7. The true wind speed is 9.5 knots at 343 true. 13. Geographic Range **************************************************** The geographic range of an aid to navigation is the furthest distance from which the aid can be seen. It is the distance at which it just appears over the horizon. Of course, it generally cannot be seen at this distance due to various effects like the absorption of light by the atmosphere (haze) etc. However, the geographic range can be a useful quantity as it let's the navigator know the furthest possible range. The aid can never be seen further than the geographic range. Since the geographic range is, by definition, the range at which the object just appears over the horizon, the VANG program in the PILOT menu can be used to compute the geographic range. When the object just appears on the horizon, the angle from the object to the horizon is clearly zero. So, to compute the geographic range, run INIT to set your height of eye and to set the index error to zero, and then run VANG with the vertical angle set to 0.0 and the height of the object set to whatever the height of the aid is (as read off your chart). The computed distance off will be the geographic range. Obviously the distance off does not tell you how far you actually are from the object, it just gives the geographic range. For example, what is the geographic range of a 125 foot lighthouse when viewed from a height of eye of 8 feet? Run INIT and set the index error to zero and set the height of eye to eight feet. Then run VANG from PILOT and enter the vertical angle as zero and the height of the observed object as 125 feet. |---------------------| |Vert. Angle (dd.mmt) | | | |:VAngle: 0.0 | |:Height: 125_ft | |---------------------- The output screen is |---------------------| | | |Distance off: | | | | 16.34_nmi | | | |Horizon: 3.31_nmi | |Height of Eye: 2.4_m | |---------------------- The geographic range is 16.3 nmi. You must set the index error in INIT to zero since the VANG program corrects for the sextant index error, but this is not a real sextant observation. If you do not want to change the index error in INIT, you can input the negative of the index error as the vertical angle to turn off the index correction (the index error must be formatted in the current angle format): |---------------------| |Vert. Angle (dd.mmt) | | | |:VAngle: << INDX ->FMT NEG >> |:Height: 125_ft | |---------------------- This gives the same result as setting the index error to zero in INIT. 14. Other Software ******************************************************** Additional software which can be used with NAV48 is available from LCDR Robert Irving, USN (Ret). He writes: LCDR Irving has a set of programs for the HP48 SX & GX which provide for routine projection, cancellation, and reprojection of dead reckoning (DR) positions from prior celestial or non-celestial fixes. The programs provide for a running fix covering several hours between the first and second sights, which may be of the same of different bodies. Sight timing for a round of sights (limited in accuracy only by human reaction time) is provided with a singe button-press, and the sextant reading can be recorded immediately into the calculator, simplifying use of the Sparcom Nav Pac for celestial fixes. All functions in the Nav Pac remain available to the user. For users who have calculators not accepting the Nav Pac (HP-28S, HP-48 S & G), Irving has programs for airborne navigation prompting for ephemerides from the Air Almanac, and for surface navigation prompting from the Air Almanac or the Nautical Almanac at the user's choice. He also has a great circle planning and rhumbline programs for these same calculators, which provide for either distance or difference in longitude between the leg endpoints. For further information contact Irving at Marine Research, Inc. 9234 Cayuga Ave. Sun Valley, CA. 91352-1303 Note, I have no connection with Marine Research, Inc. This is for information only.