Welcome to SP!  -
Test embedding - please don't vote
Custom Object
 
Related 

Test embedding - please don't vote

 

Page Type: Custom Object

Object Type: Custom

 

Page By: rgg

Created/Edited: Dec 3, 2012 / May 29, 2013

Object ID: 828183

Hits: 414 

Page Score: 0%  - 0 Votes 

Vote: Log in to vote

 

Disclaimer

If you stumble across this test object, know that this is where I fiddle around with embedded maps (and some other stuff). I've added some explanation, primarily in order to remind me what I'm trying to do, but also to enable others that might be curious to see it. If you see something wrong, or have remarks or questions about the subject, by all means, let me know.

As this is a test object. I reserve the right to delete or modify it at any time. Also, while I'll try to keep the HTML code displayed below in line with the actual code, I might make a mistake and forget to update something. Therefore, use this at your own peril.

Embedding Maps

View Larger Map View Larger Map


...

The Equation

D = f(Φ,Z) = a 4 cos 2 Φ + b 4 sin 2 Φ a 2 cos 2 Φ + b 2 sin 2 Φ + 2 Z a 2 cos 2 Φ + b 2 sin 2 Φ + Z 2

The Derivation

Note: This derivation assumes your browser correctly shows the square root symbols. If it does not, possibly try a different browser.


The oblate spheroid shape of the Earth is not as flattened as the above figure would suggest and value e is small, placing ray Ra close to C and more closely parallel to ray Rg. The squashed look is provided here for clarity.

The true distance D is as shown. This is because the latitude that gives the position of a person or object on the Earth is the astronomical latitude, alat. This is a ray that extends outward from the Earth's surface at a right angle to that point. Because the Earth is an ellipsoid from the Equator to the pole, a ray that is perpendicular cannot pass through the exact Center of the Earth except at two latitudes (0o at the Equator and 90o at the poles). Since elevations above sea level are measured directly up from the surface, they must therefore be parallel to ray Ra.

The geocentric latitude, glat, on the other hand, defines the angle of ray Rg that extends from the Center of the Earth to the same point on the surface.

General Trigonometric Equations

D2 = Ld2 + Hd2     (Eq. A1)

Hd = (Ra + Z)sinΦ

Hr = Rgsinθ = RasinΦ ► Ra = Rgsinθ/sinΦ     (Eq. A2)

Lg = Rgcosθ
La = RacosΦ
e = Lg – La = Rgcosθ - RacosΦ

Laz = (Ra + Z)cosΦ
Ld = Laz + e

a2tanθ = b2tanΦ ► tanΦ = a2/b2tanθ ► Φ = tan-1(a2/b2tanθ) ► θ = tan-1(b2/a2tanΦ)    (Eq. A3)

These are relationships between geocentric latitude, glat (θ), and astronomical latitude, alat (Φ). See here. Note geodetic latitude is synonymous with astronomical latitude.

Also,
Rg = a 4 cos 2 Φ + b 4 sin 2 Φ a 2 cos 2 Φ + b 2 sin 2 Φ = expr1     (Eq. A4)

See here.

Combining Equations

Ld = Laz + e = (Ra + Z)cosΦ + Rgcosθ - RacosΦ = Rgcosθ + ZcosΦ = cosθexpr1 + ZcosΦ

Ld2 = (cosθexpr1 + ZcosΦ)(cosθexpr1 + ZcosΦ) = cos2θ[expr1] + 2ZcosθcosΦ expr1 + Z2cos2Φ

Hd = (Ra + Z)sinΦ = Rgsinθ + ZsinΦ = sinθexpr1 + ZsinΦ

Hd2 = (sinθexpr1 + ZsinΦ)(sinθexpr1 + ZsinΦ) = sin2θ[expr1] + 2ZsinθsinΦexpr1 + Z2sin2Φ

D2 = Ld2 + Hd2 = [expr1](cos2θ + sin2θ) + 2Zexpr1(cosθcosΦ + sinθsinΦ) + Z2(cos2Φ + sin2Φ)
= [expr1] + 2Zexpr1cos(θ – Φ) + Z2

D = f(θ,Φ,Z) = expr1 + 2 Z expr1 cos θ - Φ + Z 2     (Eq. A5a)


Fully Combined Form for Distance

Substituting in Eq. A3 where θ = tan-1(b2/a2tanΦ):

D = f(Φ,Z) = expr1 + 2 Z expr1 cos tan -1 b 2 / a 2 tan Φ - Φ + Z 2     (Eq. A5b)


The second term of Eq. A5b can be further simplified to remove the contraction cos(θ – Φ), resulting in the following:

D = f(Φ,Z) = a 4 cos 2 Φ + b 4 sin 2 Φ a 2 cos 2 Φ + b 2 sin 2 Φ + 2 Z a 2 cos 2 Φ + b 2 sin 2 Φ + Z 2     (Eq. A5c)


This is the final equation.
The distance to the Center of the Earth from any point, like a summit, is a function of only latitude, Φ, and elevation, Z.

Here is the expected result when Z = 0: