Calculating Speed Between Two Cars

  • Thread starter Thread starter kacem
  • Start date Start date
  • Tags Tags
    Cars Speed
AI Thread Summary
The discussion revolves around calculating the speed of two cars using radar data from an ego vehicle. The key equations involve vector addition to determine the ground speed of the lead car, with Vx representing longitudinal speed and Vy representing lateral speed. There is confusion regarding the calculation of the heading angle, theta, and its relevance to the velocity components. Participants question the necessity of calculating theta when simple vector addition could suffice. The code in question is sourced from the Matlab Mathworks website, specifically related to ground speed calculations.
kacem
Messages
2
Reaction score
0
Hi,
I found a programming problem that calculated the speed between two cars as below and I would like to know how the calculation is done.
it is about determining the speed of two cars. The coordinate reference system (y,x) is attached to the ego vehicle (as shown in the attached figure).
The speed of the lead car is estimated with the radar of the ego vehicle.
As mentioned in the program reference: The true ground speed of a radar-reported object from the relative speed and the ego vehicle speed is calculated as follows:
(Vxi,Vyi) : relative object speed
egoSpeed : ego vehicle speed
[Vx,Vy] : ground object speed

Vx = Vxi + egoSpeed :Calculate longitudinal ground speed
theta = atan2(Vyi,Vxi) :Calculate heading angle
Vy = Vx * tan(theta) :Calculate lateral ground speed

Is there anyone who can explain how Vx and Vy are calculated? and why he uses the term "ground"?
Thank you.
 

Attachments

  • prob.png
    prob.png
    2.7 KB · Views: 202
Physics news on Phys.org
Welcome to the PF. :smile:
kacem said:
Is there anyone who can explain how Vx and Vy are calculated? and why he uses the term "ground"?
Those equations are just showing the vector addition of the two vehicle speeds to get the speed of the front vehicle with respect to the ground.

Have you learned any vector math in your schoolwork so far? If not, we can probably suggest some learning resources to help you get up to speed on these kinds of questions. :smile:
 
kacem said:
I found a programming problem ...
Where is the code from? It seems wrong:
Theta is the movement direction relative to the chase car based on : theta = atan2(Vyi,Vxi)
But it is used to relate the velocity components relative to ground : Vy = Vx * tan(theta)
 
Hi there, im studying nanoscience at the university in Basel. Today I looked at the topic of intertial and non-inertial reference frames and the existence of fictitious forces. I understand that you call forces real in physics if they appear in interplay. Meaning that a force is real when there is the "actio" partner to the "reactio" partner. If this condition is not satisfied the force is not real. I also understand that if you specifically look at non-inertial reference frames you can...
I have recently been really interested in the derivation of Hamiltons Principle. On my research I found that with the term ##m \cdot \frac{d}{dt} (\frac{dr}{dt} \cdot \delta r) = 0## (1) one may derivate ##\delta \int (T - V) dt = 0## (2). The derivation itself I understood quiet good, but what I don't understand is where the equation (1) came from, because in my research it was just given and not derived from anywhere. Does anybody know where (1) comes from or why from it the...
Back
Top