网约车 修复坐标不一致导致的距离计算和自动驾驶不准确的问题
This commit is contained in:
@@ -263,21 +263,22 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
|
||||
// Log.d( "matchRoad", "cost = %s", System.currentTimeMillis() - start );
|
||||
|
||||
mLastPositions.put(uniqueKey, recognizedListResult);
|
||||
if (useCache) {
|
||||
Log.d(TAG, "使用缓存 id : " + uniqueKey);
|
||||
long interval = 45;
|
||||
if(lastPosition != null){
|
||||
interval = computeAnimDuration(lastPosition.systemTime, recognizedListResult.systemTime, lastPosition.satelliteTime, recognizedListResult.satelliteTime);
|
||||
}
|
||||
final MogoLatLng renderLoc = new MogoLatLng(recognizedListResult.lat, recognizedListResult.lon);
|
||||
long cost = System.currentTimeMillis() - start;
|
||||
final long intervalRef = interval - cost;
|
||||
marker.addDynamicAnchorPosition(renderLoc, (float) recognizedListResult.heading, intervalRef);
|
||||
} else {
|
||||
Log.d(TAG, "未使用缓存 id : " + uniqueKey);
|
||||
marker.setRotateAngle(((float) recognizedListResult.heading));
|
||||
marker.setPosition(recognizedListResult.lat, recognizedListResult.lon);
|
||||
// if (useCache) {
|
||||
// }
|
||||
Log.d(TAG, "使用缓存 id : " + uniqueKey);
|
||||
long interval = 45;
|
||||
if(lastPosition != null){
|
||||
interval = computeAnimDuration(lastPosition.systemTime, recognizedListResult.systemTime, lastPosition.satelliteTime, recognizedListResult.satelliteTime);
|
||||
}
|
||||
final MogoLatLng renderLoc = new MogoLatLng(recognizedListResult.lat, recognizedListResult.lon);
|
||||
long cost = System.currentTimeMillis() - start;
|
||||
final long intervalRef = interval - cost;
|
||||
marker.addDynamicAnchorPosition(renderLoc, (float) recognizedListResult.heading, intervalRef);
|
||||
// else {
|
||||
// Log.d(TAG, "未使用缓存 id : " + uniqueKey);
|
||||
// marker.setRotateAngle(((float) recognizedListResult.heading));
|
||||
// marker.setPosition(recognizedListResult.lat, recognizedListResult.lon);
|
||||
// }
|
||||
String carColor = recognizedListResult.color;
|
||||
if (TextUtils.isEmpty(carColor)) {
|
||||
carColor = getModelRenderColor(recognizedListResult.type, FROM_ADAS, recognizedListResult.speed, recognizedListResult.lon, recognizedListResult.lat, recognizedListResult.heading);
|
||||
|
||||
Reference in New Issue
Block a user