merge master->suspectscanner
This commit is contained in:
commit
448b1db2a2
4 changed files with 29 additions and 4 deletions
|
@ -248,7 +248,7 @@ abstract class OsmPath implements OsmLinkHolder
|
||||||
boolean isStartpoint = lon0 == -1 && lat0 == -1;
|
boolean isStartpoint = lon0 == -1 && lat0 == -1;
|
||||||
|
|
||||||
// check turn restrictions (n detail mode (=final pass) no TR to not mess up voice hints)
|
// check turn restrictions (n detail mode (=final pass) no TR to not mess up voice hints)
|
||||||
if ( nsection == 0 && !isStartpoint )
|
if ( nsection == 0 && rc.considerTurnRestrictions && !detailMode&& !isStartpoint )
|
||||||
{
|
{
|
||||||
boolean hasAnyPositive = false;
|
boolean hasAnyPositive = false;
|
||||||
boolean hasPositive = false;
|
boolean hasPositive = false;
|
||||||
|
|
|
@ -421,14 +421,25 @@ public final class OsmTrack
|
||||||
|
|
||||||
if ( turnInstructionMode == 2 ) // locus style
|
if ( turnInstructionMode == 2 ) // locus style
|
||||||
{
|
{
|
||||||
|
float lastRteTime = 0.f;
|
||||||
|
|
||||||
for( VoiceHint hint: voiceHints.list )
|
for( VoiceHint hint: voiceHints.list )
|
||||||
{
|
{
|
||||||
sb.append( " <wpt lon=\"" ).append( formatILon( hint.ilon ) ).append( "\" lat=\"" )
|
sb.append( " <wpt lon=\"" ).append( formatILon( hint.ilon ) ).append( "\" lat=\"" )
|
||||||
.append( formatILat( hint.ilat ) ).append( "\">" )
|
.append( formatILat( hint.ilat ) ).append( "\">" )
|
||||||
.append( hint.selev == Short.MIN_VALUE ? "" : "<ele>" + (hint.selev / 4.) + "</ele>" )
|
.append( hint.selev == Short.MIN_VALUE ? "" : "<ele>" + (hint.selev / 4.) + "</ele>" )
|
||||||
.append( "<name>" ).append( hint.getMessageString() ).append( "</name>" )
|
.append( "<name>" ).append( hint.getMessageString() ).append( "</name>" )
|
||||||
.append( "<extensions><locus:rteDistance>" ).append( "" + hint.distanceToNext ).append( "</locus:rteDistance>" )
|
.append( "<extensions><locus:rteDistance>" ).append( "" + hint.distanceToNext ).append( "</locus:rteDistance>" );
|
||||||
.append( "<locus:rtePointAction>" ).append( "" + hint.getLocusAction() ).append( "</locus:rtePointAction></extensions>" )
|
float rteTime = hint.getTime();
|
||||||
|
if ( rteTime != lastRteTime ) // add timing only if available
|
||||||
|
{
|
||||||
|
double t = rteTime - lastRteTime;
|
||||||
|
double speed = hint.distanceToNext / t;
|
||||||
|
sb.append( "<locus:rteTime>" ).append( "" + t ).append( "</locus:rteTime>" )
|
||||||
|
.append( "<locus:rteSpeed>" ).append( "" + speed ).append( "</locus:rteSpeed>" );
|
||||||
|
lastRteTime = rteTime;
|
||||||
|
}
|
||||||
|
sb.append( "<locus:rtePointAction>" ).append( "" + hint.getLocusAction() ).append( "</locus:rtePointAction></extensions>" )
|
||||||
.append( "</wpt>\n" );
|
.append( "</wpt>\n" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,11 @@ public class VoiceHint
|
||||||
double distanceToNext;
|
double distanceToNext;
|
||||||
int indexInTrack;
|
int indexInTrack;
|
||||||
|
|
||||||
|
public float getTime()
|
||||||
|
{
|
||||||
|
return goodWay == null ? 0.f : goodWay.time;
|
||||||
|
}
|
||||||
|
|
||||||
float angle;
|
float angle;
|
||||||
boolean turnAngleConsumed;
|
boolean turnAngleConsumed;
|
||||||
boolean needsRealTurn;
|
boolean needsRealTurn;
|
||||||
|
|
|
@ -185,8 +185,17 @@ public class SuspectManager extends Thread
|
||||||
double dlon = ( ilon - 180000000 ) / 1000000.;
|
double dlon = ( ilon - 180000000 ) / 1000000.;
|
||||||
double dlat = ( ilat - 90000000 ) / 1000000.;
|
double dlat = ( ilat - 90000000 ) / 1000000.;
|
||||||
|
|
||||||
|
String profile = "car-eco";
|
||||||
|
File configFile = new File( "configs/" + country + ".cfg" );
|
||||||
|
if ( configFile.exists() )
|
||||||
|
{
|
||||||
|
BufferedReader br = new BufferedReader( new FileReader( configFile ) );
|
||||||
|
profile = br.readLine();
|
||||||
|
br.close();
|
||||||
|
}
|
||||||
|
|
||||||
String url1 = "http://brouter.de/brouter-web/#zoom=18&lat=" + dlat + "&lon=" + dlon
|
String url1 = "http://brouter.de/brouter-web/#zoom=18&lat=" + dlat + "&lon=" + dlon
|
||||||
+ "&layer=OpenStreetMap&lonlats=" + dlon + "," + dlat + "&profile=car-eco-de";
|
+ "&layer=OpenStreetMap&lonlats=" + dlon + "," + dlat + "&profile=" + profile;
|
||||||
|
|
||||||
// String url1 = "http://localhost:8080/brouter-web/#map=18/" + dlat + "/"
|
// String url1 = "http://localhost:8080/brouter-web/#map=18/" + dlat + "/"
|
||||||
// + dlon + "/Mapsforge Tile Server&lonlats=" + dlon + "," + dlat;
|
// + dlon + "/Mapsforge Tile Server&lonlats=" + dlon + "," + dlat;
|
||||||
|
|
Loading…
Reference in a new issue