Well why dont you do it with trig?
Okay, I need to figure out how to get an angle from 2 gps detectors. I have made a diagram >.<
Right, so how would you find that angle? My brother said he only knows how to do it with inverse tan. Any help at all would be great!
Well why dont you do it with trig?
Common sense no longer applies.
Inverse tangent in a great way to do it.
What's so hard about that?Code:Angle = atan (X,Y)
Can be done completely with the expression tool.
In: AX AY AZ BX BY BZ
Out: Dist X Y Z Bearing Elevation
X = BX - AX
Y = BY - AY
Z = BZ - AZ
Dist = sqrt( sqrt( X^2 + Y^2 ) + Z^2 )
Bearing = atan( Y/X )
Elevation = atan( Z/sqrt(X^2 + Y^2) )[/b]
That Distance formula isn't quite right. It should beor [code]Dist = sqrt(X^2+Y^2 + Z^2)Code:Dist = sqrt( sqrt(X^2+Y^2)^2 + Z^2)
x* x+ 17 = 0
When keeping it real goes wrong.
But that isn't the bearing angle, it's just the offset. I need to know what it's angle is.Can be done completely with the expression tool.
In: AX AY AZ BX BY BZ
Out: Dist X Y Z Bearing Elevation
X = BX - AX
Y = BY - AY
Z = BZ - AZ
Dist = sqrt( sqrt( X^2 + Y^2 ) + Z^2 )
Bearing = atan( Y/X )
Elevation = atan( Z/sqrt(X^2 + Y^2) )[/b]
Well, you're right that it's not the bearing - it's actually the angle as in that diagram in your first post.
The better formula would be:
Well, actually that formula gives the azimuth, which are degrees clockwise of 'North,' or +y referenced to the world.Code:Bearing = atan2(X, Y)
x* x+ 17 = 0
When keeping it real goes wrong.
Thanks! That's what I wanted. Sorry for not exactly explaining.![]()
Bookmarks