Added angleFactor variable
This commit is contained in:
parent
7201b9c993
commit
28ab2b2bb8
@ -13,11 +13,11 @@ builder.Services.AddSwaggerGen();
|
|||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
app.MapGet("/getRoute", (float latStart, float lonStart, float latEnd, float lonEnd, Tag.SpeedType vehicle, double stayOnSameRoadPriority, double useHigherLevelRoadsPriority, double useRoadsWithLessJunctionsPriority) =>
|
app.MapGet("/getRoute", (float latStart, float lonStart, float latEnd, float lonEnd, Tag.SpeedType vehicle, double stayOnSameRoadPriority, double useHigherLevelRoadsPriority, double useRoadsWithLessJunctionsPriority, double angleFactor) =>
|
||||||
{
|
{
|
||||||
Pathfinder result = new Pathfinder("D:/stuttgart-regbez-latest").AStar(new Coordinates(latStart, lonStart),
|
Pathfinder result = new Pathfinder("D:/stuttgart-regbez-latest").AStar(new Coordinates(latStart, lonStart),
|
||||||
new Coordinates(latEnd, lonEnd), vehicle, useHigherLevelRoadsPriority, stayOnSameRoadPriority,
|
new Coordinates(latEnd, lonEnd), vehicle, useHigherLevelRoadsPriority, stayOnSameRoadPriority,
|
||||||
useRoadsWithLessJunctionsPriority);
|
useRoadsWithLessJunctionsPriority, angleFactor);
|
||||||
return result.pathResult;
|
return result.pathResult;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -26,7 +26,7 @@ app.MapGet("/getShortestRoute", (float latStart, float lonStart, float latEnd, f
|
|||||||
{
|
{
|
||||||
Pathfinder result = new Pathfinder("D:/stuttgart-regbez-latest").AStar(new Coordinates(latStart, lonStart),
|
Pathfinder result = new Pathfinder("D:/stuttgart-regbez-latest").AStar(new Coordinates(latStart, lonStart),
|
||||||
new Coordinates(latEnd, lonEnd), Tag.SpeedType.any, 0, 0,
|
new Coordinates(latEnd, lonEnd), Tag.SpeedType.any, 0, 0,
|
||||||
0);
|
0, 0);
|
||||||
return result.pathResult;
|
return result.pathResult;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user