|
@@ -1721,6 +1721,39 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
}
|
|
|
|
|
|
|
|
|
+ // 解析云平台数据
|
|
|
+ if(ServiceCarStatus.stationCmd.received==true)
|
|
|
+ {
|
|
|
+ std::vector<Station> station_received;
|
|
|
+ Station station_aa,station_nearest;
|
|
|
+ station_received.clear();
|
|
|
+ for(int i=0;i<ServiceCarStatus.stationCmd.stationTotalNum;i++)
|
|
|
+ {
|
|
|
+ station_aa.index=i;
|
|
|
+ station_aa.station_location.gps_lat=ServiceCarStatus.stationCmd.stationGps[i].gps_lat;
|
|
|
+ station_aa.station_location.gps_lng=ServiceCarStatus.stationCmd.stationGps[i].gps_lng;
|
|
|
+ station_received.push_back(station_aa);
|
|
|
+ }
|
|
|
+ station_nearest=getNearestStation(now_gps_ins,station_received,gpsMapLine);
|
|
|
+
|
|
|
+ if(ServiceCarStatus.stationCmd.emergencyStop==0x01)
|
|
|
+ {
|
|
|
+ ServiceCarStatus.carState = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ if((ServiceCarStatus.stationCmd.stationStop==0x00))
|
|
|
+ {
|
|
|
+ ServiceCarStatus.carState = 2;
|
|
|
+ ServiceCarStatus.amilat=station_nearest.station_location.gps_lat;
|
|
|
+ ServiceCarStatus.amilng=station_nearest.station_location.gps_lng;
|
|
|
+ }
|
|
|
+
|
|
|
+ ServiceCarStatus.stationCmd.received=false;
|
|
|
+ busMode=true;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
if (ServiceCarStatus.carState == 0 && busMode)
|
|
@@ -1749,7 +1782,6 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
///kkcai, 2020-01-03
|
|
|
//if (ServiceCarStatus.carState == 2 && busMode)
|
|
|
if (ServiceCarStatus.carState == 2)
|