My Math Forum  

Go Back   My Math Forum > High School Math Forum > Geometry

Geometry Geometry Math Forum


Reply
 
LinkBack Thread Tools Display Modes
October 21st, 2016, 04:48 AM   #1
Newbie
 
Joined: Oct 2016
From: Amsterdam

Posts: 2
Thanks: 0

Lat/lon projection on line

Please see attached picture. I have two lines. One line is between two coordinates P2 and P3. From the second line I know one coordinate P1 and the angle alpha. P1, P2 and P3 are earth coordinates (lat/lon). The angle alpha is in degrees (0-360).

How to calculate the distances d1, d2 and d3 in meters, as a function of X1,Y1,X2,Y2,X3,Y3 (lat/lon) and alpha (degrees)?


Note: The formulas should work for all angles alpha (0-360) and also if lines intersect, or are parallel.

The distances I have to calculate are max 5000 meters. Therefore the earth's radius can be left out of the equasion (I think??).
Attached Images
File Type: jpg Projectie.jpg (9.3 KB, 4 views)

Last edited by Neo444; October 21st, 2016 at 04:55 AM.
Neo444 is offline  
 
October 21st, 2016, 06:40 AM   #2
Senior Member
 
skaa's Avatar
 
Joined: Mar 2011
From: Chicago, IL

Posts: 214
Thanks: 77

.

Last edited by skaa; October 21st, 2016 at 06:48 AM.
skaa is offline  
October 21st, 2016, 06:44 AM   #3
Senior Member
 
skaa's Avatar
 
Joined: Mar 2011
From: Chicago, IL

Posts: 214
Thanks: 77

.

Last edited by skaa; October 21st, 2016 at 06:48 AM.
skaa is offline  
October 21st, 2016, 06:47 AM   #4
Senior Member
 
skaa's Avatar
 
Joined: Mar 2011
From: Chicago, IL

Posts: 214
Thanks: 77

Let's:

$\displaystyle \gamma=\left\{\begin{matrix}
\arctan{\frac{x3-x2}{y3-y2}},\ if\ y3\neq y2\\
\frac{\pi}{2},\ if\ y3=y2
\end{matrix}\right.$

Then:

$\displaystyle d3=\sqrt{(x3-x2)^2+(y3-y2)^2}\cdot|\cos{(\gamma-\alpha)}|$

Continue?..
skaa is offline  
October 22nd, 2016, 08:10 AM   #5
Newbie
 
Joined: Oct 2016
From: Amsterdam

Posts: 2
Thanks: 0

Thank you very much. Could you calculate d1 and d2 for me also?

The coordinates I mentioned above are lat/lon (WGS84 system).

So first I have to convert the coordinates to X,Y,Z based on WGS84. This is an eliptical system. Do you happen to know the formulas for that also?
Neo444 is offline  
October 24th, 2016, 10:46 AM   #6
Senior Member
 
skaa's Avatar
 
Joined: Mar 2011
From: Chicago, IL

Posts: 214
Thanks: 77

The ray containing P1:
If α≠0 then:
$\displaystyle y=\cot\alpha\cdot x+y1-\cot\alpha\cdot x1$ (*)
else:
$\displaystyle x=x1$

The line P2P3:
If x3≠x2 then:
$\displaystyle y=\frac{y3-y2}{x3-x2}x-\frac{y3-y2}{x3-x2}x2+y2$ (**)
else:
$\displaystyle x=x2$

It makes sense to solve this problem if the ray containing P1 intersects P2P3, otherwise d1 and d2 do not exist. Let us designate the point of interception (xi, yi).

1. α≠0.
1a. α≠0 and x3≠x2.
$\displaystyle xi=\frac{y1-\cot\alpha\cdot x1+\frac{y3-y2}{x3-x2}x2-y2}{\frac{y3-y2}{x3-x2}-\cot\alpha}$, yi can be found from (*).

1b. α≠0 and x3=x2.
$\displaystyle xi=x2$, yi can be found from (*).

2. α=0.
2a. α=0 and x3≠x2.
$\displaystyle xi=x1$, yi can be found from (**).

2b. α=0 and x3=x2.
The ray containing P1 is parallel to P2P3, or is a part of it d1 and d2 do not exist.

Continue?..
skaa is offline  
October 24th, 2016, 11:58 AM   #7
Senior Member
 
skaa's Avatar
 
Joined: Mar 2011
From: Chicago, IL

Posts: 214
Thanks: 77

Just in case if x2≤xi≤x3 and y2≤yi≤y3 or if x3≤xi≤x2 and y3≤yi≤y2 the problem can be solved.
skaa is offline  
Reply

  My Math Forum > High School Math Forum > Geometry

Tags
lat or lon, line, projection



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
The projection of the vector Phatossi Algebra 2 June 7th, 2012 07:47 AM
projection? xzardaz Linear Algebra 0 February 3rd, 2012 03:47 AM
Scalar projection, distance from point to line Unununium111 Calculus 2 January 21st, 2011 04:30 AM
Baisis and projection Carl Real Analysis 1 June 30th, 2009 03:00 AM
About projection redox Algebra 0 April 26th, 2009 10:37 AM





Copyright © 2019 My Math Forum. All rights reserved.