Are Lynch's Horizon Calculations correct?

Simple diagram. The angle s is easy to calculate from H and Z, so we just take that angle and assume it's from the horizon, so convert it to a tangent fraction

I'm not sure we're in sync based on your drawing. Everything is rotated about the x-axis by exactly the 'Horizon Dip' angle (you seem to be showing the Horizon Sagitta angle) to make the Horizon peak go from [0,H,Z] to [0,0,D].

As shown because H*cos(atan(H/Z) - Z*sin(atan(H/Z)) = 0 (always, doesn't matter what H & Z are) and
H*sin(atan(H/Z)) + Z*cos(atan(H/Z)) = D giving our definitions of H & Z in terms of h & R.

So this would be a counter-clockwise rotation of the world about the camera (or tilting the camera down so the horizon peak is dead center of our view) in the below diagram. The purple line would become straight across.


upload_2016-9-2_18-38-49.png

Question is, should a rotation around [0,0,0] change the final result in terms of #pixels of the Sagitta? it seems to, just a bit


Where you said:

Seems like you are calculating the screen pixels of the sagitta dip when the camera is centered on the horizon?

This is a correct statement as best I can understand. But then said:

aka (the fraction of the width of the screen the sagitta would cover if turned horizontal) * (the width of the screen in pixels)

Which is incorrect to my understanding.

I'm simply pointing the camera down a few degrees (atan(H/Z) to be exact) to put the horizon peak dead center in the camera. So I'm *NOT* talking about the orange line here (Horizon Sagitta Angle θ) but rather the angle 90°-β, where β = asin(R/(h+R))

That's the part that is confusing me as you seem to be using by θ in your diagram (a smaller angle).

HorizonGeometryGuide.png

I've marked up your diagram here to hopefully explain better:

mick-diagram-rotation.jpg
 

Attachments

  • Horizon3DCoordinates.png
    Horizon3DCoordinates.png
    16.2 KB · Views: 405
Adde Horizon Curve to the calculator (needs to bit a cleanup, and showing working).

Nice but maybe should use the rotated equation? - it's only fractionally different but it's a lot easier to put the horizon on the center mark than it is to put the unmarked spot that is 'dead ahead' in the center (and you get less lens distortion in the middle)?

I found an error in my previous post and have corrected it here - this enabled the equation to be greatly simplified.

Here is the math again for review:

B = [Z*sin(a/2), H, Z*cos(a/2)]

And we rotate, for our small angles the cos(u) term will the majority of the value, and we shift a tiny bit into sin(u). So this means y' is almost the same as H, and z' is almost the same as z:

x' = Z*sin(a/2)
y' = H*cos(u) - (Z*cos(a/2))*sin(u)
z' = H*sin(u) + (Z*cos(a/2))*cos(u)

B' = [Z*sin(a/2), H*cos(u)-(Z*cos(a/2))*sin(u), H*sin(u)+(Z*(cos(a/2))*cos(u)]


and project into 2D by dividing x and y by z:

B" = [(Z*sin(a/2))/(H*sin(u)+(Z*(cos(a/2))*cos(u)), (H*cos(u)-(Z*cos(a/2))*sin(u))/(H*sin(u)+(Z*(cos(a/2))*cos(u))]

This is why you need special video cards to play games at high framerates...

Our Δy is therefore just B" y value:

H*cos(u) - (Z*cos(a/2))*sin(u)
Δy = -------------------------------
H*sin(u) + (Z*cos(a/2))*cos(u)


Divide Δy by 2 times B's rotated x-extent (x/z now) to get our ratio (I multiply by the inverse here):

H*cos(u) - (Z*cos(a/2))*sin(u) H*sin(u)+(Z*(cos(a/2))*cos(u)
------------------------------ * -----------------------------
H*sin(u) + (Z*cos(a/2))*cos(u) 2*Z*sin(a/2)


The first denominator and the second numerator cancel out leaving:

H*cos(u) - (Z*cos(a/2))*sin(u)
------------------------------
2*Z*sin(a/2)


and multiply by our horizontal pixel count to scale back to pixels, giving our formula:

H*cos(u)-(Z*cos(a/2))*sin(u)
Sagitta Pixel Height = p * ----------------------------
2*Z*sin(a/2)


Forum doesn't seem to like the leading white-space so:

Sagitta Pixel Height = p * (H*cos(u)-(Z*cos(a/2))*sin(u))/(2*Z*sin(a/2))

and u = arctan(D/R) = arctan(H/Z)


Desmos: https://www.desmos.com/calculator/utdk0p4v4b

My focus now is trying to get a Lynch equation to give a proper curve. Any help is greatly appreciated :)
 
Last edited:
I think it's related to the fact that my method returns a fraction of the width of the image. This is NOT the same as an angle, but I think it's far more useful. You can convert this accurately to pixels, but you cannot convert it to degrees. At least not in a straightforward manner. My calculation of the "Angle" was simply multiplying the fraction (0.00812206) by the FOV (62.7). But the ratio between distance across the image and angles varies with the distance from the center of the screen.

Consider this setup (viewed from above):
20160830-132014-uvk87.jpg
There's a yardstick against the wall (36 inches long). There's a camera pointed at the center of the yardstick (18"). On the right I've marked two sections A and B, both are 9" long. I've also marked the angles made by the sections at the camera. Notice that the angle closer to the center (b) is larger than the angle on the outside (a). This is more apparent if we have a wider field of view:20160830-132403-47eu1.jpg

However the two sections on the photo take up the same number of pixels. So that's why you can't just multiply the fraction by the FOV to get the angle. The further from the center you go, a single pixel has a reduced angle
So how do you convert? Well let's say the image has a width of 1.0 (to match the fraction we got earlier). So the distance from the center of the image (k) is -0.5 to 0.5. If the FOV is a°, then the FOV similarly goes from -a/2 to +a/2, then the angle for a distance k is atan(2*k*tan(a/2)).

(i.e. it's a fraction of the tangent of the angle, not a fraction of the angle)

If we apply that simply to the fraction, we get:
https://www.wolframalpha.com/input/?i=solve+180/pi*atan(2*0.00812206*tan(a/2)),+a=(62.7+degrees)

= 0.567

This is not exactly correct as the angle is a bit below the center of the screen, but it's close as the relative error is small near the center and the edge.


This bit is concerning me now as with Lynch we're supposed to get the angular size at some FOV -- but it doesn't seem to be giving us that.

If I plot this angle (which matches the geometry angles) then I get a much steeper curve than Lynch's

"Vertical angle below the true horizon (degrees)".

We've been plotting your "ratio" times the FOV which are these dashed lines. But using atan(2*f(h,a)*tan(a/2)) I get the solid black lines. While Lynch's lines are even more shallow than the dashed lines.

Thoughts?

upload_2016-9-6_16-45-17.png
 
I think I found another issue with our model Mick :(

We're applying FOV as if we're in the center of the horizon circle (distance Z) rather than from observer (distance D).

In practice it's only a small error as Z and D are pretty close but would increase with height.

But not sure yet how to find the intersection of the FOV and the horizon circle. What do you think? Does it matter?
 
I think I found another issue with our model Mick :(

We're applying FOV as if we're in the center of the horizon circle (distance Z) rather than from observer (distance D).

In practice it's only a small error as Z and D are pretty close but would increase with height.

But not sure yet how to find the intersection of the FOV and the horizon circle. What do you think? Does it matter?

I'm assuming the camera is looking along the level line, so FOV is a segment of the horizon circle.
 
I had somehow missed this thread and just wanted to say it's very useful. Hardly any discussion of horizon curvature seems to discuss WHY the horizon does or doesn't look curved, or make it clear that the visual curvature of the horizon is really a quite separate issue from the curvature of the Earth itself (in fact if you know the size of the horizon circle and the height of the observer above it then you can totally ignore the Earth's curvature, as far as I can see!)
 
I had somehow missed this thread and just wanted to say it's very useful. Hardly any discussion of horizon curvature seems to discuss WHY the horizon does or doesn't look curved, or make it clear that the visual curvature of the horizon is really a quite separate issue from the curvature of the Earth itself (in fact if you know the size of the horizon circle and the height of the observer above it then you can totally ignore the Earth's curvature, as far as I can see!)

Yes, I don't think the fact that it's a slice of a spheroid matters much in practice because it's a very thin slice (all things considered) and you can't see past that tangent line -- it matters as to what you see where, but not as to how the horizon line itself appears.

For me the big realization from this exercise was that at 35k' or 100k' a huge chunk of what you actually can make out visually isn't anywhere even near the horizon edge -- you get 100's of miles bunched up in a fraction of a degree along the horizon. So your effective horizon is much smaller than the actual horizon.

In fact, I think even FE agree that the horizon is a circle (they just appeal to magical perspective and 'vanishing points') so it really wouldn't be "Flat" even in THEIR model. They just like to make random assertions that don't fit together in a cohesive model.

I just want to be able to calculate what the edge of such a circle *should* look like :)

Welcome to the fun -- there are still unanswered questions here if you think you can help out please jump in.

#1 issue - should we be using atan(2*f(h,a)*tan(a/2)) to get the true angular size? Is that different than what Lynch plotted and why? My current calculations are here on Desmos

#2 issue - how do I intersect my FOV lines with my tilted circle? [I agree with Mick that in the simpler case since it's perfectly rectilinear it should be ok to use Z*cos/Z*sin but when I tilt 'down' (aka rotate everything up) I'm pretty certain I can see proportionally more curve [based on a physical experiment I did]

#3 issue - how can we reproduce the Lynch curves?
 
Welcome to the fun -- there are still unanswered questions here if you think you can help out please jump in.

I need to study the diagrams etc properly to get a grip on the terminology when I have the time.

Quick question, though, have you extended your examples way out into space to see how the calculations hold up? As you shift your viewpoint higher and higher above the globe in, for example, Google Earth, there's a kind of shift in perception where you go from looking at a slightly curved horizon to looking at the outline of a planet. Nothing is really changing, it's just a perception issue once the curve becomes noticeable enough and the FOV becomes wide enough.

For example when you are at a given height h such that the distance to the horizon is equal to the radius of the Earth r, then a 90-degree field of view will exactly span the entire horizon. (This occurs when h = (sqrt2 - 1) r, in other words h = 1639.87 miles approximately.)


upload_2016-9-8_17-11-57.png

So the "horizon dip angle" is 45 degrees. What does the "tilt angle", of exactly 1 radian, refer to here?
 
So the "horizon dip angle" is 45 degrees. What does the "tilt angle", of exactly 1 radian, refer to here?

In some of the calculations there's an assumption that the "distance" is the straight line distance, and in others it's the arc distance. If you click on "advanced" the working is show for tilt and dip:
https://www.metabunk.org/curve/?d=3959&h=8658521&r=3959&u=i&a=a&fd=60&fp=3264
Tilt is angle between vertical at the two locatons
The amount a distant object is leaning away from you
It's the distance divided by the radius (in radians)
d/r = 20903520.00/20903520 = 1.00000000 radians, *180/PI = 57.29577951 degrees
Horizon Dip is the angle that the horizon is below level
as seen from the viewer height
It's arcsin(a/(r+h)), or arcsin(20903519.31/(20903520.00+8658521.00)) = 0.78539815 radians, *180/PI = 44.99999906 degrees
Content from External Source
 
And the Horizon Curve calculations are only show under "advanced"

Horizon Curve Fraction = 0.13397
Horizon Curve Pixels = 437.29
Horizon Curve Angle v1= 4.10661
Horizon Curve Angle v2 = 8.79398

Content from External Source
My assumption with the "fraction" and "pixel" calculations is that you are looking level, not at the horizon.
 
My assumption with the "fraction" and "pixel" calculations is that you are looking level, not at the horizon.
That makes sense. And was wrong when I said that a 90-degree FOV at this height would let you see the full horizon. A 90-degree FOV would only show a quarter of the circle.

upload_2016-9-8_18-54-40.png

To get "horizon curve fraction = 0.5", you need a 180 degree FOV at that height.

(To get the horizon curve to equal 0.5 in a 90-degree FOV you would need a height of about 6386 miles, by trial and error, but I haven't figured out how to derive that yet!)
 
If you look straight down towards the center of the earth with a 90 degree FOV, you get a full width view of the Earth at 3959*(sqrt(2)-1) miles up. 1640 miles, and this can be verified in google Earth:

20160908-120553-ntmf1.jpg

If we tilt this view up 45 degrees, things look a little odd
20160908-120925-7svte.jpg
 
If we tilt this view up 45 degrees, things look a little odd
I don't have Google Earth installed on this machine. If you keep the tilt at 45 degrees, does the horizon exactly fit the frame with a 180-degree horizontal FOV (and 90-degree vertical FOV)?
 
I don't have Google Earth installed on this machine. If you keep the tilt at 45 degrees, does the horizon exactly fit the frame with a 180-degree horizontal FOV (and 90-degree vertical FOV)?

GE only goes up to 110°

20160908-135517-3vm25.jpg

But why would it fill the frame at 180°? You'd have to be on the ground, looking straight down at the ground.
 
But why would it fill the frame at 180°? You'd have to be on the ground, looking straight down at the ground
Well yes you'd think so. I was trying to work out the behaviour in Google Earth, where the horizon seems to get wider when you tilt the camera up. It doesn't seem to behave like it should. And your curve calculation gives a value of 0.5 with a 180-degree field of view. A "horizon curve fraction" of 0.5 is equal to half a circle, isn't it?
 
Well yes you'd think so. I was trying to work out the behaviour in Google Earth, where the horizon seems to get wider when you tilt the camera up. It doesn't seem to behave like it should. And your curve calculation gives a value of 0.5 with a 180-degree field of view. A "horizon curve fraction" of 0.5 is equal to half a circle, isn't it?

No, it's equal to half the field of view.

My curve fraction equation is just the rectilinear projection of the point of intersection of the FOV with the horizon. The equation does not really make sense for something like 180° FOV.
 
And if you think about it, a 180° FOV is impossible for rectilinear projection, as the focal length approaches zero the distortion of the image asymptotically approaches infinity, pushing everything to the edges of the image.

And for practical purposes, around 110° is a quite reasonable limit for the type of images we are talking about. My interest here is in measuring the horizon curve from photographs taken with a rectilinear lens. The widest consumer RL lens seems to be the Canon 11-24mm at 126° ($3,000), but the more common wide angle lens is 16mm (10mm on APS-C cameras like my 7D) at 108°
 
Yes I was right first time with the 90 degree FOV at that height. I don't see why the Earth appears to take up a wider angle when the camera is tilted up though.
 
Yes I was right first time with the 90 degree FOV at that height. I don't see why the Earth appears to take up a wider angle when the camera is tilted up though.

It's rectilinear distortion. It's somewhat easier to picture what is going on if you imagine the globe being inside a cube (or the horizon circle being inside a square).
 
Last edited:
I was finally able to turn doctorbuttons equations into a graph. Looks like they land on the OTHER side of lynch however - he is reviewing them to see if mine matches his.

https://www.desmos.com/calculator/sxau896szv

H, Z, D - remain unchanged

x=FOV/2
X=2*D*sqrt((sin^2(x/2)*(R^2-D^2*sin^2(x/2)))/R^2)
S=R-sqrt(R^2 - X^2)
Lynch = arctan(S/D)

Note that X is derived from this equation: 2*arcsin(sqrt(X^2 + S^2)/(2*D))

Which would convert this odd 'off angle' to FOV/2 - I substituted and solved for the FOV/2 angle to get the new X equation above.

We continue to review.
 
So we confirmed those previous equations do not match Lynch's curves, so that's a bust.

I think the true/geometric angle is the best information we have and it's pretty far from Lynch (compared to some of the other curves, but it's not so far off).

Given:
h = height
a = FOV
R = Earth Radius(3959)

We have:
ß = arcsin(R/(h+R))
D = sqrt(h*(h+2*R))
Z = (D*R)/(h+R)
S = (h*R)/(h+R)
H = S+h

u = 90°-ß = arctan(H/Z) = arctan(D/R)
v = arctan(H/(Z*cos(a/2))) = arctan(D/(R*cos(a/2))

True geometric angle = v-u

That doesn't get you to pixels mind you - this is just the angle at O between K & P on my diagram.

Substitute & simplify:

arctan(H/(Z*cos(a/2)))
arctan(((h*R)/(h+R)+h)/(Z*cos(a/2)))
arctan(((h*R)/(h+R)+h)/(((sqrt(h(h+2*R))*R)/(h+R))*cos(a/2)))
arctan(sqrt(h(h+2*R))/(R*cos(a/2)))
arctan(D/(R*cos(a/2)))

arctan(H/Z)
arctan(((h*R)/(h+R)+h)/Z)
arctan(((h*R)/(h+R)+h)/((sqrt(h(h+2*R))*R)/(h+R)))
arctan(sqrt(h(h+2*R))/R)
arctan(D/R)

Which gives us:

True geometric angle = arctan(D/(R*cos(a/2)) - arctan(D/R)
or
True geometric angle = arctan(sqrt(h*(h+2*R))/(R*cos(a/2))) - arctan(sqrt(h*(h+2*R))/R)

That curve is significantly steeper than Lynch's curves but I am 99% certain that it is the correct geometric angle - I don't know if that is what Lynch intended for sure but I thought it was. These angles match the GeoGebra calculator also.

Desmos calculator

Here are the curves overlayed with Lynch's diagram (Lynch in red again):
upload_2016-9-14_20-30-24.png
 
Spherical Trig Help Needed :)

I had posted a blog post about viewing the horizon from high-altitude, roughly based on Lynch's paper 'Visually discerning the curvature of the Earth' -- or so I thought.

One problem with such calculations is we're talking about small quantities and since I had created my calculator in GeoGebra I was pretty confident that the values I were getting were correct so I didn't really test them as carefully as I should have.

A friendly person did a little 'peer-review' and started asking me some questions and I had to agree, something wasn't right. Now, I freely admit that my calculator is just an approximation (to avoid one bit of spherical conversion that doesn't change the end result much) but it should be accurate enough for realistic altitudes (35,000' and maybe a balloon at 120,000'); so I'm not worried about that part so much.

But it turns out I had definitely misunderstood Lynch's intended geometry and after a bit of work I *THINK* I see where we disagree.

So now I'm here looking for additional input and review. Meanwhile, I have flagged that section of my post as under review.

So you can review Lynch's paper and then compare my blog post and see what you think.

I created the diagram below to aid in discussing my model. Please distinguish if you are talking about this 'Darkstar' model or Lynch paper when referring to geometric labels. In this version I made both LOS arc and FOV arc spherical. That's really the only difference with my GeoGebra model (and the way things are labelled a bit).

What I *think* the Lynch model is doing (in terms of this diagram) is pushing points B & C out to the Orange "Earth Circumference" curve, and his X is a function of the FOV (chord C->B) and his S is the sagitta of THAT arc of R=Earth Radius (so rotate that whole YXR triangle and attach to midpoint of B&C and then other end at B (or C doesn't matter).

What makes me suspect this is that in Lynch's paper his S & R are in terms of Earth Circumference -- but his X calculation isn't given so it took some work with another person to sort this out in my mind (wasn't obvious to me).

So the question is -- IF (and that's a big IF) my understand of Lynch is correct -- isn't that the wrong geometry to be using? You cannot see the Earth circumference along that slice EXCEPT at Horizon/D (well, in practice you can't see that either due to atmosphere but we're talking ideal model here).




For calculation purposes let's stick to Lynch's example:

h = 35000' (observation height ~6.6288 mi)
R = 3959 mi (approx Earth Radius)
h.FOV ~ 62.7
v.FOV ~ 47.1

In my model I get a very small angle (0.041°) because you can see that the last ~33 miles (which is approximately where points B & C cut across) is almost completely coincident with the views line of sight. The angle between viewer->Z and viewer->horizon here is that 0.041° so that's how much my model says that horizon would be 'stick up' over that B->C chord from our viewpoint.

We both agree on the first few calculations:

(1) first I solve big right triangle for D and β: (R+h)² = R² + D²
(2) D = sqrt(2*R*h + h²) = ~229.196 mi
(3) β = asin(R/(R+h)) ~ 86.687°
(4) α = acos(R/(R+h)) ~ 3.313°

Here we Diverge... for Darkstar model:

X = (D*sin(β)) = 228.81295 mi -- this is the radius of my horizon circle (just a little shorter than D)

And we take the chord B->C, calculate the sagitta of that, and then we take the angular delta along that line of sight -- which is very small because that distance is all very tilted along our line of sight.


Working Lynch backwards he gets ~0.51° -- so that implies...

2*atan(S/D/2) = 0.51° (angular size of S at distance D)
S ~ 2.037 mi (height of sagitta)

S = R - sqrt(R² - X²)
X ~ 126.993 mi

I'm still working on how to calculate his value for X given h.FOV -- I have an idea and it's close to D*tan(h.FOV/2) but I have to adjust for S.


Thoughts?


Here is what my side view looks like however and viewer height and the circle of the Earth here are trivially correct so that's an accurate view as far as that goes. You can see how sharp that angle becomes as you get closer to the horizon point. Z here is 33.4 *MILES* (β Curvature Distance) from the horizon. Even if I have everything else wrong human beings are NOT seeing most of that 'distance to the horizon' as more than a tiny smear and an anthill at Z would completely block it :)

'Circle Diameter' here is that bottom red line. Distance to Base is viewer total distance to the bottom red line (viewer->X), Height is viewer->Y

upload_2016-8-27_18-13-53.png

thoughts on my diagram (not as pretty as yours but I submit it for your perusal)

updated apparent curvature.jpg
 
Last edited by a moderator:
this is my understanding of what the apparent curvature of the horizon would be from any height, given that a 60 degree field of view. I had uploaded a prior version of this somewhere up here---will be looking for it, if it is still up, in order to take it down. All the supporting equations are correct but the final 'C'= (apparent curvature) was completely wrong. It was correct in my spreadsheet, but I had simply written it wrong. This is the corrected version, both an isometric and a section through it. Some answers it provides are: at 500 feet, c= 0.0578 degrees; at 10,000 feet, c=0.271 deg.; at 100,000 feet, c=0.871 deg; at 50 miles, c=1.436 deg; at 250 miles, c=3.45 deg. The horizon lies in a plane that is H+Ms below the observer. It's only true curvature is R=X in the diagram, so the only curvature you perceive vertically is by way of perspective.
apparent curvature corrected.jpg
 
Last edited by a moderator:
@Mino Re - Your method of figuring this looks like it may have some simplifications over my method. But how did you come to Theta=60/cos(S)? It looks good for small S but as S approaches 90deg then it looks to me like Theta should approach something like 180deg rather than infinity.
 
It looks to me like the X lines in Mino Re's diagram are straight because they are just the radiuses of the horizon circle.

By the way, I also tried emailing Lynch at his Caltech email address on Aug 27 to ask for the formula that he used to calculate his figure 7, but he hasn't got back to me. Maybe my email got spam filtered.

I wonder why this thread appears for me as the 14th thread below a horizontal blue bar in the Flat Earth forum even when the threads are sorted by most recent post and this thread has the most recent post? It seems like it should be at top. I missed a lot of the active threads for a while because I didn't think there was anything new way down there. Is this an issue just for me or is this a known bug?
 
Oh, the ones above are pinned. I didn't notice the pins. Ok, I guess there is nothing wrong then.
 
@Mino Re - I see how we can find θ easily. You have a line labeled with length D that makes a chord across the horizon circle. This chord is split in half at the meeting point of the segments Mx and (X-Mx). Lets label half that chord Mw. You have the field of view as 60deg but I want to keep this formula general for different fields of view so I'm just going to call the field of view Fov. So:
D*sin(Fov/2) = Mw
and
X*sin(θ/2) = Mw
therefore substituting out Mw gives:
X*sin(θ/2) = D*sin(Fov/2)
and solving for θ:
θ = 2 arcsin(sin(Fov/2)*D/X)
I'm going to study the calculations of Mick West and DarkStar upthread before I finish this.
 
I'm going to study the calculations of Mick West and DarkStar upthread before I finish this.

Note these are encoded in the advanced version of the calculator, so you can compare actual numbers easily.

https://www.metabunk.org/curve/?d=4&h=6&r=3959&u=i&a=a&fd=60&fp=3264

Horizon Curve Fraction = 0.00010
Horizon Curve Pixels = 0.33
Horizon Curve Angle v1= 0.00672
Horizon Curve Angle v2 = 0.00672

Content from External Source
In the page code as:
Code:
		// For horizon curve, via:
		 // https://www.metabunk.org/are-lynchs-horizon-calculations-correct.t7877/#post-189546
		 // Intermediate forms
		 // Z=(R*sqrt((R+h)^2-R^2))/(R+h))
		 // H=(((R+h)^2-R^2)/(R+h))
		 // ratio = SQRT(h*(h+2*R))/R*tan(a/4)/2
		 // angle = (atan(Z/H)-atan(Z*cos(a/2)/H))

		 var fovRadians = Math.radians(fovDegrees);
		 var dropFraction = Math.sqrt(h*(h+2*r))/r*Math.tan(fovRadians/4)/2;
		 var dropPixels = dropFraction*fovPixels;
		 var Z = (r*Math.sqrt((r+h)*(r+h)-r*r))/(r+h);
		 var H = (((r+h)*(r+h)-r*r)/(r+h));
		 var dropAngle = (Math.atan(Z/H)-Math.atan(Z*Math.cos(fovRadians/2)/H))

		 // Second method via: https://www.metabunk.org/are-lynchs-horizon-calculations-correct.t7877/#post-189661
		 var dropAngle2 = Math.atan(2*dropFraction*Math.tan(fovRadians/2))
 
@Mino Re - A couple more things I forgot. Can't we just calculate S as 90-R rather than that complicated arctan of a radical formula? And one of your diagrams has R as 3969mi. But the sources I've looked at make that look too big as an average earth radius even if you include the land, and I'm assuming we're using sea level for our R. Regardless of the precisely correct value, it would probably be best for us all to use the same R of 3959mi just to make it easier to compare the results of our various calculations. While I would normally use metric for my calculations, I use miles for flat earth calcs because it has been said that most flat earthers are American and I want to keep it as familiar to them as I can.

@Mick West - Thanks for putting the relevant code snippet right in front of me. Hopefully I can get to it tomorrow. Another thing you might consider adding to your calculator is a way for a photographer to determine the field of view of their camera. For example you could have the user take a picture of a tape measure and enter the distance to the tape and the tape readings on the left and right side of the picture.
 
@Mick West - Thanks for putting the relevant code snippet right in front of me. Hopefully I can get to it tomorrow. Another thing you might consider adding to your calculator is a way for a photographer to determine the field of view of their camera. For example you could have the user take a picture of a tape measure and enter the distance to the tape and the tape readings on the left and right side of the picture.

There's actually a slight problem with that method - the field of view changes quite significantly with focus! I was doing the test indoors until I found out I needed at least 30m from camera to tape to make it accurate.

Well that was wrong too, it's NOT linear. I carefully measured the FOV at 5,6,7 and 8 meters and got a line that curved slightly. It turns out that the field of view of a Nikon P900 varies with focus. So measuring when focussed on a nearby object will give you a different FOV compared to a far away object. You need to find the FOV at a much larger distance.

20170502-091724-c2mq5.jpg

That's the measurements I've taken so far. You can see the FOV converging as the distance increases. the 31.85m was the longest I could get in my yard on a level surface.

I suspect the 1.025° is close to the actual FOV at infinity as it gives a much more reasonable 149000000*.53125*.0179 = 1.4169 million km, suggesting the actual FOV at infinity is slightly narrower.
 
@Mick West - Very interesting. I didn't realize the focus would have nearly that large an impact on the field of view. If we're lucky maybe lenses at a wide angle will have less FOV sensitivity to focus, since horizon curvature shots are necessarily taken at wide angles. Another problem with FOV determination is the measurement of how far the tape is from the lens, since the relevant point of the lens is not usually the front or back surface, but rather some other unknown point. Between these two issues, it is clear that focusing at infinity and putting the tape as far away as practical are methods to be encouraged when finding FOV.

I've looked at your post #10 upthread instead of your code in post #75 because it appeared to be the post where you explain your calculations. The equations in post #10 appear correct on close inspection. Your tactic seems to be the opposite of Mino Re's. You direct the center of the observers field of view to be level, which is above the horizon. Mino Re's method effectively directs the center of the observer's field of view down to the chord line. I think both methods will give virtually identical results for small observer altitudes. And usefully they will probably bracket the value one would get by directing the observer's view at the horizon in the center. That's probably all we need for the practical applications at the low altitudes we have access to. And any error is probably much less than variability of refraction, horizon haze, and maybe even FOV measurement errors.

Still, I'm tempted to go all the way and do a precise calculation for when the observer's view is directed at the horizon. If, for example, the observer is a few thousand miles up, they probably won't even know where the level line above the horizon is, and I think they will calculate significantly different horizon droop values for each of the possibilities of directing the camera at the level line, the horizon, or the chord line, due to variations in where the edges of the FOV intersect the horizon circle. It seems like someone ought to do the exact calculation at least once. It looks like maybe DarkStar already has, so I'm going to check his out next.
 
I've looked at your post #10 upthread instead of your code in post #75 because it appeared to be the post where you explain your calculations. The equations in post #10 appear correct on close inspection. Your tactic seems to be the opposite of Mino Re's. You direct the center of the observers field of view to be level, which is above the horizon. Mino Re's method effectively directs the center of the observer's field of view down to the chord line. I think both methods will give virtually identical results for small observer altitudes.
Given this was a year ago, I've pretty much forgotten all the details. However I was always trying to think in terms of pixels, rather than angles. So basically I would try to do the math as if I were simulating a camera.

So looking "level" is a slight simplification, as it means the view vector is simply (0,0,z) (i.e. looking along the z-axis). Where the camera is actually pointing will make a difference to pixel measurements. But as you say, identical for low altitude (if looking roughly at the horizon).
 
I finally found and verified the exactly correct horizon curve droop calculation for a rectilinear lens image, or theodolite, of a spherical earth horizon without refraction. It's given on the talk page for the Wikipedia "Horizon" article
https://en.wikipedia.org/wiki/Talk:Horizon#About_the_"curvature_of_the_horizon"_section.

It is:

y = ( k / ( k^2 - 1 ) ) ( 1 - sqrt( 1 - x^2 ( k^2 - 1 ) ) )

where y is the distance DOWN from the x axis, on an image plane with the origin of the image plane on the central line of sight from the observer to the horizon, and the plane being perpendicular to that line of sight, and where that image plane is one unit in front of the observer. To be clear, the y axis is positive downward

x is the distance on the image plane, from the central line of sight, positive off to the right, to the point where the horizon curve droop will be calculated.

k is the line of sight distance to the horizon divided by the radius of the earth i.e. D/R using the labels we've been using above, or small cursive L divided by R in the symbols used by NoahhaoN on the Wikipedia page.

This appears to have first been figured out by a German astronomer, known on Wikipedia as SiriusB, and posted back on the 7th of October 2006. However, SiriusB didn't show this equation, but instead showed only the curvature of the horizon at the one point along the line of sight in the center of the observer's field of view. Wikipedia editor NoahhaoN then verified and showed in talk how SiriusB might have done his curvature calculation. I've carefully checked NoahhaoN's work, down to the equation I show above, and it looks correct. I did not check anything after the equation I show above, because I wasn't interested in the curvature at only the center of the field of view.

NoahhaoN's derivation either leaves out a couple steps, or somehow I just didn't follow it, so I filled in a few steps with my own that were then consistent with the rest of NoahhaoN's equations. A quick summary of the missing parts is this:

NoahhaoN gives the equation for the sphere centered on the observer with radius l (small L), that contains the horizon circle:

l^2 = X^2 + Y^2 + Z^2

Then I used the formula for a sphere with a center off the origin, to make an equation for the sphere of the earth surface:

X^2 + (Y-R)^2 + (Z-l)^2 = R^2 (again that's a lower case L subtracted from Z, not a one)

Multiplying out the earth sphere equation, and then replacing (X^2 + Y^2 + Z^2) with l^2 in the expanded earth sphere equation, gives an equation for the plane that contains the intersection of the two spheres at the horizon circle:
l^2 - RY - lZ = 0

One particularly good thing about finding the horizon curvature this way, i.e. using the central line of sight being tangent to the horizon, rather than to the observer's level plane or to the secant line connecting two points on the horizon circle, is that it can be used, not only to find the curve on a rectilinear image plane, but also to find the angle of horizon droop as would be measured by a theodolite. When you use a theodolite normally, i.e. with the vertical axis vertical, the crosshairs will trace out the horizon circle all around with a constant dip angle, giving the impression that there is no horizon curvature. But if you think about it, if the crosshairs are more than 90 degrees down from the zenith, then they will actually trace out a cone shaped curve around the observer, which will match the horizon curve. This is more obvious if you draw a circle on a flat floor, centered around a theodolite, with a radius equal to the height of the theodolite above the circle. As you turn the theodolite around, it will show the circle with a large constant dip angle of 45deg below horizonal, but the circle on the floor will be obviously curved when viewed or photographed from the elevated position of the theodolite.

The way to measure and make the curvature obvious with a theodolite, is to set it up normally with the vertical axis vertical, lock the crosshairs at 90 degress down from the vertical, then tilt the vertical axis forward by the amount of the horizon dip, so that the 90deg locked crosshairs point to the horizon. Now if you swing the scope to either side, the true drop of the horizon below the 90deg locked crosshairs will be plainly visible (or measurable of course, if you unlock.

The curvature equation given at the top of this post is for a projection onto an image plane. To calculate expected droop angles for the theodolite requires a few more steps beyond those given by NoahhaoN. For a theodolite, we want the droop angle for a given angle to either side of the central line of sight. For a given angle FOV/2 to a point on the x axis of the image plane, tan(FOV/2)=x/z. Or since the image plane is one z unit from the observer, just tan(FOV/2)=x. Plugging this x value into the first equation of this post, gives a y value. The distance from the observer to the x point is sqrt(x^2 + z^2) and z is 1. So finally the horizon curve droop angle down is atan( y / sqrt( (tan(FOV/2))^2 + 1^2 ) ).

I think this calculation will be correct and intuitive for any altitude. However, the FOV must of course be narrower than the horizon circle or the droop angle would be undefined. I think these formulas would be pretty accurate with refraction if one simply used a larger earth radius.
 
Back
Top