Calculate radial velocity

I am trying to simulate noise filtering in a Doppler shift radar. It should filter out objects moving below 25 m / s relative to the radar (approaching or moving). There should be two ways to avoid detection by the radar: if the object is moving in any direction but at a speed lower than 25 m / s, or if it is moving at any speed but perpendicular (or rather circling) by the radar. In both cases, the radial velocity of the object relative to the stationary radar must be below 25 m / s and thus trick the radar into filtering it out as noise. I know the position vector and the velocity vector (2D and 3D). I'm a complete idiot when it comes to math, so I just can't think of it. Any help please?

Edit: poorly formed question. I want to get the true radial velocity relative to radar and filter objects moving faster than 25 m / s, but in a relative direction that will make the radial velocity in the direction of the radar less than 25 m / s. One example would be an object moving at 30 m / s and 45 degrees perpendicular to the radar would be filtered, but not if the object is moving at 300 m / s.

+3


source to share


2 answers


I don't know Lua, but since this is a purely math question, math pseudocode should suffice.

Let r

- radar position, x

- object position, and v

- object velocity vector (in units of meters per second). These are all 2D or 3D vectors, depending on whether you are working in 2D or 3D.

The speed state is pretty simple: just take the norm of the speed vector v

and compare it to your 25 m / s threshold.

To find out if an object is bypassing the radar, calculate the vector from the radar to the object, which is equal x-r

, and check if it is perpendicular to the velocity vector; you do this by calculating the scalar product, which becomes zero when the two vectors are perpendicular. In practice, you should use a small threshold, greater than zero, so that the two vectors are slightly non-perpendicular.

In pseduo code, this becomes:

if v.norm()<25 or v.scalar_product(x-r)<0.05
    Ignore object
end

      

You will need to learn how to compute norms and scalar products in Lua (or, otherwise, compute them yourself as described in the linked pages).



Answer to Editable Question (Closing Speed)

The scalar product will come in handy for your modified question too. You get the closing speed as

v_closure = v.scalar_product(r-x)/norm(r-x)

      

Note that the result is signed - positive if the object is moving towards the radar, negative if it moves away from it. Then you would filter the noise like this:

if abs(v_closure)<25
    Ignore object
end

      

So, in a sense, this modified test is even simpler than the original version.

+5


source


Great answer by Martin, but just aside and a possible simplification, given that you need to compute Cos (Theta) anyway, it would be easy to simplify for

v_closure = norm (v) Cos (Theta)



where Theta is the angle between vectors (rx) and v

0


source







All Articles