How to define XY coordinates are on left and right side

4 visualizaciones (últimos 30 días)
SatyaPrakash Gupta
SatyaPrakash Gupta el 14 de Abr. de 2020
Comentada: Rik el 15 de Abr. de 2020
Hi,
I am working for the radar locations , where i have azimuth angles for each objects, with the help of this i am able to partially define the locations are on left/right side during straight road but unable to define it when there are sharp curve roads.
could you please do help me out to separate the above attached .mat file with XY coordinates belogn on Left/Right side ?
  3 comentarios
SatyaPrakash Gupta
SatyaPrakash Gupta el 14 de Abr. de 2020
sorry missed to attached the vehicle trajectory , earlier attached are locations and now i have attached Vehicle trajectory . therefore it would be greateful , if you could help me with the code which tells the locations are on Left/Right with respect to the Vehicle Trajectory coordinates
Rik
Rik el 15 de Abr. de 2020
Comment posted as flag by SatyaPrakash Gupta:
Can anyone from Mathwork will help me to resolve this issue , thank you

Iniciar sesión para comentar.

Respuestas (1)

KSSV
KSSV el 14 de Abr. de 2020
Follow the below steps.
  1. Pick a point (x,y) from the set of points.
  2. Using knnsearch get N number of points close to the (x,y) in trajectory points.
  3. Using polyfit, fit a striaght line with the N points.
  4. Use this: https://math.stackexchange.com/questions/324589/detecting-whether-a-point-is-above-or-below-a-slope. To know whether point is abive or below the given line.
This is the mehtod which I think shall work. There might be more elegant methods.
  1 comentario
SatyaPrakash Gupta
SatyaPrakash Gupta el 14 de Abr. de 2020
Editada: SatyaPrakash Gupta el 14 de Abr. de 2020
I believe that it will not work as well because when the vehicle is on the right side, then the closest locations will only visible on the right (using knnsearch), i just tried but not sucess.
could you help me with the code , I have been trying since 1-2 weeks, using cross product , azuimuth angle, yaw angle but did not successed and therefore i have raised this question.

Iniciar sesión para comentar.

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by