This commit is contained in:
zhongchao
2022-09-27 19:40:02 +08:00
parent 95e8d54ad6
commit 6f5a63655b
2 changed files with 29 additions and 14 deletions

View File

@@ -1004,19 +1004,27 @@ public class AMapViewWrapper implements IMogoMapView,
if (gnssInfo.getLongitude() == -1) {
return;
}
RTKAutopilotLocationBean bean = new RTKAutopilotLocationBean();
bean.setYaw_rate(gnssInfo.getYawRate());
bean.setHeading(gnssInfo.getHeading());
bean.setAcceleration(gnssInfo.getAcceleration());
bean.setAlt(gnssInfo.getAltitude());
bean.setSystemTime(Double.valueOf(gnssInfo.getSystemTime()).longValue());
LonLatPoint bean = new LonLatPoint();
bean.setAngle(gnssInfo.getHeading());
bean.setAltitude(gnssInfo.getAltitude());
bean.setLongitude(gnssInfo.getLongitude());
bean.setLatitude(gnssInfo.getLatitude());
bean.setSatelliteTime(Double.valueOf(gnssInfo.getSatelliteTime() * 1000).longValue());
bean.setLon(gnssInfo.getLongitude());
bean.setLat(gnssInfo.getLatitude());
bean.setGnss_speed(((float) gnssInfo.getGnssSpeed()));
bean.setReceiverDataTime(System.currentTimeMillis());
bean.setSpeed((float) gnssInfo.getGnssSpeed());
// RTKAutopilotLocationBean bean = new RTKAutopilotLocationBean();
// bean.setYaw_rate(gnssInfo.getYawRate());
// bean.setHeading(gnssInfo.getHeading());
// bean.setAcceleration(gnssInfo.getAcceleration());
// bean.setAlt(gnssInfo.getAltitude());
// bean.setSystemTime(Double.valueOf(gnssInfo.getSystemTime()).longValue());
// bean.setSatelliteTime(Double.valueOf(gnssInfo.getSatelliteTime() * 1000).longValue());
// bean.setLon(gnssInfo.getLongitude());
// bean.setLat(gnssInfo.getLatitude());
// bean.setGnss_speed(((float) gnssInfo.getGnssSpeed()));
// bean.setReceiverDataTime(System.currentTimeMillis());
// 使用外部定位数据修改自车位置
mMapView.getLocationClient().updateRTKAutoPilotLocation(bean);
// mMapView.getLocationClient().updateRTKAutoPilotLocation(bean);
mMapView.getLocationClient().updateLocation(bean);
CallerMapUIServiceManager.INSTANCE.getSingletonLocationClient(getContext()).updateLocation(bean);
CallerMapDataCollectorManager.INSTANCE.setIsInit();
}