REM Surfave distance between points of latitude and longitude.
OPTION ANGLE DEGREES
DECLARE NUMERIC lat1,lat2,long1,long2,DOT,a,d
INPUT lat1,long1,lat2,long2
LET a=ACOS(COS(lat1)*COS(lat2)*COS(long1-long2)+SIN(lat1)*SIN(lat2))
PRINT "central angle ",a;"degrees"
LET d=10000*a/90
PRINT "surface distance ",d;"km"
END