Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

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

1 visualizzazione (ultimi 30 giorni)
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

Risposte (0)

Questa domanda è chiusa.

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by