Approximation of distance between locations on earth given by latitude and longitude

Σχετικά έγγραφα
Section 8.3 Trigonometric Equations

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

derivation of the Laplacian from rectangular to spherical coordinates

Example Sheet 3 Solutions

Homework 3 Solutions

EE512: Error Control Coding

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Inverse trigonometric functions & General Solution of Trigonometric Equations

Solutions to Exercise Sheet 5

Math221: HW# 1 solutions

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Areas and Lengths in Polar Coordinates

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Spherical Coordinates

Finite Field Problems: Solutions

Math 6 SL Probability Distributions Practice Test Mark Scheme

1 String with massive end-points

Second Order RLC Filters

2. THEORY OF EQUATIONS. PREVIOUS EAMCET Bits.

Homework 8 Model Solution Section

2 Composition. Invertible Mappings

Areas and Lengths in Polar Coordinates

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Other Test Constructions: Likelihood Ratio & Bayes Tests

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Numerical Analysis FMN011

Trigonometric Formula Sheet

Matrices and Determinants

The Simply Typed Lambda Calculus

Section 9.2 Polar Equations and Graphs

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

Congruence Classes of Invertible Matrices of Order 3 over F 2

상대론적고에너지중이온충돌에서 제트입자와관련된제동복사 박가영 인하대학교 윤진희교수님, 권민정교수님

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

Section 7.6 Double and Half Angle Formulas

Review Test 3. MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

Problem Set 9 Solutions. θ + 1. θ 2 + cotθ ( ) sinθ e iφ is an eigenfunction of the ˆ L 2 operator. / θ 2. φ 2. sin 2 θ φ 2. ( ) = e iφ. = e iφ cosθ.

Strain gauge and rosettes

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

6.3 Forecasting ARMA processes

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

w o = R 1 p. (1) R = p =. = 1

Problem Set 3: Solutions

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

SOLVING CUBICS AND QUARTICS BY RADICALS

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

Second Order Partial Differential Equations

If we restrict the domain of y = sin x to [ π, π ], the restrict function. y = sin x, π 2 x π 2

1. (a) (5 points) Find the unit tangent and unit normal vectors T and N to the curve. r(t) = 3cost, 4t, 3sint

On a four-dimensional hyperbolic manifold with finite volume

Every set of first-order formulas is equivalent to an independent set

New bounds for spherical two-distance sets and equiangular lines

CRASH COURSE IN PRECALCULUS

C.S. 430 Assignment 6, Sample Solutions

Statistical Inference I Locally most powerful tests

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

If we restrict the domain of y = sin x to [ π 2, π 2

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

5.4 The Poisson Distribution.

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Answer sheet: Third Midterm for Math 2339

EE101: Resonance in RLC circuits

SCITECH Volume 13, Issue 2 RESEARCH ORGANISATION Published online: March 29, 2018

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Lanczos and biorthogonalization methods for eigenvalues and eigenvectors of matrices

Variational Wavefunction for the Helium Atom

The challenges of non-stable predicates

2. Let H 1 and H 2 be Hilbert spaces and let T : H 1 H 2 be a bounded linear operator. Prove that [T (H 1 )] = N (T ). (6p)

CHAPTER 12: PERIMETER, AREA, CIRCUMFERENCE, AND 12.1 INTRODUCTION TO GEOMETRIC 12.2 PERIMETER: SQUARES, RECTANGLES,

Integrals in cylindrical, spherical coordinates (Sect. 15.7)

Partial Trace and Partial Transpose

4.6 Autoregressive Moving Average Model ARMA(1,1)

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

ST5224: Advanced Statistical Theory II

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Reminders: linear functions

Assalamu `alaikum wr. wb.

CHAPTER 101 FOURIER SERIES FOR PERIODIC FUNCTIONS OF PERIOD

2. Μηχανικό Μαύρο Κουτί: κύλινδρος με μια μπάλα μέσα σε αυτόν.

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

Mean bond enthalpy Standard enthalpy of formation Bond N H N N N N H O O O

PARTIAL NOTES for 6.1 Trigonometric Identities

MATH423 String Theory Solutions 4. = 0 τ = f(s). (1) dτ ds = dxµ dτ f (s) (2) dτ 2 [f (s)] 2 + dxµ. dτ f (s) (3)

Solution Series 9. i=1 x i and i=1 x i.

Technical Information T-9100 SI. Suva. refrigerants. Thermodynamic Properties of. Suva Refrigerant [R-410A (50/50)]

[1] P Q. Fig. 3.1

Written Examination. Antennas and Propagation (AA ) April 26, 2017.

Exercises to Statistics of Material Fatigue No. 5

Laplace s Equation in Spherical Polar Coördinates

Mock Exam 7. 1 Hong Kong Educational Publishing Company. Section A 1. Reference: HKDSE Math M Q2 (a) (1 + kx) n 1M + 1A = (1) =

Transcript:

Approximation of distance between locations on earth given by latitude and longitude Jan Behrens 2012-12-31 In this paper we shall provide a method to approximate distances between two points on earth given by latitude and longitude. The motivation behind this approximation is the efficient mass-calculation of distances between a reference point and other nearby points in a huge database, while saving the expenses of trigonometric calculations for each point in the database. The approximation is done by approximating the squared distance with a 2nd order Taylor-polynomial. Finally we will present a method to calculate latitude and longitude boundaries for a given center point and radius, in order to allow quick lookup of entries using a 2-dimensional database index. We model the earth using a reference ellipsoid as defined by the formulas below, where a is the semi-major and b is the semi-minor axis of a reference ellipsoid e.g. WGS-84) in meter. X = N φ cosφ cosλ Y = N φ cosφ sinλ Z = N φ 1 ǫ 2 ) sinφ a2 b ǫ = 2 a a N φ = 1 ǫ2 sin 2 φ 1

The distance d of two points X,Y,Z) and X 0,Y 0,Z 0 ) in 3-dimensional space is given by: d 2 = X X 0 ) 2 +Y Y 0 ) 2 +Z Z 0 ) 2 = N φ cosφ cosλ N φ0 cosφ 0 cosλ 0 ) 2 +N φ cosφ sinλ N φ0 cosφ 0 sinλ 0 ) 2 +N φ 1 ǫ 2 ) sinφ N φ0 1 ǫ 2 ) sinφ 0 ) 2 Note that the path on the surface of the ellipsoid is distinct from d. For our approximation of d 2 with a 2nd order Taylor-polynomial this discrepancy has no negative impact, as it does not affect any of its coefficients not proven here). The Taylor-polynomial d 2 is given by: d 2 d 2 = 2 i=0 2 i φ λj d 2 ) φ=φ0,λ=λ 0 φ φ 0 ) i λ λ 0 ) j i!j! }{{} =:t ij j=0 Using a computer algrabra software, we can calcuate t ij and get the following results: t 00 = 0 t 10 = 0 = a 2 1 ǫ 2 ) 2 1 ǫ2 sin 2 φ 0 ) 3 t 01 = 0 t 11 = 0 t 21 = 0 t 02 = a 2 1 sin 2 φ 0 1 ǫ 2 sin 2 φ 0 t 12 = a 2 1 ǫ2 )sinφ 0 cosφ 0 1 ǫ2 sin 2 φ 0 ) 2 t 22 = a 2 1 ǫ2 ) 1 sin 2 φ 0 ) 1 2 +ǫ2 sin 2 φ 0 ) 1 ǫ2 sin 2 φ 0 ) 3 2

With t 00 = t 10 = t 01 = t 11 = t 21 = 0 we can re-write d 2 as: d 2 = φ φ 0 ) 2 +t 22 φ φ 0 ) 2 +t 12 φ φ 0 )+t 02 )λ λ 0 ) 2 = φ φ 0 ) 2 t22 + φ φ 0 ) 2 + t 12 φ φ 0 )+ t ] 02 )λ λ 0 ) 2 t 20 = φ φ 0 ) 2 t22 + φ 2 2 t 22 φφ 0 + t 22 φ 2 0 + t 12 φ t 12 φ 0 + t ] 02 )λ λ 0 ) 2 t 20 = φ φ 0 ) 2 t22 + φ 2 + t 12 2 t 22 φ 0 )φ+ t 22 φ 2 0 t 12 φ 0 + t ] 02 )λ λ 0 ) 2 t 20 = t }{{} 20 φ φ 0) 2 + =: t 22 }{{} =:c 2 φ 2 + t 12 2t 22 φ 0 } {{ } =:c 1 φ+ t 22φ 2 0 t 12 φ 0 +t 02 } {{ } =:c 0 λ λ 0) 2 Defining 4 constants := c 2 := t 22 c 1 := t 12 2t 22 φ 0 c 0 := t 22φ 2 0 t 12 φ 0 +t 02 we can further simplify d 2 to: d 2 d 2 = φ φ0 ) 2 +c 2 φ 2 +c 1 φ+c 0 )λ λ 0 ) 2] = φ φ0 ) 2 +c 2 φ+c 1 )φ+c 0 )λ λ 0 ) 2] 3

Given a minimum r) and maximum R) search radius, we can filter database entries using the following formula: r 2 φ φ 0 ) 2 +c 2 φ+c 1 )φ+c 0 )λ λ 0 ) 2 < R2 If latitudes and longitudes are not given as radians but as degrees, we can use alternative coefficients: π c 3 = 180 π c 2 = 180 c 1 = π 180 c 1 c 0 = c 0 ) 2c3 ) 2c2 In order to get the latitude boundaries φ b = φ 0 ± φ b for a given center pointφ 0, λ 0 )andmaximumsearchradiusr), weusethesimplifiedequation for d 2 and set d 2 = R 2, φ = φ b and λ = λ 0 : d 2 = φ φ0 ) 2 +c 2 φ 2 +c 1 φ+c 0 )λ λ 0 ) 2] R 2 = φ b φ 0 ) 2 + c 2 φ 2 b +c 1 φ b +c 0 )λ 0 λ 0 ) 2 R 2 = φ b φ 0 ) 2 φ b φ 0 ) 2 = R2 φ b = φ b φ 0 = R 2 4

The longitude boundaries λ b = λ 0 ± λ b are calculated by setting d 2 = R 2, λ = λ b and φ to a critical value φ c, which maximizes λ b λ 0 : d 2 = φ φ0 ) 2 +c 2 φ 2 +c 1 φ+c 0 )λ λ 0 ) 2] R 2 = φc φ 0 ) 2 +c 2 φ 2 c +c 1 φ c +c 0 )λ b λ 0 ) 2] φ c φ 0 ) 2 +c 2 φ 2 c +c 1 φ c +c 0 )λ b λ 0 ) 2 = R2 c 2 φ 2 c +c 1 φ c +c 0 )λ b λ 0 ) 2 = R2 φ c φ 0 ) 2 λ b λ 0 ) 2 = λ b = λ b λ 0 = R 2 φ c φ 0 ) 2 c 2 φ 2 c +c 1 φ c +c 0 R 2 φ c φ 0 ) 2 c 2 φ 2 c +c 1 φ c +c 0 φ c canbedeterminedbysetting λ b λ 0 ) 2 ) φ c = 0. Usingacomputeralgebra software, we get two results, of which only the following result leads to φ c π 2 ;+π] and real λ 2 b: φ c = c 2 φ 2 0 R2 ) c 0 + c 2 2 φ 4 0 + 2c 1 c 2 φ 3 0 + c 2 R 1+2c 0 c 2 2 )c 2 ) φ 2 0 R + 2c 0 c 2 2 )c 1 φ ) 0 2+2c0 + c 2 R 2 2 c 2 c 2 1) R2 +c 2 0 2c 2 φ 0 +c 1 The above formula only holds for cases where φ 0 0 and the north or south pole is not included within the search radius. If φ 0 = 0, then φ c = 0. It is recommended to limit φ c to an absolute value φ limit ), which is the maximum possible absolute value of φ in practice, e.g. 84 = 7 π. When 15 φ c > φ limit, then φ limit should be used instead of φ c to calculate λ b. When φ c < φ limit, then φ limit should be used respectivly. When φ c / R, because a pole is included within the search radius, then φ limit can be used for cases where φ 0 > 0, and φ limit can be used for cases where φ 0 < 0. 5

In addition to the outer boundaries φ b = φ 0 ± φ b and λ b = λ 0 ± λ b for the maximum radius R, it is possible to define inner boundaries φ i,λ i ) for the minimum radius r. There are infinite possible solutions, we pick one by chosing λ i as follows: r 2 c λ i = λ i λ 0 = 3 2 c 2 φ 2 0 +c 1 φ 0 +c 0 ) Our choice of λ i is optimal for φ 0 = 0 and r 0 not proven here). Having chosen λ i, we can calculate φ i by using the simplified equation for d 2 and setting d 2 = r 2, φ = φ i and λ = λ i : d 2 = φ φ0 ) 2 +c 2 φ 2 +c 1 φ+c 0 )λ λ 0 ) 2] r 2 = φi φ 0 ) 2 +c 2 φ 2 i +c 1 φ i +c 0 )λ i λ 0 ) 2] r 2 = φi φ 0 ) 2 +c 2 φ 2 i +c 1 φ i +c 0 ) λ i ) 2] r2 = φ i φ 0 ) 2 +c 2 φ 2 i +c 1 φ i +c 0 ) λ i ) 2 r2 = φ 2 i 2φ i φ 0 +φ 2 0 +c 2 λ i ) 2 φ 2 i +c 1 λ i ) 2 φ i +c 0 λ i ) 2 c 2 λ i ) 2 +1)φ 2 i +c 1 λ i ) 2 2φ 0 )φ i +c 0 λ i ) 2 +φ 2 0 r2 = 0 1 φ 0 1 4 c 2 1 λ i ) 2 c2 1 c 0 c 2 ) λ i ) 4 r ± +c 2 2 c 2 φ 2 0 +c 1 φ 0 +c 0 )) λ i ) 2 + r2 c φ i = 3 c 2 λ i ) 2 +1 φ i = φ 0 1 2 c 1 λ i ) 2 ± 1 4 c2 1 c 0 c 2 ) λ i ) 4 r +c 2 2 λ i ) 2 + 1 r 2 2 c 2 λ i ) 2 +1 Note that the two solutions of φ i are normally not symmetrical to φ 0. 6