adas update version 1
This commit is contained in:
@@ -157,7 +157,7 @@ ext {
|
||||
gpssimulatordebug : "com.mogo.module:module-gps-simulator-debug:${MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION}",
|
||||
gpssimulatornoop : "com.mogo.module:module-gps-simulator-noop:${MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION}",
|
||||
|
||||
adasapi : "com.zhidao.autopilot.support:adas:1.0.6.7",
|
||||
adasapi : "com.zhidao.autopilot.support:adas:1.0.6.10",
|
||||
adasconfigapi : "com.zhidao.adasconfig:adasconfig:1.1.5.2",
|
||||
|
||||
// 个人中心的SDK
|
||||
|
||||
@@ -982,12 +982,16 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
double acceleration = data.optDouble( "acceleration", -1 );
|
||||
double yawRate = data.optDouble( "yawRate", -1 );
|
||||
double speed = data.optDouble( "speed", -1 );
|
||||
long systemTime = data.optLong( "systemTime" );
|
||||
long receiverDataTime = data.optLong( "receiverDataTime" );
|
||||
if ( lon == -1 ) {
|
||||
return;
|
||||
}
|
||||
RTKAutopilotLocationBean bean = new RTKAutopilotLocationBean();
|
||||
bean.setYaw_rate( yawRate );
|
||||
bean.setHeading( heading );
|
||||
bean.setSystemTime( systemTime );
|
||||
bean.setReceiverDataTime( receiverDataTime );
|
||||
bean.setHeading( heading );
|
||||
bean.setAcceleration( acceleration );
|
||||
bean.setAlt( alt );
|
||||
|
||||
@@ -67,6 +67,7 @@ import com.mogo.utils.NetworkUtils;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
@@ -970,6 +971,16 @@ public class MogoServices implements IMogoMapListener,
|
||||
data.putOpt( "heading", stateInfo.getValues().getHeading() );
|
||||
data.putOpt( "acceleration", stateInfo.getValues().getAcceleration() );
|
||||
data.putOpt( "yawRate", stateInfo.getValues().getYaw_rate() );
|
||||
try {
|
||||
data.putOpt( "systemTime", Long.valueOf( stateInfo.getValues().getSystemTime() ) );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
data.putOpt( "receiverDataTime", Long.valueOf( stateInfo.getValues().getReceiverDataTime() ) );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getMapUIController().syncLocation2Map( data );
|
||||
SnapshotUploadInTime.getInstance().syncAdasLocationInfo( data );
|
||||
} catch ( Exception e ) {
|
||||
|
||||
@@ -55,6 +55,10 @@ public class ADASCarStateInfo implements Serializable {
|
||||
//gps 时间
|
||||
private String satelliteTime;
|
||||
|
||||
private String systemTime;
|
||||
//接收到数据的时间
|
||||
private String receiverDataTime;
|
||||
|
||||
public float getGnss_speed() {
|
||||
return gnss_speed;
|
||||
}
|
||||
@@ -119,6 +123,22 @@ public class ADASCarStateInfo implements Serializable {
|
||||
this.yaw_rate = yaw_rate;
|
||||
}
|
||||
|
||||
public String getSystemTime() {
|
||||
return systemTime;
|
||||
}
|
||||
|
||||
public void setSystemTime( String systemTime ) {
|
||||
this.systemTime = systemTime;
|
||||
}
|
||||
|
||||
public String getReceiverDataTime() {
|
||||
return receiverDataTime;
|
||||
}
|
||||
|
||||
public void setReceiverDataTime( String receiverDataTime ) {
|
||||
this.receiverDataTime = receiverDataTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ValuesBean{" +
|
||||
|
||||
@@ -45,6 +45,8 @@ import com.zhidao.autopilot.support.api.AutopilotServiceManage;
|
||||
import com.zhidao.autopilot.support.api.IAutopilotServiceStatusListener;
|
||||
import com.zhidao.autopilot.support.api.IAutopolitDataCallBack;
|
||||
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotArriveModel;
|
||||
import com.zhidao.autopilotservice.model.AdasAIDLAutopilotStateModel;
|
||||
import com.zhidao.autopilotservice.model.AdasAIDLOwnerCarStateModel;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.bean.CarStateInfo;
|
||||
import com.zhidao.support.adas.high.bean.RectInfo;
|
||||
@@ -314,21 +316,47 @@ public class MogoADASController implements IMogoADASController {
|
||||
|
||||
}
|
||||
|
||||
LogWriter logWriter;
|
||||
// LogWriter logWriter;
|
||||
|
||||
@Override
|
||||
public void ownerCarStateInfo( String ownerCarStateInfo ) {
|
||||
if ( logWriter == null ) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddhhmmss" );
|
||||
String date = sdf.format( new Date() );
|
||||
String path = context.getExternalCacheDir().getAbsolutePath() + "/adaslog/" + date + "/ownerCarStateInfo.txt";
|
||||
Logger.d( TAG, path );
|
||||
logWriter = new LogWriter( path );
|
||||
}
|
||||
logWriter.write( ownerCarStateInfo );
|
||||
ADASCarStateInfo stateInfo = GsonUtil.objectFromJson( ownerCarStateInfo, ADASCarStateInfo.class );
|
||||
// if ( logWriter == null ) {
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddhhmmss" );
|
||||
// String date = sdf.format( new Date() );
|
||||
// String path = context.getExternalCacheDir().getAbsolutePath() + "/adaslog/" + date + "/ownerCarStateInfo.txt";
|
||||
// Logger.d( TAG, path );
|
||||
// logWriter = new LogWriter( path );
|
||||
// }
|
||||
// logWriter.write( ownerCarStateInfo );
|
||||
// ADASCarStateInfo stateInfo = GsonUtil.objectFromJson( ownerCarStateInfo, ADASCarStateInfo.class );
|
||||
// if ( mMogoAdasCarDataCallback != null ) {
|
||||
// mMogoAdasCarDataCallback.onAdasCarDataCallback( stateInfo );
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyAutopilotState( AdasAIDLAutopilotStateModel autopilotStateModel ) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyOwnerCarState( AdasAIDLOwnerCarStateModel ownerCarStateModel ) {
|
||||
ADASCarStateInfo stateInf = new ADASCarStateInfo();
|
||||
stateInf.setAction( "state" );
|
||||
ADASCarStateInfo.ValuesBean bean = new ADASCarStateInfo.ValuesBean();
|
||||
bean.setSatelliteTime( ownerCarStateModel.getSatelliteTime() );
|
||||
bean.setAcceleration( ownerCarStateModel.getAcceleration() );
|
||||
bean.setAlt( ownerCarStateModel.getAlt() );
|
||||
bean.setGnss_speed( ownerCarStateModel.getGnss_speed() );
|
||||
bean.setHeading( ownerCarStateModel.getHeading() );
|
||||
bean.setLat( ownerCarStateModel.getLat() );
|
||||
bean.setLon( ownerCarStateModel.getLon() );
|
||||
bean.setReceiverDataTime( ownerCarStateModel.getReceiverDataTime() );
|
||||
bean.setSystemTime( ownerCarStateModel.getSystemTime() );
|
||||
bean.setYaw_rate( ownerCarStateModel.getYaw_rate() );
|
||||
stateInf.setValues( bean );
|
||||
if ( mMogoAdasCarDataCallback != null ) {
|
||||
mMogoAdasCarDataCallback.onAdasCarDataCallback( stateInfo );
|
||||
mMogoAdasCarDataCallback.onAdasCarDataCallback( stateInf );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user