Post Reply 
49 50 Ver6.09.hp Geodesic distance & Earth Euclidean distance calculator, bearing
03-15-2021, 02:25 PM
Post: #23
RE: HP49-50G Geodesic distance calculator
RE: HP49-50G
Geodesic distance calculator
Version 4.3
New

Very slight, "cosmetical" changes.

You can use your previous versions as they are.

But now I added 2 columns in the Result-Matrix for the multiple points distance calculation.

I thought nice to have, when entering in one step several points, to get also the Euclidean, straight line distances s.0 between them, as I did previously for the ellipsoidal distances s.

Meaning of Matrix Result (in DATA.DIST directory).
The 1st column describes "from where to where."
The 2nd column gives the corresponding s ellipsoidal distances.
The 3rd, new column gives the Euclidean, straight lines s.0 distances.
The 4th, last and new column checks that calculated ellipsoidal s distances are really > than Euclidean, straight line s.0 distances. Note: the formulae are correct, but because of rounding errors, it may happen that calculated s.0 is just — unduly — somewhat > calculated s (normally by less than 0.1 mm) ; in that case, both results are almost correct (as always to 0.1 mm), or no one is absolutely correct (remember that Vincenty's gives accurateness within 0.1 mm).

Go to DATA.DIST directory and try for instance
{ (45 0) (45.01 0 }
and press program P1.. P2—>Ss (S stands for capital, Greek sigma).
Then wait and edit the Result-Matrix appearing on the stack, go to last column and see the commentaries. Examine then last line/2nd column (s value) and last line/3rd column (s.0 value) ; you will see that the calculated ellipsoidal distance s 1852.19895819 is — unduly — < the Euclidean distance s.0 1852.1990012. In that case, the difference is -.04301 mm : a tiny value... that of course should be positive, and is positive in reality.

Here are the 2 full codes relative to the multiple distance calculation:

P1.. P2—>Ss
\<< "Enter min. 2 Points

\[] w/ their Names in {}
Example: {Pt1 Pt2}

Note: 'Pt_i' RCL
(lat_i, lon_i)

\[] or directly Complex
# values in {}
{ (lat_1 lon1)
(lat_2 lon2) }

\[] lat_i lon_i in [\^o's]
" DROP DUP SIZE 'siz' STO 'l0' STO { } 'ls' STO { } 'ls0' STO l0 EVAL siz \->LIST 'lc' STO 1 siz 1 -
FOR i lc i GET lc i 1 + GET UPDIR P1P2\->s s.0 s >
IF
THEN DROP
END 8 DROPN DATA.DIST 'ls' s STO+ 'ls0' s.0 STO+
NEXT
IF siz 2 >
THEN ls \GSLIST 'lst' STO ls0 \GSLIST 'ls0t' STO
ELSE ls 1 GET 'lst' STO ls0 1 GET 'ls0t' STO
END \->RESULT { siz l0 lc ls lst ls0 ls0t } PURGE UPDIR
\>>


—>RESULT
\<< 1 CF siz 2 + 4 2 \->LIST 0 CON { 1 1 } 'm' PUT { 1 2 } 's' PUT { 1 3 } 's0' PUT { 2 1 } 'Total' PUT { 2 2 } lst PUT { 2 3 } ls0t PUT { 3 1 } '\175' PUT { 3 2 } '\175' PUT { 3 3 } '\175' PUT { 3 4 } '\175' PUT { 1 4 } 'TEST\166s>?s.0' PUT 1 siz 1 -
FOR i i 3 + 1 2 \->LIST l0 i GET \->STR "\|>" + l0 i 1 + GET \->STR + "'" "" SREPL DROP "," "\166" SREPL DROP "(" "" SREPL DROP ")" "" SREPL DROP "-" "\172" SREPL DROP "\166" SWAP + OBJ\-> PUT i 3 + 2 2 \->LIST ls i GET PUT i 3 + 3 2 \->LIST ls0 i GET PUT i 3 + 4 2 \->LIST ls i GET ls0 i GET <
IF
THEN 'Tiny.Error' 1 SF
ELSE '\175'
END PUT { 2 4 } 1 FS?
IF[/b]
THEN 'Attention!'
ELSE 'All.dist\166OK'
END PUT
NEXT DUP 'RESULT' STO
\>>

Included here, as usual, the full Directory.
Copy and save it into your calculator under the simple name DIST4.3, for instance, and enjoy it.

Regards,
Gil Campart


Attached File(s)
.doc  GEODESIC_DIST.Calculator4.3.doc (Size: 12.39 KB / Downloads: 5)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP49-50G Geodesic distance calculator - Gil - 03-15-2021 02:25 PM



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