Thursday, November 3, 2016

Horizon Calculator Discussion Page

I created a new Horizon Calculator, hopefully a useful one.  And if not put in a request as a comment here and I'll see what I can do.

The details on the calculations can be found in my derivation of the formula for distance to horizon and obscured by horizon page and the high altitude page which talks about taking that down to the expected number of pixels in an image.

You can hover over the labels for additional information.

Supports observer height, object distance, earth radius and refraction conditions.

The results are displayed in a variety of imperial and metric units.

It updates the Location URL and has a permalink on the page as well.

It's still pretty new (2016-11-03) so there might be bugs, please report them here.

You can learn more about the drop & obscured over arc (great circle) distance in Keigh See's video and this short derivation paper (which I have simplified in my version using a different approach).

Interface Details


Inputs


Figure 1. Sample FEI Horizon Calculation Input Section

Observation Height -- this is how high the observer is over 'ground level' which you must carefully define and consider any obstructions.  The calculations assume you are on a perfect sphere, which isn't true in reality but for these types of calculation is usually close enough.  This is NOT good enough for geodetic surveying :)

Object Distance -- how far the observer is from some distant object.  There are two 'modes' here, one is given the distance along a tangent from the observer and the other is the distance along the curvature of the Earth (such as you would get from Google Earth).  For distances under about 100 miles it really doesn't matter much.   Some of the calculations, such as Surveyor Drop, require the distance to be a tangent so ignore this option.

Earth Radius -- this is a set of 3 different controls, all of which affect the effective Earth radius.  You can either directly enter the Earth Radius into the input box or you can opt to calculate the Earth radius by changing the latitude control.  And finally you can add Refraction as a percentage of Earth curvature - positive refraction increases the effective Earth radius, negative refraction decreases it as a straight percentage.  So 100% refraction = double effective Earth radius.

Image Width -- when you are analyzing an image showing the Earth's horizon you can enter the number of horizontal pixels of that image here.  This is used to calculate the 'sagitta' of the horizon arc.  You need to assure the horizon is fairly level in your image.  This calculation assumes a perfect, rectilinear image so you'll need to compensate for any lens distortion yourself.  The closer to the center of the lens your horizon falls the less distortion you are likely to experience.  See the post on High Altitude footage for details.
 
Horizontal FOV -- this is the Field of View in your image, as an angular measure.

Calculations


Figure 2. Sample FEI Horizon Calculator Calculations Section

† - denotes a link to more information.

* - denotes that this calculation is subject to Refraction.  For example, Drop is not subject to refraction as this is a physical quantity but distance to the horizon is the apparent horizon so it does use the refracted adjustment.

Horizon -- the distance to the apparent horizon, this is affected by the observer height and effective Earth radius, taking into account refraction.

Surveyor Drop -- This is the 8"×miles² formula.  This is only an estimate, with greater distances the value is actually too small.  I think it's fine for distances under 100 miles IF you only want to know the Drop.  However, Drop doesn't include observer height so it is useless for deciding what you can see.

Drop -- This is the geometric drop, this is ALSO only an estimate because it's based on a spherical approximation but it's very close and doesn't diverge as rapidly as Surveyor Drop.

Obscured -- This is the amount of a distant object that would be obscured by the curvature of the Earth taking into account the observer height, Earth radius including refraction, and distance to the object.  Note that the distant object would be tilted away (by the Tilt angle) which also affects this intersection point.  Some versions of this calculation use the wrong geometry.  This is STILL an approximation because it is, again, a spherical approximation but it's pretty close.  The reason everyone uses a spherical approximation is #1 it's simple, understandable, and "close enough", #2 there is no simple formula for an ellipsoid, you have to solve the equations by iteration.  The geometry considered is thus:



Tilt -- This is the angle at which the distant object would be tilted away from you due to Earth's curvature.  Most people thing you should be able to see this but don't realize just how SLIGHT the tilt is even at great distances when you cannot make out any details of the object.

Dip -- This is the horizon dip angle or depression angle.  If you put a level out from where the observer is, this is the angle down to the horizon.  And no, the horizon does NOT rise to "eye-level".

Angular Size -- I'll probably change this one but right now it's the angular size of the OBSERVER HEIGHT (not the object, I don't have object size currently) at the object distance.  So it's the shift in observer, not size of object.

Sagitta -- Geometrically speaking, sagitta is the height of a bump on a chord.  I convert that to pixels for two camera arrangements.  First with the horizon dead center of the camera and the second one with the camera pointed out level from the observer so the Horizon would be at the Tilt angle down.  Calculations assume your image has sufficient vertical pixels to capture the horizon intersecting the edge of the frame and not the bottom.  The details and full derivation of this calculation can be found on the High Altitude page.


Updates


v0.0.6 2016-12-06 added DMS format for angles, draggable numeric input
v0.0.5 2016-11-16 added sagitta, angular size, cleanup
v0.0.4 2016-11-06 added latitude linked to Radius
v0.0.3 2016-11-03 expanded browser support, Reset

TODO/IDEAS


  • dynamically updated diagram
  • more sanity checking on field values
  • control field precision (up/down arrows on the field)
  • input control mouse drag left&right
  • add object size / visible / angular size
  • dragable input on tablet/iphone
  • collapsible sections / toggle features
  • 'ray traced' refraction calculation w/splines to control gradients of major factors (temp, pressure, vapor)

Suggestions


From Yishai via twitter:


  • Would love 2 see pics of skylines w/refraction calculated & displayed on pic based on obscured
  • "add object size / visible / angular size" + % visible
  • for horizon FOV section, the % difference between centre and left or right drop. [note: I assume horizon is level and think it might get too complex to add a tilt factor]
  • horizon width in kms/miles etc based on FOV and Observation Height [this would be easy]
  • And button(s) next to refraction to set it to "standard refraction" or "zero refraction"
  • and perhaps a couple of pics showing what fields mean [note: I do have hover-over text]


4 comments:

  1. Hey! Nice work here!
    Could you please explain how the "latitude" parameter works? Are you using a non-spheric Earth model to do the calculation (ie, a "geoid" based one)?
    Thanks!

    ReplyDelete
    Replies
    1. The calculations all assume a spherical approximation (currently) - but the exact Radius of Curvature is variable (which is the variable R in the equations). Latitude just allows you to use the closer approximation for the value of R given the observation latitude.

      These calculations get pretty meaningless at 200+ miles anyway so really the exact value for R doesn't matter much. You can try changing it and seeing how little it changes the result. But by exposing it we can see it doesn't make much difference and feel a little more secure that the estimates (stress on estimates) are in the ballpark.

      We have also done ellipsoidal approximations for these small distances (<200 miles) and these types of observations where you already have a lot of error in the observation it really didn't matter much.

      I'd like to do an ellipsoid calc at some point just to be able to show there isn't much practical difference in most cases.

      If you are measuring down to the centimeter then these estimates aren't very useful anyway :)


      So long story short -- all it does it adjust the Radius of the Earth to be the ellipsoidal radius at that latitude.

      Delete
  2. Oh, and by the way, it seems like the format is a little bit wrong. The "Earth Radius" label renders just in line with "latitude" (at least on Safari).

    ReplyDelete
    Replies
    1. Earth Radius covers three input elements: R input box + latitude + refraction as they all tie in together. If I get a chance maybe I'll try to add a big bracket { to make that more clear but for now it appears as intended, at least in Safari on my iPhone. Just think of all three controls as effectively altering your Radius.

      Appreciate the feedback!

      Delete

Note: Only a member of this blog may post a comment.