1.4.1 locus roundabout fix, 3 more operators
This commit is contained in:
parent
0d70493919
commit
8609c1f47b
17 changed files with 54 additions and 24 deletions
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>brouter-codec</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>brouter-core</artifactId>
|
||||
|
|
|
@ -281,6 +281,7 @@ public final class OsmTrack
|
|||
public int ascend;
|
||||
public int plainAscend;
|
||||
public int cost;
|
||||
public long arrivaltime;
|
||||
|
||||
/**
|
||||
* writes the track in gpx-format to a file
|
||||
|
@ -338,7 +339,7 @@ public final class OsmTrack
|
|||
}
|
||||
else
|
||||
{
|
||||
sb.append( " creator=\"BRouter-1.4\" version=\"1.1\">\n" );
|
||||
sb.append( " creator=\"BRouter-1.4.1\" version=\"1.1\">\n" );
|
||||
}
|
||||
|
||||
if ( turnInstructionMode == 3) // osmand style
|
||||
|
@ -393,6 +394,7 @@ public final class OsmTrack
|
|||
{
|
||||
sb.append( " <extensions><locus:rteComputeType>" ).append( voiceHints.getLocusRouteType() ).append( "</locus:rteComputeType></extensions>\n" );
|
||||
}
|
||||
sb.append( " <extensions><locus:rteSimpleRoundabouts>1</locus:rteSimpleRoundabouts></extensions>\n" );
|
||||
}
|
||||
|
||||
sb.append( " <trkseg>\n" );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>brouter-expressions</artifactId>
|
||||
|
|
|
@ -15,6 +15,10 @@ final class BExpression
|
|||
private static final int GREATER_EXP = 24;
|
||||
private static final int MIN_EXP = 25;
|
||||
|
||||
private static final int SUB_EXP = 26;
|
||||
private static final int LESSER_EXP = 27;
|
||||
private static final int XOR_EXP = 28;
|
||||
|
||||
private static final int SWITCH_EXP = 30;
|
||||
private static final int ASSIGN_EXP = 31;
|
||||
private static final int LOOKUP_EXP = 32;
|
||||
|
@ -115,6 +119,18 @@ final class BExpression
|
|||
{
|
||||
exp.typ = GREATER_EXP;
|
||||
}
|
||||
else if ( "sub".equals( operator ) )
|
||||
{
|
||||
exp.typ = SUB_EXP;
|
||||
}
|
||||
else if ( "lesser".equals( operator ) )
|
||||
{
|
||||
exp.typ = LESSER_EXP;
|
||||
}
|
||||
else if ( "xor".equals( operator ) )
|
||||
{
|
||||
exp.typ = XOR_EXP;
|
||||
}
|
||||
else
|
||||
{
|
||||
nops = 1; // check unary expressions
|
||||
|
@ -231,13 +247,16 @@ final class BExpression
|
|||
switch( typ )
|
||||
{
|
||||
case OR_EXP: return op1.evaluate(ctx) != 0.f ? 1.f : ( op2.evaluate(ctx) != 0.f ? 1.f : 0.f );
|
||||
case XOR_EXP: return ( (op1.evaluate(ctx) != 0.f) ^ ( op2.evaluate(ctx) != 0.f ) ? 1.f : 0.f );
|
||||
case AND_EXP: return op1.evaluate(ctx) != 0.f ? ( op2.evaluate(ctx) != 0.f ? 1.f : 0.f ) : 0.f;
|
||||
case ADD_EXP: return op1.evaluate(ctx) + op2.evaluate(ctx);
|
||||
case SUB_EXP: return op1.evaluate(ctx) - op2.evaluate(ctx);
|
||||
case MULTIPLY_EXP: return op1.evaluate(ctx) * op2.evaluate(ctx);
|
||||
case MAX_EXP: return max( op1.evaluate(ctx), op2.evaluate(ctx) );
|
||||
case MIN_EXP: return min( op1.evaluate(ctx), op2.evaluate(ctx) );
|
||||
case EQUAL_EXP: return op1.evaluate(ctx) == op2.evaluate(ctx) ? 1.f : 0.f;
|
||||
case GREATER_EXP: return op1.evaluate(ctx) > op2.evaluate(ctx) ? 1.f : 0.f;
|
||||
case LESSER_EXP: return op1.evaluate(ctx) < op2.evaluate(ctx) ? 1.f : 0.f;
|
||||
case SWITCH_EXP: return op1.evaluate(ctx) != 0.f ? op2.evaluate(ctx) : op3.evaluate(ctx);
|
||||
case ASSIGN_EXP: return ctx.assign( variableIdx, op1.evaluate(ctx) );
|
||||
case LOOKUP_EXP: return ctx.getLookupMatch( lookupNameIdx, lookupValueIdxArray );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>brouter-map-creator</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>brouter-mapaccess</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>brouter-mem-router</artifactId>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="11"
|
||||
android:versionName="1.4" package="btools.routingapp">
|
||||
android:versionCode="12"
|
||||
android:versionName="1.4.1" package="btools.routingapp">
|
||||
<application android:icon="@drawable/icon" android:label="@string/app_name">
|
||||
<activity android:name=".BRouterActivity"
|
||||
android:label="@string/app_name"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>brouter-routing-app</artifactId>
|
||||
|
|
|
@ -680,7 +680,7 @@ public class BRouterView extends View
|
|||
}
|
||||
else
|
||||
{
|
||||
String result = "version = BRouter-1.4\n" + "distance = " + cr.getDistance() / 1000. + " km\n" + "filtered ascend = " + cr.getAscend()
|
||||
String result = "version = BRouter-1.4.1\n" + "distance = " + cr.getDistance() / 1000. + " km\n" + "filtered ascend = " + cr.getAscend()
|
||||
+ " m\n" + "plain ascend = " + cr.getPlainAscend();
|
||||
|
||||
rawTrack = cr.getFoundRawTrack();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>brouter-server</artifactId>
|
||||
|
@ -49,6 +49,11 @@
|
|||
<dependency>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter-map-creator</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter-mem-router</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -88,7 +88,7 @@ public class BRouter
|
|||
}
|
||||
System.exit(0);
|
||||
}
|
||||
System.out.println("BRouter 1.4 / 06052016 / abrensch");
|
||||
System.out.println("BRouter 1.4.1 / 09052016 / abrensch");
|
||||
if ( args.length < 6 )
|
||||
{
|
||||
System.out.println("Find routes in an OSM map");
|
||||
|
|
|
@ -8,15 +8,15 @@ import java.io.OutputStreamWriter;
|
|||
import java.net.InetAddress;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.TreeMap;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import btools.router.OsmNodeNamed;
|
||||
import btools.router.OsmTrack;
|
||||
|
@ -155,7 +155,7 @@ public class RouteServer extends Thread
|
|||
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
System.out.println("BRouter 1.4 / 06052016");
|
||||
System.out.println("BRouter 1.4.1 / 09052016");
|
||||
if ( args.length != 5 )
|
||||
{
|
||||
System.out.println("serve BRouter protocol");
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>brouter-util</artifactId>
|
||||
|
|
|
@ -145,11 +145,15 @@ All expressions have one of the following basic forms:
|
|||
|
||||
or <boolean expression 1> <boolean expression 2>
|
||||
and <boolean expression 1> <boolean expression 2>
|
||||
xor <boolean expression 1> <boolean expression 2>
|
||||
multiply <numeric expression 1> <numeric expression 2>
|
||||
add <numeric expression 1> <numeric expression 2>
|
||||
sub <numeric expression 1> <numeric expression 2>
|
||||
max <numeric expression 1> <numeric expression 2>
|
||||
min <numeric expression 1> <numeric expression 2>
|
||||
equal <numeric expression 1> <numeric expression 2>
|
||||
greater <numeric expression 1> <numeric expression 2>
|
||||
lesser <numeric expression 1> <numeric expression 2>
|
||||
|
||||
- 3 Operand operators are:
|
||||
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.btools</groupId>
|
||||
<artifactId>brouter</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.4.1</version>
|
||||
<packaging>pom</packaging>
|
||||
<url>http://brouter.de/brouter/</url>
|
||||
<name>brouter</name>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<module>brouter-mapaccess</module>
|
||||
<module>brouter-core</module>
|
||||
<module>brouter-map-creator</module>
|
||||
<!-- <module>brouter-mem-router</module> -->
|
||||
<module>brouter-mem-router</module>
|
||||
<module>brouter-server</module>
|
||||
<module>brouter-routing-app</module>
|
||||
</modules>
|
||||
|
|
Loading…
Reference in a new issue