Vector Calc Homework: Find Dv from Pr & Pt

  • Thread starter Thread starter Alienufo736
  • Start date Start date
  • Tags Tags
    Calculation Vector
AI Thread Summary
The discussion revolves around calculating the directional vector (Dv) for a GPS tracking system in a game, where one GPS coordinate represents a moving object and the other a stationary target. The user has derived the angle Theta using the differences in coordinates and the object's yaw. The key equation for Dv is established as Dv = (cos(Theta), sin(Theta)), with Theta defined as Theta = atan(Y,X) - Yaw. This approach ensures that Dv is always perpendicular to the line representing the direction the object is facing. The conversation emphasizes the importance of accurately calculating Theta to determine the correct directional vector.
Alienufo736
Messages
1
Reaction score
0

Homework Statement


Im not sure where exactly i should post this, but I am going to assume its here. basicaly what i am working on is programming a GPS tracking system inside a game. i have two GPS coordinates, one of the object that will be moving towards a stationary gps, and a stationary "target" GPS. I've figured out that it will be two points on a plane, what i need is the equation to find Dv or the direction to the Target GPS from the object GPS relative to the direction the object is facing . I've drawn a picture to assist myself in finding out exactly what i need to do.
Triangulation2.jpg

Pr=Gps on object, the line that contains Pr represents the direction that the object is facing, Pt=Target Gps, Dv=Directional Vector, Theta = Angle to Pt, Ignore Dv+ and Dv- i simply put that there to say that one side of Pr will be negative and the other positive along Dv. what i need to know is how to get the value of Dv with an equation. The Large circle around Pr represents its rotational possibilities. Note Dv must always be perpendicular to the Line Pr is in (which represents the object)

2. The attempt at a solution
I think I've figured out how to get Theta, but i could be wrong:
X = Xr - Xt
Y = Yr - Yt
Theta = atan(Y,X)-Yaw

Yr and Yt being the Y values of Pr And Pt Respectively
Xr and Xt being the Y values of Pr And Pt Respectively
Yaw being the direction the object is facing relative to the world within -180 to 180 Degrees Any help would be appreciated, i hope i explained everything alright, if not, just ask, ill elaborate.
 
Last edited:
Physics news on Phys.org
Homework EquationsX = Xr - XtY = Yr - YtTheta = atan(Y,X)-YawThe AnswerThe equation you need to calculate the directional vector (Dv) is:Dv = (cos(Theta), sin(Theta))Where Theta is the angle between the Pr line and the Pt point, which you have calculated as:Theta = atan(Y,X)-YawTherefore, the equation for the directional vector (Dv) is:Dv = (cos(atan(Y,X)-Yaw), sin(atan(Y,X)-Yaw))
 
Thread 'Variable mass system : water sprayed into a moving container'
Starting with the mass considerations #m(t)# is mass of water #M_{c}# mass of container and #M(t)# mass of total system $$M(t) = M_{C} + m(t)$$ $$\Rightarrow \frac{dM(t)}{dt} = \frac{dm(t)}{dt}$$ $$P_i = Mv + u \, dm$$ $$P_f = (M + dm)(v + dv)$$ $$\Delta P = M \, dv + (v - u) \, dm$$ $$F = \frac{dP}{dt} = M \frac{dv}{dt} + (v - u) \frac{dm}{dt}$$ $$F = u \frac{dm}{dt} = \rho A u^2$$ from conservation of momentum , the cannon recoils with the same force which it applies. $$\quad \frac{dm}{dt}...
Back
Top