123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #include "ivdecision_brain.h"
- bool handPark;
- long handParkTime;
- bool rapidStop;
- int gpsMissCount;
- bool changeRoad;
- double avoidX;
- bool parkBesideRoad;
- double steerSpeed;
- bool transferPieriod;
- bool transferPieriod2;
- double traceDevi;
- namespace iv {
- ivdecision_brain::ivdecision_brain()
- {
- mvehState = VehState::normalRun;
- }
- int ivdecision_brain::getdecision(brain::decition &xdecition)
- {
- static qint64 nLastMapUpdate = 0;
- iv::GPSData now_gps_ins;
- if(GetGPS(now_gps_ins) == false)
- {
- return -1; //No GPS Position
- }
- if(IsMAPUpdate(nLastMapUpdate))
- {
- GetMAP(mgpsMapLine,nLastMapUpdate);
- mbisFirstRun = true;
- }
- if(mbisFirstRun)
- {
- //Init
- }
- switch (mvehState) {
- case VehState::normalRun:
- return getdecision_normal(xdecition);
- break;
- default:
- break;
- }
- return -1000;//mode error.
- }
- int ivdecision_brain::getdecision_normal(brain::decition &xdecition)
- {
- iv::decition::Decition gps_decition(new iv::decition::DecitionBasic);
- double obsDistance = -1;
- int esrLineIndex = -1;
- double lidarDistance = -1;
- int roadPre = -1;
- return 0;
- }
- }
|