Need help with this vector problem.
An air traffic controller notices two aircraft on his radar screen
(x-y plane). The first is at altitude 800 m, horizontal distance
19.2 km, and at 25° south of west. The second aircraft is at altitude
(z coordinate) 1100 m, horizontal distance 17.6 km, and 20° south of
west. What is the distance between the two aircraft?
(Place the x axis west, the y axis south, and the z axis vertical).
The correct answer is 2285 and I am using the distance formula
but I am missing something because I keep getting 8708.
I am using this formula d=squareroot((x1-x2)^2+(y1-y2)^2+(z1-z2)^2)
z1 = 800
z2 = 100
x1 = 19200sin(25) = 8114
x2 = 17600cos(20) = 16538
y1 = 19200sin(25) = 8114
y2 = 17600sin(20) = 6019
Shouldn''t everything be (x2-x1)2 and so forth?
-------------
-WarMage
...mmm operational precedence...
-------------
-WarMage
...mmm operational precedence...
October 05, 2001 05:53 PM
NewsLetter, Safelist and Discussion List Hosting for only a $30 fee. You can setup one on your private servers with NO HASSLE for you. We maintain all the details and your data is backed up multiple times daily.
PlanetXMail.com
PlanetXMail.com
quote:
Original post by WarMage
Shouldn''t everything be (x2-x1)2 and so forth?
Order doesn''t matter because of the square. Take 2 and 5 for example
(2-5)2 = (-3)2 = 9
(5-2)2 = ( 3)2 = 9
October 06, 2001 05:34 AM
Check the API for the cos and sin functions and make sure they take degrees and not radians. Otherwise you''ll have to multiply the degree angles by PI/180 before calculating the sin and cos values. I think.
Good luck.
Good luck.
x1 = 19200COS(25) = 17401
------------------------------------------------------
Cuando miras al abismo el abismo te devuelve la mirada.
F. Nietzsche
------------------------------------------------------
Cuando miras al abismo el abismo te devuelve la mirada.
F. Nietzsche
First you need to use your magnatude of components equations
x1 = C * cos(angle)
y1 = C * sin(angle)
so....
x1 = 19200 * cos(25) = 17401
y2 = 19200 * sin(25) = 8114
z1 = 800m <----- leave that as 800 meters
x2 = 17600 * cos(20) = 16538
y2 = 17600 * sin(20) = 6019
z2 = 1100m
Next you need to do is subtract your vectors
simply put.... x2 - x1 = xT = -863
y2 - y1 = yT = -2095
z2 - z1 = zT = 300
Then you would use your distance equation:
D=SqrRoot(xT^2 + yT^2 + zT^2)
D=2285
Hope that helps
-Ian
x1 = C * cos(angle)
y1 = C * sin(angle)
so....
x1 = 19200 * cos(25) = 17401
y2 = 19200 * sin(25) = 8114
z1 = 800m <----- leave that as 800 meters
x2 = 17600 * cos(20) = 16538
y2 = 17600 * sin(20) = 6019
z2 = 1100m
Next you need to do is subtract your vectors
simply put.... x2 - x1 = xT = -863
y2 - y1 = yT = -2095
z2 - z1 = zT = 300
Then you would use your distance equation:
D=SqrRoot(xT^2 + yT^2 + zT^2)
D=2285
Hope that helps
-Ian
I''m closing this thread and several others because the question appears to be a school homework assignment from a math class. The purpose of homework is to teach students to build their comprehension of a subject and their problem-solving skills, possibly with the assistance of other students in the same class or teachers of the class. Especially for math problems such as the one posed here, it is absolutely NOT appropriate to seek the answers from folks outside one''s class or school.
These forums are to be used for assistance in game development activities only.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
These forums are to be used for assistance in game development activities only.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement