Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,8 +1,11 @@
#!/bin/sh
#-
# © 2021 mirabilos Ⓕ CC0; implementation of Haversine GCD from public sources
# © 2021 mirabilos Ⓕ CC0 or MirBSD
#
# now developed online:
# implementation of Haversine GCD from public sources
# output is in metres (rounded to millimetres), error < ¼%
#
# now developed online: (user/pass public)
# https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=useful-scripts/mirkarte.git;a=blob;f=geo.sh;hb=HEAD
if test "$#" -ne 4; then
@ -23,8 +26,8 @@ export BC_ENV_ARGS
# h: haversine intermediate
# i,j: (lat,lon) point 1
# x,y: (lat,lon) point 2
# k: delta lat
# l: delta lon
# k: delta lat/ΔΦ
# l: delta lon/Δλ
# m: sin(k/2) (square root of hav(k))
# n: sin(l/2) ( partial haversine )
# n(x): arcsin(x)
@ -32,7 +35,7 @@ export BC_ENV_ARGS
# v(x): sign (Vorzeichen)
# w(x): min(1, sqrt(x)) (Wurzel)
bc -l <<-EOF
exec bc -l <<-EOF
scale=64
define n(x) {
if (x == -1) return (-2 * a(1))
@ -59,7 +62,8 @@ define w(x) {
return (sqrt(x))
}
/* WGS84 reference ellipsoid: große Halbachse (metres), Abplattung */
i = 6378137.000
/* (6378137 in WGS84); this radius from Astronomical Almanac 2021 */
i = 6378136.600
x = 1/298.257223563
/* other axis */
j = i * (1 - x)
@ -80,5 +84,3 @@ h = ((m * m) + (c(i) * c(x) * n * n))
d = 2 * r * n(w(h))
r(d, 3)
EOF
# output is in metres, rounded to millimetres, error < ¼% in WGS84