Added angleFactor variable

This commit is contained in:
glax 2023-04-21 00:43:38 +02:00
parent 7201b9c993
commit 28ab2b2bb8

View File

@ -13,11 +13,11 @@ builder.Services.AddSwaggerGen();
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),
new Coordinates(latEnd, lonEnd), vehicle, useHigherLevelRoadsPriority, stayOnSameRoadPriority,
useRoadsWithLessJunctionsPriority);
useRoadsWithLessJunctionsPriority, angleFactor);
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),
new Coordinates(latEnd, lonEnd), Tag.SpeedType.any, 0, 0,
0);
0, 0);
return result.pathResult;
}
);