Pārlūkot izejas kodu

change rustdecisiondemo, add some calc, not complete.

yuchuli 11 mēneši atpakaļ
vecāks
revīzija
fa1867100d

+ 75 - 0
src/RUST/rustdecisiondemo/src/gnssconvert.rs

@@ -0,0 +1,75 @@
+
+
+
+pub fn gauss_proj_cal(longitude : f64, latitude:f64) -> (f64,f64){
+    let i_pi = 0.0174532925199433; ////3.1415926535898/180.0;
+    let zone_wide = 6; ////6度带宽
+    let ap = 6378245.0; 
+    let f = 1.0 / 298.3; //54年北京坐标系参数
+    let lnint = longitude as i32;
+ 
+    let proj_no : i32 = lnint / zone_wide;
+    let mut longitude0 : f64 = proj_no as f64 * zone_wide as f64 + zone_wide as f64/ 2.0;
+    longitude0 = longitude0 * i_pi;
+  //  let mut latitude0: f64 = 0.0;
+    let longitude1: f64 = longitude * i_pi; //经度转换为弧度
+    let latitude1: f64 = latitude * i_pi; //纬度转换为弧度
+    let e2: f64 = 2.0 * f - f * f;
+    let ee: f64 = e2 * (1.0 - e2);
+    let nn: f64 = ap / (1.0 - e2 * latitude1.sin()*latitude1.sin()).sqrt();
+    let t: f64= latitude1.tan()*latitude1.tan();
+    let c: f64 = ee * latitude1.cos()*latitude1.cos();
+    let a: f64 = (longitude1 - longitude0)*latitude1.cos();
+    let m: f64 = ap * ((1.0 - e2 / 4.0 - 3.0 * e2*e2 / 64.0 - 5.0 * e2*e2*e2 / 256.0)*latitude1 - (3.0 * e2 / 8.0 + 3.0 * e2*e2 / 32.0 + 45.0 * e2*e2
+        *e2 / 1024.0)*((2.0 * latitude1).sin())
+        + (15.0 * e2*e2 / 256.0 + 45.0 * e2*e2*e2 / 1024.0)*((4.0 * latitude1).sin()) - (35.0 * e2*e2*e2 / 3072.0)*((6.0 * latitude1).sin()));
+ //   println!(" lat: {} m: {}",latitude1,m);
+    let mut xval: f64 = nn * (a + (1.0 - t + c)*a*a*a / 6.0 + (5.0 - 18.0 * t + t * t + 72.0 * c - 58.0 * ee)*a*a*a*a*a / 120.0);
+    let mut  yval: f64 = m + nn * latitude1.tan()*(a*a / 2.0 + (5.0 - t + 9.0 * c + 4.0 * c*c)*a*a*a*a / 24.0
+        + (61.0 - 58.0 * t + t * t + 600.0 * c - 330.0 * ee)*a*a*a*a*a*a / 720.0);
+    let x0: i32 = 1000000 * (proj_no + 1) + 500000;
+    let y0: i32 = 0;
+    xval = xval + x0 as f64; 
+    yval = yval + y0 as f64;
+    (xval,yval)
+}
+
+//高斯投影由大地坐标(Unit:Metres)反算经纬度(Unit:DD)
+pub fn gauss_proj_inv_cal(X: f64, Y: f64) -> (f64,f64){
+
+    let i_pi: f64 = 0.0174532925199433; ////3.1415926535898/180.0;
+    let a: f64 = 6378245.0; 
+    let f: f64 = 1.0 / 298.3; //54年北京坐标系参数
+    ////a=6378140.0; f=1/298.257; //80年西安坐标系参数
+    let zone_wide: i32 = 6; ////6度带宽
+    let proj_no: i32 = (X / 1000000.0) as i32; //查找带号
+    let mut longitude0: f64 = (proj_no as f64 - 1.0) * zone_wide as f64 + zone_wide as  f64/ 2.0;
+    longitude0 = longitude0 * i_pi; //中央经线
+    let x0: f64 = proj_no as f64 * 1000000.0 + 500000.0;
+    let y0: f64 = 0.0;
+    let xval: f64 = X - x0; 
+    let yval: f64 = Y - y0; //带内大地坐标
+    let e2: f64 = 2.0 * f - f * f;
+    let e1: f64 = (1.0 - (1.0 - e2).sqrt()) / (1.0 + (1.0 - e2).sqrt());
+    let ee: f64 = e2 / (1.0 - e2);
+    let m: f64 = yval;
+    let u: f64 = m / (a*(1.0 - e2 / 4.0 - 3.0 * e2*e2 / 64.0 - 5.0 * e2*e2*e2 / 256.0));
+    let fai: f64 = u + (3.0 * e1 / 2.0 - 27.0 * e1*e1*e1 / 32.0)*(2.0 * u).sin() + (21.0 * e1*e1 / 16.0 - 55.0 * e1*e1*e1*e1 / 32.0)*(
+                4.0 * u).sin()
+            + (151.0 * e1*e1*e1 / 96.0)*(6.0 * u).sin() + (1097.0 * e1*e1*e1*e1 / 512.0)*(8.0 * u).sin();
+    let c: f64 = ee * fai.cos()*fai.cos();
+    let t: f64 = fai.tan()*fai.tan();
+    let nn: f64 = a / (1.0 - e2 * fai.sin()*fai.sin()).sqrt();
+    let r: f64 = a * (1.0 - e2) / ((1.0 - e2 * fai.sin()*fai.sin())*(1.0 - e2 * fai.sin()*fai.sin())*(1.0 - e2 * 
+                                                                                       fai.sin()*fai.sin())).sqrt();
+    let d: f64 = xval / nn;
+    //计算经度(Longitude) 纬度(Latitude)
+    let longitude1: f64 = longitude0 + (d - (1.0 + 2.0 * t + c)*d*d*d / 6.0 + (5.0 - 2.0 * c + 28.0 * t - 3.0 * c*c + 8.0 * ee + 24.0 * t*t)*d
+                               *d*d*d*d / 120.0) / fai.cos();
+    let latitude1: f64 = fai - (nn*fai.tan() / r)*(d*d / 2.0 - (5.0 + 3.0 * t + 10.0 * c - 4.0 * c*c - 9.0 * ee)*d*d*d*d / 24.0
+                                         + (61.0 + 90.0 * t + 298.0 * c + 45.0 * t*t - 256.0 * ee - 3.0 * c*c)*d*d*d*d*d*d / 720.0);
+    //转换为度 DD
+    let longitude: f64 = longitude1 / i_pi;
+    let latitude: f64 = latitude1 / i_pi;
+    (longitude,latitude)
+}

+ 62 - 2
src/RUST/rustdecisiondemo/src/main.rs

@@ -1,8 +1,14 @@
 mod modulecommrust;  
 
 mod proto;
+mod gnssconvert;
+use gnssconvert::gauss_proj_cal;
+
+
+
 use proto::mapdata::Tracemap;
-use proto::gpsimu::Gpsimu;
+use proto::mapdata::Mappoint;
+use proto::gpsimu::{self, Gpsimu};
 use protobuf::Message;
 extern  crate protobuf;
 
@@ -13,6 +19,7 @@ use std::time::Duration;
 use std::sync::Mutex;  
 use lazy_static::lazy_static;  
 
+
   
 struct  Adcdes{
     xtr:Tracemap,
@@ -24,9 +31,18 @@ struct  Adcdes{
 impl Adcdes{
     fn GetDecision(&mut self) -> f32{
         println!("in decision xtr Size: {} update {}", self.xtr.point.len(),self.bxtrupdate);  
-        self.bgpsimuupdate = false;
+        if self.bxtrupdate == false {
+            return 0.0;
+        }
+
+        if self.bgpsimuupdate == false {
+            return 0.0;
+        }
+        
+        calcdecisoindemo(&self.xgpsimu,&self.xtr);
         
         
+        self.bgpsimuupdate = false;
         1.0
     }
 }
@@ -39,6 +55,44 @@ lazy_static! {
 }  
 
 
+fn FindNearIndex(xgpsimu:&Gpsimu,xtracemap : &Tracemap) -> i32 {
+    let (x,y) = gauss_proj_cal(xgpsimu.lon(), xgpsimu.lat());
+    let mut nearindex = -1;
+    let mut neardis = 100000.0;
+    let mut index = 0;
+    let xpoints: &Vec<Mappoint> = &(xtracemap.point);
+
+    for xp in xpoints.iter(){
+        println!("point,x: {} y: {}",xp.gps_x(),xp.gps_y());
+        let dis = ((x - xp.gps_x())*(x - xp.gps_x()) + (y - xp.gps_y())*(y - xp.gps_y())).sqrt();
+        let mut headingdiff = xgpsimu.heading() - xp.ins_heading_angle();
+        while headingdiff < -180.0{
+            headingdiff = headingdiff + 360.0;
+        }
+            
+        while headingdiff >= 180.0{
+            headingdiff = headingdiff - 360.0;
+        }
+            
+        if headingdiff.abs() < 80.0 {
+            if dis < neardis {
+                neardis = dis;
+                nearindex = index;
+            }
+        }
+        index = index + 1
+        
+    }
+    
+    nearindex
+}
+
+
+fn calcdecisoindemo(xgpsimu:&Gpsimu,xtracemap : &Tracemap) -> f32{
+    FindNearIndex(xgpsimu, xtracemap);
+    1.0
+}
+
 // 定义Rust中的回调函数,与C/C++中的SMCallBack兼容  
 
 
@@ -72,6 +126,7 @@ extern "C" fn tracemap_callback(strdata: *const c_char, nsize: c_uint, index: c_
             
             a.xtr = xtracemap;
             a.bxtrupdate = true;
+            
             println!("after xtr Size: {}", a.xtr.point.len());  
             
 
@@ -107,6 +162,11 @@ extern "C" fn gpsimu_callback(strdata: *const c_char, nsize: c_uint, index: c_ui
 fn main() {
     println!("Hello, world!");
 
+    let lon0 = 119.119;
+    let lat0 = 39.119;
+    let (x,y) = gauss_proj_cal(lon0, lat0);
+    println!("x = {} y = {}",x,y);
+
     let strcommname = "test";  
 
     let c_commname = std::ffi::CString::new(strcommname).unwrap();  

+ 33 - 0
src/RUST/rustdecisiondemo/src/proto/chassis.proto

@@ -0,0 +1,33 @@
+syntax = "proto2";
+
+package iv;
+
+message chassis
+{
+  optional int64 time = 1; //ms
+  optional int32 EPSMode = 2  [default = 0]; //0 idle 1 Manual 2 Auto
+  optional int32 EPBFault = 3 [default = 0];  //0 No 1 Have Fault
+  optional int32 DriveMode = 4;      //0 Manual 1 Auto
+  optional int32 Shift = 5;  //0 N  1 D   2 R  3 P  hapo:1p2r3n4d
+  optional int32 AEBAvailable = 6;
+  optional int32 CDDAvailable = 7;
+  optional int32 angle_feedback = 8;
+  optional float torque = 9;
+  optional float vel = 10;   //km/h
+  optional float accstep = 11;
+  optional float soc = 12;
+  optional float brake_feedback = 13;
+  optional int32 EPB_feedback = 14;
+  optional int32 EmergencyStop_feedback = 15;
+  optional int32 brakelight_feedback = 16;
+  optional float range_feedback = 17;
+  optional int32 drivectrltype_feedback = 18;
+  optional int32 brakectrltype_feedback = 19;
+  optional int32 epsctrltype_feedback = 20;
+  optional float frontleftwheel_feedback = 21;
+  optional float frontrightwheel_feedback = 22;
+  optional float rearleftwheel_feedback = 23;
+  optional float rearrightwheel_feedback = 24;
+  optional float engine_speed = 25;
+  
+};

+ 60 - 0
src/RUST/rustdecisiondemo/src/proto/decition.proto

@@ -0,0 +1,60 @@
+syntax = "proto2";
+
+package iv.brain;
+
+message decition
+{
+    optional float speed = 1;                //车速
+    optional float wheelAngle = 2;           //横向转向角度
+    optional float wheelSpeed = 3;           //方向盘角速度
+    optional float lateralTorque = 4;        //横向扭矩
+    optional float brake = 5;                //刹车
+    optional float accelerator = 6;          //纵向加速度
+    optional float torque = 7;               //油门
+    optional bool  leftLamp = 8;             //左转向灯
+    optional bool  rightLamp = 9;            //右转向灯
+    optional bool  doubleSpark = 10;          //双闪
+    optional bool  headLight = 11;            //前灯
+    optional bool  highBeam = 12;             //远光灯
+    optional int32  dippedLight = 13;          //近光灯
+    optional bool  tailLight = 14;            //尾灯
+    optional bool  domeLight = 15;            //顶灯
+    optional bool  fogLamp = 16;              //雾灯
+    optional bool  backupLight = 17;          //倒车灯
+    optional bool  brakeLamp = 18;            //制动灯
+    optional int32   engine = 19;               //发动机点火
+    optional int32   mode = 20;                 //模式:自动or手动
+    optional int32  handBrake = 21;            //手刹
+    optional bool  speak = 22;                //喇叭
+    optional int32  door = 23;                 //车门
+    optional int32   gear = 24;                 //挡位
+    optional int32   wiper = 25;                //雨刷
+    optional int32   grade = 26;                 //GE3使用的一个指标
+    optional float   ttc = 27;                  //预测碰撞时间 
+    optional bool   air_enable = 28;                  //空调使能 
+    optional float   air_temp = 29;                  //空调温度 
+    optional float   air_mode = 30;                  //空调模式 
+    optional float   wind_level = 31;                  //空调风力 
+    optional int32   roof_light = 32;                  //顶灯 
+    optional int32   home_light = 33;                  //日光灯 
+    optional float   air_worktime = 34;                  //空调工作时间
+    optional float   air_offtime = 35;                  //空调关闭时间 
+    optional bool   air_on = 36;                  //空调使能 
+	// vv7-tdu
+	optional bool air_ac = 37;
+	optional bool air_circle = 38;
+	optional bool air_auto = 39;
+	optional bool air_off = 40;
+	optional uint32 window_fl = 41;
+	optional uint32 window_fr = 42;
+	optional uint32 window_rl = 43;
+	optional uint32 window_rr = 44;
+    //chang_an_shen_lan
+	optional uint32 angle_mode = 45;  //横向控制激活模式
+	optional uint32 angle_active = 46; //横向控制激活,和上一条同时满足才执行横向请求角度 
+	optional uint32 acc_active = 47; //ACC扭矩请求激活(为1激活,为0不激活),不激活后不执行扭矩请求
+	optional uint32 brake_active = 48; //ACC减速激活(为1制动激活,为0制动不激活)
+	optional uint32 brake_type = 49;//ADC请求类型(制动时为1,其余情况为0)
+	optional float niuju_y = 50; //纵向扭矩
+	optional uint32 auto_mode = 51; //3为自动控制模式
+};

+ 82 - 0
src/RUST/rustdecisiondemo/src/proto/gpsimu.proto

@@ -0,0 +1,82 @@
+syntax = "proto2";
+
+package iv.gps;
+
+message pos_accuracy_def
+{
+ optional double latstd = 1;
+ optional double lonstd = 2;
+ optional double hstd = 3;
+};
+
+message vel_accuracy_def
+{
+ optional double vnstd = 1;
+ optional double vestd = 2;
+ optional double vdstd = 3;
+};
+
+message pose_accuracy_def
+{
+ optional double rollstd = 1;
+ optional double pitchstd = 2;
+ optional double yawstd = 3;
+};
+
+message dev_temp_def
+{
+ optional double temp = 1;
+};
+
+message gps_state_def
+{
+ optional int32 pos_state = 1;
+ optional int32 satnum = 2;
+ optional int32 heading_state = 3;
+};
+
+message wheel_state_def
+{
+ optional int32 wheeldata = 1;
+};
+
+
+
+message gpsimu
+{
+ optional double pitch = 1;
+ optional double roll = 2;
+ optional double heading = 3;
+ optional double gyro_x = 4; //惯导x轴角速度
+ optional double gyro_y = 5; //惯导y轴角速度
+ optional double gyro_z = 6; //惯导z轴角速度
+ optional double acce_x = 7;
+ optional double acce_y = 8;
+ optional double acce_z = 9;
+ optional double lat = 10;
+ optional double lon = 11;
+ optional double height = 12;
+ optional double vn = 13;//北向速度
+ optional double ve = 14;//东向速度
+ optional double vd = 15;//地向速度
+ optional int32 state = 16;
+ optional int32 type = 17;
+ optional pos_accuracy_def pos_accuracy = 18;
+ optional vel_accuracy_def vel_accuracy = 19;
+ optional dev_temp_def dev_temp = 20;
+ optional gps_state_def gps_state = 21;
+ optional wheel_state_def wheel_state = 22;
+ optional double time = 23;
+ optional bytes check = 24;
+ optional pose_accuracy_def pose_accuracy = 25;
+ optional int64 msgtime = 26;
+ optional double rtk_state = 27;
+ optional double ins_state = 28;
+ optional double acc_calc = 29;
+ optional int32 satnum1 = 30;
+ optional int32 satnum2 = 31;
+ optional int32 gpsweek = 32; //from 1980-1-6 weeks.
+ optional int32 gpstime = 33; //from sunday 0:00:00 seconds.
+ optional double speed = 34;
+
+};

+ 64 - 0
src/RUST/rustdecisiondemo/src/proto/mapdata.proto

@@ -0,0 +1,64 @@
+syntax = "proto2";
+
+package iv.map;
+
+message mappoint
+{
+        optional double gps_lat = 1 [default=0.0];//纬度
+        optional double gps_lng  = 2 [default=0.0];//经度
+
+        optional double gps_x  = 3 [default=0];   
+        optional double gps_y  = 4 [default=0];
+        optional double gps_z  = 5 [default=0];
+
+        optional double ins_heading_angle  = 6 [default=0];	//航向角
+
+
+        optional int32 speed_mode  = 7 [default=0];
+        optional int32 mode2  = 8 [default=0];
+        optional double speed  = 9 [default=0];			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
+
+        optional int32 roadMode = 10[default=0];
+        optional int32 runMode = 11[default=0];
+        optional int32 roadSum = 12[default=1];
+        optional int32 roadOri = 13[default=0];
+
+        optional double mfLaneWidth  = 14 [default=3.5]; // Current Lane Width
+
+        optional double mfDisToLaneLeft  = 15 [default=1.8]; //Distance to Lane Left
+        optional int32 mnLaneChangeMark  = 16 [default=0]; //1 to Left 0 not change   -1 to right
+        optional double mfDisToRoadLeft  = 17 [default=1.8]; //Distance to Road Left
+        optional double mfRoadWidth  = 18 [default=3.5]; // Road Width
+
+        optional bool mbInLaneAvoid  = 19 [default=true]; //if true suport In Lane Avoid
+        optional  double gps_lat_avoidleft = 20;
+        optional double gps_lng_avoidleft = 21;
+        optional double gps_lat_avoidright = 22;
+        optional double gps_lng_avoidright = 23;
+        optional double gps_x_avoidleft = 24;
+        optional double gps_y_avoidleft = 25;
+        optional double gps_x_avoidright = 26;
+        optional double gps_y_avoidright = 27;
+
+        optional bool mbnoavoid  = 28 [default=false]; //If true this point is no avoid.
+        optional double mfCurvature  = 29 [default=0];
+	
+	optional double rel_x = 30;  //relative x
+	optional double rel_y = 31;   //relative y
+	optional double rel_z = 32;   //relative z
+	optional double rel_yaw = 33;  //yaw
+	optional int32 laneid = 34;  // -1 -2 -3 right lane   1 2 3 left lane
+	optional int32 leftlanecout = 35; 
+	optional int32 rightlanecount = 36;
+	optional int32 roadid = 37;
+	optional int32 index = 38;
+
+
+};
+
+
+message tracemap
+{
+	repeated mappoint point = 1;
+	optional int32 nState  = 2;  
+};

+ 51 - 0
src/RUST/rustdecisiondemo/src/proto/object.proto

@@ -0,0 +1,51 @@
+syntax = "proto2";
+
+package iv.lidar;
+
+message PointXYZI {
+  optional float x = 1 [default = nan];
+  optional float y = 2 [default = nan];
+  optional float z = 3 [default = nan];
+  optional float i = 4 [default = 0];
+};
+
+message PointXYZ {
+  optional float x = 1 [default = nan];
+  optional float y = 2 [default = nan];
+  optional float z = 3 [default = nan];
+};
+
+message Dimension {
+  optional float x = 1 [default = 0];
+  optional float y = 2 [default = 0];
+  optional float z = 3 [default = 0];
+};
+
+message VelXY {
+  optional float x =1 [default = 0];
+  optional float y =2 [default = 0];
+};
+
+message lidarobject
+{
+  optional PointXYZ min_point = 1;
+  optional PointXYZ max_point = 2;
+  optional PointXYZ centroid = 3;
+  optional Dimension dimensions = 4;
+  optional PointXYZ position = 5;
+  optional double angle =6;
+  optional double velocity_linear_x = 7;
+  optional double acceleration_linear_y = 8;
+  optional double timestamp = 9;
+  optional double tyaw = 10;
+  required int32 mnType = 11;
+  optional int32 id = 12;
+  optional int32 behavior_state = 13;
+  optional float score = 14;
+  optional bool velocity_reliable = 15;
+  optional bool pose_reliable = 16;
+  repeated float type_probs = 17;
+  repeated PointXYZI cloud = 18;
+  optional string type_name = 19;
+  optional VelXY vel_relative = 20; //相对速度
+};

+ 11 - 0
src/RUST/rustdecisiondemo/src/proto/objectarray.proto

@@ -0,0 +1,11 @@
+syntax = "proto2";
+
+package iv.lidar;
+
+import "object.proto";
+
+message objectarray
+{
+  repeated lidarobject obj = 1;
+  optional double timestamp = 2;
+};

+ 61 - 0
src/RUST/rustdecisiondemo/src/proto/radarobject.proto

@@ -0,0 +1,61 @@
+syntax = "proto2";
+
+package iv.radar;
+
+message radarobject
+{
+  required double x = 1; //直角坐标位置,右为正,米
+  required double y = 2; //直角坐标位置,前为正,米
+  required double vx = 3; //直角坐标速度,右为正,米每秒
+  required double vy = 4; //直角坐标速度,前为正,米每秒
+  required double vel = 5; //速度标量,始终为正,米每秒
+  required bool bValid = 6; //数据可信标志
+
+  // Delphi ESR
+  optional double Range =7; //极坐标下距离
+  optional double Range_Rate =8; //纵向速度,极坐标,远离为正,米每秒
+  optional double Range_Accel =9; //纵向加速度,极坐标,远离为正,米每二次方秒
+  optional double Angle =10; //位置角度,极坐标,顺时针正,正前为0,度
+  optional double Width =11; //宽度,米,分辨率0.5米
+  optional bool Grouping_Changed =12; //组别变化
+  optional bool Oncoming =13; //相向移动
+  optional double Lat_Rate =14; //横向速度,极坐标,逆时针正,米每秒
+  optional int32 Med_Range_Mode =15; //目标被追踪模式,0无追踪,1中距雷达追踪,2长距雷达追踪,3中、长距追踪
+  optional int32 Track_Status =16; //追踪状态,0无目标,1新的目标,2新的更新过的目标,3更新过的目标,4平稳运动的目标,5渐融的目标,6不可信的平稳运动目标,7新的平稳运动目标
+  optional bool Bridge_Object =17; //桥梁标志
+  optional bool Moving =18; //运动
+  optional bool Fast_Movable =19; //快速运动
+  optional bool Slow_Movable =20; //慢速运动
+  optional int32 Power =21; //信号反射强度,单位dB
+  optional int32 Detect_Valid_Level = 22;//srr目标置信度
+  optional bool Detect_Status = 23;//srr目标检测状态,为1目标有效,置信度有意义
+
+  // Continental ARS408/SRR308
+  optional int32 ID =24;
+  optional int32 Dynamic_Property =25; //动态属性 0运动 1静止 2来向 3静止候选 4未知 5横穿静止 6横穿运动 7停止(运动过)
+  optional double RCS_RadarCrossSection =26; //目标对电波的散射面积
+  optional double DistLong_RMS =27; //纵向距离标准差 即真值=纵向距离+/-标准差 SRR308不可用
+  optional double DistLat_RMS =28; //横向距离标准差 SRR308不可用
+  optional double VrelLong_RMS =29; //纵向速度标准差 SRR308不可用
+  optional double VrelLat_RMS =30; //横向速度标准差 SRR308不可用
+
+  optional double Cluster_Pdh0 =31; //Cluster目标虚警概率
+  optional int32 Cluster_AmbigState =32; //多普勒径向速度解模糊状态 >=3时 cluster相对可信 SRR308不可用
+  optional int32 Cluster_InvalidState =33; //Cluster目标有效性状态 1、2、3、5、6、7、D、E无效,其他的是有效目标但可能有属性缺陷 308不可用
+  optional int32 Cluster_PropertiesBitfield =34; //SRR308专属 目标状态属性字段 需要按位解析 0x0为无属性 bit0静态 bit1动态 bit2模糊的 bit4近场波束扫描到的 bit6护栏后的目标
+  optional int32 Cluster_InvalidReasonBitfield =35; //SRR308专属 目标无效原因字段 需要按位解析 0x0表示有效目标 bit1低RCS动态 bit2低RCS静态 bit3速度不可信 bit4距离不可信 bit5目标是多径虚影
+
+  optional double Object_ArelLatRMS =36; //横向相对加速度标准差
+  optional double Object_ArelLongRMS =37; //纵向相对加速度标准差
+  optional double Object_OrientationRMS =38; //航向角标准差
+  optional int32 Object_MeasureState =39; //测量状态 0被删除的目标 1新创建的 2测量到的 3预测出的 4并如其他聚类的 5从聚类中分离出的
+  optional double Object_ProbOfExist =40; //目标存在概率
+  optional double Object_ArelLong =41; //纵向加速度
+  optional double Object_ArelLat =42; //横向加速度
+  optional double Object_OrientationAngle =43; //航向角
+  optional int32 Object_Class =44; //目标类别 0point 1car 2truck 3pedestrian 4motorcycle 5bicycle 6wide/wall 7reserved
+  optional double Object_Length =45; //目标长度
+  optional double Object_Width =46; //目标宽度
+};
+
+

+ 51 - 0
src/RUST/rustdecisiondemo/src/proto/radarobjectarray.proto

@@ -0,0 +1,51 @@
+
+syntax = "proto2";
+
+package iv.radar;
+
+import "radarobject.proto";
+
+message radarobjectarray
+{
+  repeated radarobject obj = 1;
+  optional int64 mstime = 2;
+
+  //Delphi ESR
+  optional int32 ACC_Sta_Obj_ID =3; //路线上自适应巡航静态或相对靠近目标推荐id
+  optional int32 ACC_Mov_Obj_ID =4; //路线上自适应巡航动态或可动目标推荐id
+  optional int32 CMbB_Sta_Obj_ID =5; //路线上刹车减缓碰撞静态目标推荐id
+  optional int32 CMbB_Mov_Obj_ID =6; //路线上刹车减缓碰撞动态目标推荐id
+  optional int32 FCW_Sta_Obj_ID =7; //路线上前碰撞预警静态目标推荐id
+  optional int32 FCW_Mov_Obj_ID =8; //路线上前碰撞预警动态目标推荐id
+  optional bool Grating_Lobe_Det =9; //acc目标为栅瓣目标,可能并非路线上最近物体,需谨慎判断
+  optional bool Truck_Target_Det =10; //acc目标是卡车类,可能并非路线上的最近物体,需谨慎判断
+
+  optional int32 Water_Spray_Target_ID = 11; //最近的溅水目标,该目标可能是虚影(雨雪),也可能是实物(车轮溅水)
+  optional double Filtered_XOHP_ACC_CIPV = 12; //路线上最近ACC目标的滤波后的在主车驶路线上的横向偏移,单位米
+  optional int32 Path_ID_ACC_2 = 13; //路线上第二近ACC目标id
+  optional int32 Path_ID_ACC_3 = 14; //路线上第三近ACC目标id
+
+  optional bool Internal_Error = 15; //雷达内部错误标志,0为正常
+  optional bool Range_Perf_Error = 16; //雷达受遮挡错误标志,0为正常
+  optional bool Overheat_Error = 17; //雷达过热标志,0为正常
+
+  optional double Valid_LR_Range =18; //长距雷达可信距离
+  optional double Valid_LR_Range_Rate =19; //长距雷达可信速度
+  optional double Valid_LR_Angle = 20; //长距雷达可信角度
+  optional double Valid_LR_Power =21; //长距雷达可信目标反射强度
+
+  optional double Valid_MR_Range =22; //中距雷达可信距离
+  optional double Valid_MR_Range_Rate =23; //中距雷达可信速度
+  optional double Valid_MR_Angle = 24; //中距雷达可信角度
+  optional double Valid_MR_Power =25; //中距雷达可信目标反射强度
+  
+  //Continental ARS408/SRR308
+  optional bool Persistent_Error =26; //持续性错误标志,重启无法恢复
+  optional bool Interference_Error =27; //检测到干扰
+  optional bool Temperature_Error =28; //温度过高过低报警
+  optional bool Temporary_Error =29; //临时错误,重启可消除
+  optional bool Voltage_Error =30; //电压异常
+  optional bool Speed_Loss =31; //车速信息丢失
+  optional bool Yaw_Rate_Loss =32; //航向角速度信息丢失
+  optional string Radar_Version =33; //版本号  
+};

+ 1 - 1
src/common/common/license_local/adclicense.cpp

@@ -80,7 +80,7 @@ QString ADCLicenseServ::readLicense()
     if (!QFile::exists(filePath)){
         if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
            QTextStream out(&file);
-            out << " "<<endl;
+            out << " ";//<<endl;
            file.close();
            qDebug() << "File created and written successfully.";
            return "0";

+ 1 - 1
src/tool/simple_planning_simulator/main.cpp

@@ -11,7 +11,7 @@ int main(int argc, char *argv[])
     QApplication a(argc, argv);
     MainWindow w;
     w.show();
-//    return a.exec();
+    return a.exec();
     ADCLicenseServ adclicense;
     int checklicense=adclicense.CheckLincese();
     if (checklicense==1)