Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How to correctly classify a vehicle state in function of its position?

1 vue (au cours des 30 derniers jours)
Serbring
Serbring le 3 Juin 2019
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hi all,
I have to classify a vehicle state in function of its position. So, I have created a shapefile containing the boundaries of each state and when the position coordinates lies inside an enclosed area specified in Shapefile, the vehicle state was set. This approach is too "rude", because the GPS is not sufficiently precise especially when the vehicle is close to the edge of a boundary, the risk of misclassify or to obtain a "jumping" classification between two different states is high. See the following pictures:
https://i.postimg.cc/k5xqhQjk/untitled2.jpg -> the vehicle state is changing but the vehicle is running along two neighbouring areas
Here you can find the code I have used for the calculation of the vehicle state.
OnField{i}=zeros(size(Longitude));
for iS=1:length(SHP)
OnFieldApp=inpolygon(Longitude,Latitude,SHP(iS).Lon,SHP(iS).Lat);
if any(OnFieldApp)==1
OnField{i}(OnFieldApp)=iS;
end
end
So, how can avoid this continous change of the vehicle state? My idea was to add a moving average filter to the vehicle classification, but it is not the best solution
Any suggestion is strongly appreciated
Best regards,
Pietro

Réponses (0)

Cette question est clôturée.

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by