Pass estimated cost factor to kinematic calc

(only to use different formula > 4.9)
This commit is contained in:
Norbert Renner 2022-04-26 12:41:41 +02:00
parent 6a19b53dc0
commit 7f481b8db3
2 changed files with 13 additions and 7 deletions

View file

@ -2,11 +2,15 @@
// Calculates time and energy stats
class BExpressionContextWay {
constructor(maxspeed = 45.0, costfactor = 1.0) {
this.maxspeed = maxspeed;
this.costfactor = costfactor;
}
getMaxspeed() {
return 45.0;
return this.maxspeed;
}
getCostfactor() {
return 1.0;
return this.costfactor;
}
}
@ -156,4 +160,5 @@
BR.StdPath = StdPath;
BR.RoutingContext = RoutingContext;
BR.BExpressionContextWay = BExpressionContextWay;
})();