traveltimet
This commit is contained in:
parent
046ef12ff9
commit
2f68d40f57
2 changed files with 6 additions and 2 deletions
|
@ -210,7 +210,7 @@ public class Path {
|
|||
*
|
||||
* @return Total length of the path (in meters).
|
||||
*
|
||||
* @deprecated Need to be implemented.
|
||||
*
|
||||
*/
|
||||
public float getLength() {
|
||||
// TODO:
|
||||
|
@ -228,7 +228,11 @@ public class Path {
|
|||
* @deprecated Need to be implemented.
|
||||
*/
|
||||
public double getTravelTime(double speed) {
|
||||
return speed/(getLength()*3.6);
|
||||
double TotalTime = 0;
|
||||
for (Arc a : arcs){
|
||||
TotalTime += a.getTravelTime(speed);
|
||||
}
|
||||
return TotalTime;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue