merge road cache

This commit is contained in:
tongchenfei
2021-03-11 14:06:17 +08:00
10 changed files with 511 additions and 355 deletions

View File

@@ -188,8 +188,7 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
final long start = System.currentTimeMillis();
double[] matchedPoint = SnapshotSetDataDrawer.getInstance().matchRoad( recognizedListResult.lon,
double[] matchedPoint = SnapshotSetDataDrawer.getInstance().matchRoad( recognizedListResult.uuid, recognizedListResult.lon,
recognizedListResult.lat,
recognizedListResult.heading,
true

View File

@@ -208,14 +208,14 @@ class BaseDrawer {
* @param isRtk
* @return
*/
public double[] matchRoad( double lon, double lat, double angle, boolean isRtk ) {
public double[] matchRoad( String id, double lon, double lat, double angle, boolean isRtk ) {
final long start = System.currentTimeMillis();
double[] matchRoad = MogoApisHandler.getInstance()
.getApis()
.getMapServiceApi()
.getMapUIController()
.matchRoad( lon, lat, angle, true, isRtk );
Log.i( "timer-matchRoad", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
.matchRoad( id, lon, lat, angle, true, isRtk );
Log.i("timer-matchRoad", "cost " + (System.currentTimeMillis() - start) + "ms");
return matchRoad;
}

View File

@@ -208,7 +208,8 @@ public class SimpleHandlerThreadPool {
}
}
double[] matchedPoint = SnapshotSetDataDrawer.getInstance().matchRoad( cloudRoadData.getWgslon(),
double[] matchedPoint = SnapshotSetDataDrawer.getInstance().matchRoad( cloudRoadData.getUniqueKey(),
cloudRoadData.getWgslon(),
cloudRoadData.getWgslat(),
cloudRoadData.getHeading(),
true

View File

@@ -560,9 +560,9 @@ public class MockIntentHandler implements IntentHandler {
break;
case 47:
mLocationMockHandler.sendEmptyMessageDelayed( 1, 200L );
// mLocationMockHandler.sendEmptyMessageDelayed( 2, 0 );
mLocationMockHandler.sendEmptyMessageDelayed( 2, 0 );
// mLocationMockHandler.sendEmptyMessageDelayed( 21, 200 );
mLocationMockHandler.sendEmptyMessageDelayed( 3, 0L );
// mLocationMockHandler.sendEmptyMessageDelayed( 3, 0L );
// mLocationMockHandler.sendEmptyMessageDelayed( 5, 0L );
break;
case 48:
@@ -763,7 +763,7 @@ public class MockIntentHandler implements IntentHandler {
private boolean handleMockSnapshotIntent() throws Exception {
if ( br2 == null ) {
br2 = new BufferedReader( new InputStreamReader( AbsMogoApplication.getApp().getAssets().open( "snapshot2.txt" ) ) );
br2 = new BufferedReader( new InputStreamReader( AbsMogoApplication.getApp().getAssets().open( "snapshot.txt" ) ) );
}
String line = br2.readLine();
if ( line == null ) {
@@ -791,7 +791,7 @@ public class MockIntentHandler implements IntentHandler {
delay = cloudRoadData.getSystemTime() - last;
}
last = cloudRoadData.getSystemTime();
mLocationMockHandler.sendEmptyMessageDelayed( 2, delay );
mLocationMockHandler.sendEmptyMessageDelayed( 2, 100L );
return true;
}