Export routes to gpx
This commit is contained in:
@@ -489,7 +489,7 @@ float calculateRequiredSpeed(float endSpeed, float horizontalDistance, float hei
|
||||
return requiredSpeed;
|
||||
}
|
||||
|
||||
std::vector<JSNodeInfo> getPathJS(uint32_t startingNode, uint32_t endNode, float dragCoefficient) {
|
||||
std::vector<JSNodeInfo> getPathJS(uint32_t startingNode, uint32_t endNode, float minimumSpeed, float dragCoefficient) {
|
||||
std::vector<JSNodeInfo> path;
|
||||
|
||||
if (lastSearchResult.startingNode != startingNode) {
|
||||
@@ -529,8 +529,8 @@ std::vector<JSNodeInfo> getPathJS(uint32_t startingNode, uint32_t endNode, float
|
||||
float currentRequiredSpeed = -1.0;
|
||||
for (auto it = path.rbegin(); it != path.rend(); it++) {
|
||||
if (currentRequiredSpeed <= -1.0) {
|
||||
it->requiredSpeed = 1.0;
|
||||
currentRequiredSpeed = 1.0;
|
||||
it->requiredSpeed = minimumSpeed;
|
||||
currentRequiredSpeed = minimumSpeed;
|
||||
} else {
|
||||
uint32_t currentNodeId = it->nodeId;
|
||||
RoadNode currentNode = set.roadNodes[currentNodeId];
|
||||
|
||||
Reference in New Issue
Block a user