| |
|
|
p.specht
|
Window Title " KÜRZESTER NAUTISCHER STARTKURS (Erdkugel R = 6371.221 km)"
'Sphärische Geometrie - angeregt of ´User0815´ (CL) CopyLeft 2018-03 P.woodpecker, without Gewähr
Window Style 24:font 2:Declare lat0!,lon0!,lat1!,lon1!
var f!=pi()/180:var R! = 6371.221'km
:Proc ArcCos :Parameters w!:declare ac!:If w!=1:ac!=0:elseif w!=-1:ac!=pi()
else:ac!=Pi()/2-arctan(w!/Sqrt(1-Sqr(w!))):endif:return ac!:ENDPROC
Proc Startkurs :parameters lat0!,lon0!,lat1!,lon1!
var cosg!=sin(lat0!)*sin(lat1!)+cos(lat0!)*cos(lat1!)*cos(lon1!-lon0!)
return arccos(cosg!)
endproc
proc Dist :parameters lat0!,lon0!,lat1!,lon1!
return R!*StartKurs(lat0!,lon0!,lat1!,lon1!)
endproc
Start:
Cls rgb(200+rnd(56),200+rnd(56),200+rnd(56))
print "\n\n Coordinates the Ausgangspunktes"
print "\n Geogr.wide Phi° Äquator against north [+/-0...90, Lat.°]:",:input lat0!
print "\n Geogr.length (Lambda° Greenwich gg.West [+/-0..180, Lon.°]:",:input lon0!
print "\n\n Coordinates the Zielpunktes"
print "\n Breitengrad [Latitude °]:",:input lat1!
print "\n Längengrad [Longitude °]:",:input lon1!
:if (lat0!=0) and (lon0!=0) and (lat1!=0) and (lon1!=0):font 0
:Print "\n\n SELBSTTEST: Leningrad -> SanFrancisco: Please Verify: 79.74°, 8867 km ???"
:lat0!=59.9:lon0!=-30.3:lat1!=37.8:lon1!=122.4:font 2:endif
lat0!=lat0!*f!:lon0!=lon0!*f!:lat1!=lat1!*f!:lon1!=lon1!*f!
Print "\n\n course with departure: ",\
Startkurs(lat0!,lon0!,lat1!,lon1!)/f!," °"
print "\n Gesamtdistanz: ",\
Dist(lat0!,lon0!,lat1!,lon1!),"km"
waitinput:Goto "Start"
|
|
|
| XProfan 11Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 05/27/21 ▲ |
|
|
|
|
p.specht
| Großkreisdistanzformel testing ====================== how far are the * Nashville international Airport (BNA), Tennessee/USA with the Coordinates 36°7.2' Nördl.wide, 86°40.2' (in Dezimalgrad: 36.12, -86.67), and the * Go Angeles international Airport (LAX), California/USA 33°56.4' n, 118°24.0' W (Dezimalgrad: 33.94, -118.40) in Luftlinie voneinander removes? (an Rosettacode-task).
|
|
|
| XProfan 11Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 05/29/21 ▲ |
|
|
|