add new func of ezhou airport and upgrade the aiSdkVersion to fit demo server

This commit is contained in:
zhongchao
2021-08-05 10:50:05 +08:00
parent 78e869a3b4
commit ea4e380b35
73 changed files with 2634 additions and 829 deletions

View File

@@ -2,7 +2,7 @@ package com.mogo.service.adas;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.realtime.entity.ADASRecognizedResult;
import com.mogo.service.adas.entity.ADASRecognizedResult;
import java.util.List;
@@ -180,14 +180,21 @@ public interface IMogoADASController extends IProvider {
*/
double getLastSpeed();
/**
* 获取由工控机传回的GPS星历时间
*
* @return
*/
String getSatelliteTime();
/**
* 结束自动驾驶
*/
void cancelAutopilot();
void mockAdasLoc( String json );
void mockAdasLoc(String json);
void mockAdasRecognized( List< ADASRecognizedResult > recognizedResults );
void mockAdasRecognized(List<ADASRecognizedResult> recognizedResults);
void mockAdasRecognized( String json );
}

View File

@@ -1,7 +1,7 @@
package com.mogo.service.adas;
import com.mogo.realtime.entity.ADASRecognizedResult;
import com.mogo.service.adas.entity.ADASRecognizedResult;
import java.util.List;

View File

@@ -0,0 +1,115 @@
package com.mogo.service.adas.entity;
/*
* adas 识别物体参数
*/
public class ADASRecognizedResult {
/**
* 识别物体类型
*/
public int type;
/**
* 识别物体唯一标识
*/
public String uuid;
/**
* 红绿灯颜色
*/
public String color;
/**
* 车ID
*/
public String carId;
/**
* 识别物体的纬度
*/
public double lat;
/**
* 识别物体的经度
*/
public double lon;
/**
* 车头朝向
*/
public double heading;
/**
* 系统时间
*/
public long systemTime;
/**
* 定位卫星时间
*/
public long satelliteTime;
/**
* 海拔
*/
public double alt;
/**
* 速度
*/
public double speed;
/**
* 莫顿码
*/
public long mortonCode;
/**
* 实际距离
* 使用distanceX和distanceY计算
*/
public double distance;
/**
* 数据来源精度
* 0普通定位
* 1高精定位
*/
public int dataAccuracy;
/**
* 道路ID
*/
public String roadId;
/**
* 车道ID-2D路段
*/
public String laneId;
/**
* 车道号中心线编号为0中心线右侧编号为负数3车道通行Road的车道编号0-1-2-3
*/
public int laneNum;
/**
* 限速
*/
public double rateLimiting;
/**
* 瓦片id
*/
public String tileId;
/**
* 车道宽度
*/
public double roadWidth;
/**
* 1 绿, 2 黄, 3 红
*/
public int drawlevel;
}

View File

@@ -3,6 +3,7 @@ package com.mogo.service.connection;
import android.content.Context;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.cloud.socket.entity.MsgBody;
/**
* @author congtaowang
@@ -50,5 +51,5 @@ public interface IMogoSocketManager extends IProvider {
* @param body 消息体
* @param listener 回执监听
*/
void sendMsg( MsgBody body, IMogoMsgAckListener listener );
void sendMsg(MsgBody body, IMogoMsgAckListener listener );
}

View File

@@ -1,71 +0,0 @@
package com.mogo.service.connection;
/**
* @author congtaowang
* @since 2019-12-31
* <p>
* 描述
*/
public class MsgBody {
/**
* 消息类型
*/
private int mMsgType;
// /**
// * 服务端分发,业务线
// */
// private int mProductLine = MogoCommon.Product.mogoBussiness_VALUE;
//
// /**
// *
// */
// private int mHeaderType = MogoConnsvr.MsgType.mogoMsgTypeDispatchSvrNoRspReq_VALUE;
/**
* 是否回执
*/
private boolean mAck = false;
/**
* 消息ID
*/
private final long mMsgId = System.currentTimeMillis();
/**
* 消息内容
*/
private byte[] mContent;
public MsgBody msgType( int msgType ) {
this.mMsgType = msgType;
return this;
}
public MsgBody ack( boolean ack ) {
this.mAck = ack;
return this;
}
public MsgBody content( byte[] object ) {
this.mContent = object;
return this;
}
public int getMsgType() {
return mMsgType;
}
public boolean isAck() {
return mAck;
}
public long getMsgId() {
return mMsgId;
}
public byte[] getContent() {
return mContent;
}
}

View File

@@ -0,0 +1,314 @@
package com.mogo.service.locationinfo;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.RequiresApi;
import java.util.Objects;
/**
* 自车定位信息
*/
public class CloudLocationInfo implements Parcelable {
/**
* 纬度
*/
private double lat;
/**
* 经度
*/
private double lon;
/**
* 车头方向
*/
private double heading;
/**
* 系统时间
*/
private long systemTime;
/**
* 卫星时间
*/
private long satelliteTime;
/**
* 海拔
*/
private double alt;
/**
* 车速
*/
private double speed;
/**
* 车辆类型
* 0:普通车辆、家用车
*/
private int vehicleType = 0;
/**
* 道路ID
*/
private String roadId;
/**
* 车道ID-2D路段
*/
private String laneId;
/**
* 车道号中心线编号为0中心线右侧编号为负数3车道通行Road的车道编号0-1-2-3
*/
private int laneNum;
/**
* 限速
*/
private double rateLimiting;
/**
* 瓦片id
*/
private String tileId;
/**
* 车道宽度
*/
private double roadWidth;
public CloudLocationInfo() {
}
public CloudLocationInfo(CloudLocationInfo info) {
this.lat = info.getLat();
this.lon = info.getLon();
this.heading = info.getHeading();
this.systemTime = System.currentTimeMillis();
this.satelliteTime = System.currentTimeMillis();
this.alt = info.alt;
this.speed = info.speed;
this.vehicleType = info.vehicleType;
this.roadId = info.roadId;
this.laneId = info.laneId;
this.laneNum = info.laneNum;
this.rateLimiting = info.rateLimiting;
this.tileId = info.tileId;
this.roadWidth = info.roadWidth;
}
protected CloudLocationInfo(Parcel in) {
lat = in.readDouble();
lon = in.readDouble();
heading = in.readDouble();
systemTime = in.readLong();
satelliteTime = in.readLong();
alt = in.readDouble();
speed = in.readDouble();
vehicleType = in.readInt();
roadId = in.readString();
laneId = in.readString();
laneNum = in.readInt();
rateLimiting = in.readDouble();
tileId = in.readString();
roadWidth = in.readDouble();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeDouble(lat);
dest.writeDouble(lon);
dest.writeDouble(heading);
dest.writeLong(systemTime);
dest.writeLong(satelliteTime);
dest.writeDouble(alt);
dest.writeDouble(speed);
dest.writeInt(vehicleType);
dest.writeString(roadId);
dest.writeString(laneId);
dest.writeInt(laneNum);
dest.writeDouble(rateLimiting);
dest.writeString(tileId);
dest.writeDouble(roadWidth);
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<CloudLocationInfo> CREATOR = new Creator<CloudLocationInfo>() {
@Override
public CloudLocationInfo createFromParcel(Parcel in) {
return new CloudLocationInfo(in);
}
@Override
public CloudLocationInfo[] newArray(int size) {
return new CloudLocationInfo[size];
}
};
public double getLat() {
return lat;
}
public void setLat(double lat) {
this.lat = lat;
}
public double getLon() {
return lon;
}
public void setLon(double lon) {
this.lon = lon;
}
public double getHeading() {
return heading;
}
public void setHeading(double heading) {
this.heading = heading;
}
public long getSystemTime() {
return systemTime;
}
public void setSystemTime(long systemTime) {
this.systemTime = systemTime;
}
public long getSatelliteTime() {
return satelliteTime;
}
public void setSatelliteTime(long satelliteTime) {
this.satelliteTime = satelliteTime;
}
public double getAlt() {
return alt;
}
public void setAlt(double alt) {
this.alt = alt;
}
public double getSpeed() {
return speed;
}
public void setSpeed(double speed) {
this.speed = speed;
}
public int getVehicleType() {
return vehicleType;
}
public void setVehicleType(int vehicleType) {
this.vehicleType = vehicleType;
}
public String getRoadId() {
return roadId;
}
public void setRoadId(String roadId) {
this.roadId = roadId;
}
public String getLaneId() {
return laneId;
}
public void setLaneId(String laneId) {
this.laneId = laneId;
}
public int getLaneNum() {
return laneNum;
}
public void setLaneNum(int laneNum) {
this.laneNum = laneNum;
}
public double getRateLimiting() {
return rateLimiting;
}
public void setRateLimiting(double rateLimiting) {
this.rateLimiting = rateLimiting;
}
public String getTileId() {
return tileId;
}
public void setTileId(String tileId) {
this.tileId = tileId;
}
public double getRoadWidth() {
return roadWidth;
}
public void setRoadWidth(double roadWidth) {
this.roadWidth = roadWidth;
}
@Override
public String toString() {
return "CloudLocationInfo{" +
"lat=" + lat +
", lon=" + lon +
", heading=" + heading +
", systemTime=" + systemTime +
", satelliteTime=" + satelliteTime +
", alt=" + alt +
", speed=" + speed +
", vehicleType=" + vehicleType +
", roadId='" + roadId + '\'' +
", laneId='" + laneId + '\'' +
", laneNum=" + laneNum +
", rateLimiting=" + rateLimiting +
", tileId=" + tileId +
", roadWidth=" + roadWidth +
'}';
}
public String print() {
return "CloudLocation{ lon: " + lon + " lat: " + lat + " heading: " + heading + " speed: "
+ speed + " vehicleType: " + vehicleType + "}";
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CloudLocationInfo that = (CloudLocationInfo) o;
return Double.compare(that.lat, lat) == 0 &&
Double.compare(that.lon, lon) == 0;
}
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
@Override
public int hashCode() {
return Objects.hash(lat, lon);
}
}