Jack changed the formula as he wished. #ThumbsUp
Okay, what about d=1 km? Should its formula be changed?
No.
The more general formula uses cosine.
So if you have an arc length (l), which is the distance to the horizon along the surface of Earth with radius r, from an observer with eye height h, you have a right angle triangle where the angle at the centre is a.
This gives:
d=r*a
Thus a=d/r.
It also means
cos(a)=r/(r+h).
Thus r+h= r/cos(a)=r/(cos(d/r))
Thus h=r/cos(d/r) - r=r*(1/cos(d/r)-1)
This is the physical formula which holds as long as refraction isn't an issue.
But again, this can be simplified if the angle is small enough.
cos(x)~=1-x^2/2, for small x.
So taking it in the form:
(r+h)*cos(d/r)=r
And applying the simplification we get:
(r+h)*(1-0.5*d^2/r^2)=r
r*(1-0.5*d^2/r^2)+h*(1-0.5*d^2/r^2)=r
r-0.5*d^2/r+h*(1-0.5*d^2/r^2)=r
h*(1-0.5*d^2/r^2)=d^2/2r
Now, as d<<r, then d/r<<1, and thus (d/r)^2<<1, and thus 1-0.5*(d/r)^2~=1
This again gives us:
h=d^2/2r.
One is an approximation, one is not.
To determine which one you need, you need to see if d/r is small, and what your cutoff is.
You can also put both of these into google (normalised to r) to see the difference, e.g. searching for x^2/2 and 1/cos(x)-1, or the difference between them, 1+x^2/2-1/cos(x).
As an example, using r=6378, you get these values (note, d is in km always, h (and dif) is in m up until and including d=100, after than (from d=500 onwards) h and diff are in km).
| d | h simp | h act | diff |
| 0 | 0 | 0 | 0 |
| 1 | 0.0782840144042587 | 0.0782840157944609 | 1.39020221723296E-09 |
| 5 | 1.95710036010647 | 1.95710086003076 | 4.99924291963438E-07 |
| 10 | 7.82840144042587 | 7.82840943626795 | 7.99584208177606E-06 |
| 50 | 195.710036010647 | 195.715033579948 | 0.00499756930139483 |
| 100 | 782.840144042587 | 782.920111136535 | 0.0799670939479711 |
| 500 | 19.5710036010647 | 19.6211029091228 | 0.050099308058094 |
| 1000 | 78.2840144042587 | 79.0916566366371 | 0.807642232378484 |
| 2000 | 313.136057617035 | 326.460781429205 | 13.32472381217 |
| 5000 | 1957.10036010647 | 2622.56488352141 | 665.46452341494 |
| 10000 | 7828.40144042587 | 1242045.27828033 | 1234216.87683991 |
Even when d=100 km, the difference between the 2 is only 8 cm.
"Currently Phew is the fastest growing formula to destroy pi." - John Lennon
Is that what you call yourself?
You are yet to destroy pi in any way.