Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 2(최근 30일)
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

답변(0개)

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by