prepared CLI for raw testing
This commit is contained in:
parent
2f1422352e
commit
bf07e2e6d2
1 changed files with 15 additions and 1 deletions
|
@ -105,9 +105,23 @@ public class BRouter {
|
||||||
if (engineMode == RoutingEngine.BROUTER_ENGINEMODE_GETELEV) {
|
if (engineMode == RoutingEngine.BROUTER_ENGINEMODE_GETELEV) {
|
||||||
re = new RoutingEngine("testinfo", null, new File(args[0]), wplist, rc, engineMode);
|
re = new RoutingEngine("testinfo", null, new File(args[0]), wplist, rc, engineMode);
|
||||||
} else {
|
} else {
|
||||||
|
rc.rawTrackPath = "testtrack.raw";
|
||||||
re = new RoutingEngine("testtrack", null, new File(args[0]), wplist, rc, engineMode);
|
re = new RoutingEngine("testtrack", null, new File(args[0]), wplist, rc, engineMode);
|
||||||
}
|
}
|
||||||
re.doRun(0);
|
re.doRun(0);
|
||||||
|
|
||||||
|
if (engineMode == RoutingEngine.BROUTER_ENGINEMODE_ROUTING) {
|
||||||
|
// store new reference track if any
|
||||||
|
// (can exist for timed-out search)
|
||||||
|
if (re.getFoundRawTrack() != null) {
|
||||||
|
try {
|
||||||
|
re.getFoundRawTrack().writeBinary(rc.rawTrackPath);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue