Post Reply 
(41C) Distance-Bearing from LAT-LON
01-31-2020, 10:51 PM
Post: #1
(41C) Distance-Bearing from LAT-LON
  A recent survey showed that within amateur radio … home micros dominate the scene … Presented here are … programs for … (… the Hewlett Packard HP41C/CV) to find the exact distance and bearing of any station, anywhere in the world.
  The only information required is the latitude & longitude of the distant station which is easily read from any World map found in the majority of amateur 'shacks', and these figures need only be approximate.
  In this way, no matter where the station you wish to contact is, you can have your beam pointing accurately at him in seconds.
  These programs are a considerable improvement on previous distance/bearing programs and are very accurate, simple to type in, user-friendly, and … are guaranteed to work! If required, the reader could use such programs as a basis to automatically rotate the beam using a digital to analogue converter.
  The amateur simply glances at his map, plugs in the rough coordinates and the micro does the rest!
  In use, the only listing changes needed are for your own QTH latitude & longitude;
    Lines 3 & 5 for the HP41C/CV
  Simply change the values shown (based on London) for your own. No other changes are needed.
  When prompted for lat/long of the DX station, values are entered as degrees NORTH and EAST. For example, Tokyo would be entered as 35,140, ie 35N & 140E.   Locations West of Greenwich and South of the Equator are entered as negative values; eg Sydney is entered as -34,152. The -34 indicates 'minus 34 degrees North' ie 34 deg South. Similarly, New York is 42,-74; -74 meaning 'minus 74 degrees East' ie 74 deg West. Accordingly, Port Stanley would be entered as -51.5, -57.6 and so on.
Program Checks
  Once you have entered your program it is advisable to test run it with the following data which cover all four 'quadrants' of the globe.
┌───────────────────────────────────────┐
│Location      Lat         Long      Distance     Bearing  │
│                                           (miles/Km)    (deg)   │
│Tokyo      35.40N    139.45E    5960/9591      32      │
│Sydney    33.55S    151.10E   10641/17123    63      │
│Honolulu   21.19N    157.50W   7420/11649   338      │
│Stanley    51.45S     57.56W   7846/12626     21      │
└───────────────────────────────────────┘
If your results agree, or nearly agree to those given, then all is well. If not, then you have made a typing error or errors entering the program. Check especially the lines with trigonometry … as these are the most likely sources of error.
  As a final word, these programs are simple but effective.
Code:

 1 LBL 'DIST
 2 FIX 0
 3 51.3
 4 STO 01
 5 -0.1
 6 STO 02
 7 'LAT N?
 8 PROMPT
 9 STO 03
10 'LONG E?
11 PROMPT
12 STO 04
13 RCL 02
14 RCL 04
15 -
16 COS
17 RCL 03
18 COS
19 *
20 RCL 01
21 COS
22 *
23 RCL 01
24 SIN
25 RCL 03
26 SIN
27 *
28 +
29 ACOS
30 STO 05
31 69.0468
32 *
33 CLA
34 'τD=
35 ARCL X
36 'τIMLS
37 AVIEW
38 PSE
39 RCL 01
40 SIN
41 RCL 05
42 COS
43 *
44 CHS
45 ENTER↑
46 RCL 03
47 SIN
48 +
49 ENTER↑
50 RCL 01
51 COS
52 RCL 05
53 SIN
54 *
55 /
56 ACOS
57 STO 06
58 RCL 04
59 X<0?
60 XEQ 'NEG
61 XEQ 'TRU
62 LBL 'TRU
63 CLA
64 RCL 06
65 'τBEAM
66 ARCL X
67 'τDEG
68 AVIEW
69 STOP
70 LBL 'NEG
71 360
72 ENTER↑
73 RCL 06
74 -
75 CLA
76 'τBEAM
77 ARCL X
78 'τDEG
79 AVIEW
80 STOP
source: Radio & Electronics World, Distance and Bearing Programs, SEP 1884, pgs. 45-46

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
02-01-2020, 08:47 PM (This post was last modified: 02-01-2020 08:50 PM by StephenG1CMZ.)
Post: #2
RE: (41C) Distance-Bearing from LAT-LON
"The only info needed is the lat and long of the distant station"...
I suspect the lat and long of both stations would be useful in calculating the distance Smile

"SEP 1884"
I know the HP41 calculator is old, but really, that belongs in Valentino's time travel story.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
02-01-2020, 11:46 PM
Post: #3
RE: (41C) Distance-Bearing from LAT-LON
(02-01-2020 08:47 PM)StephenG1CMZ Wrote:  "The only info needed is the lat and long of the distant station"...
I suspect the lat and long of both stations would be useful in calculating the distance Smile

Lines 3 & 5 for the HP41C/CV
Simply change the values shown (based on London) for your own.


This is the Museum of HP Calculators, no?

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
02-03-2020, 06:25 AM
Post: #4
RE: (41C) Distance-Bearing from LAT-LON
Thanks for the info.
Here’s a working link to the non-1884-but-less-time-travel-1984 Article (pdf) p.45;
Radio & Electronics World september 1984
There’s also 2 Basic versions (ZX81 & BBC-B).
The focal program doesn’t seam to use degrees but degrees minutes seconds and express results in English miles.
I don’t get the point of the 61 line !?
Travel space and time safely...
Find all posts by this user
Quote this message in a reply
02-03-2020, 01:42 PM
Post: #5
RE: (41C) Distance-Bearing from LAT-LON
(02-03-2020 06:25 AM)dayd Wrote:  I don’t get the point of the 61 line !?

The author of that article simply didn't understand FOCAL programming very well. Since he puts a STOP to end the program inside a subroutine, it never returns to the calling line, where the program should have been ended properly. It looks like it will run properly (as seen by the user) but it is structured poorly.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)