Compare commits
No commits in common. "7f06a6f8809b530bf6929b65f71e0102eac4a767" and "2c5ab070a2895449b7e0d0e94b58d3c733b8bcb4" have entirely different histories.
7f06a6f880
...
2c5ab070a2
@ -88,7 +88,7 @@ public class Tag
|
||||
}
|
||||
|
||||
public static readonly Dictionary<WayType, byte> defaultSpeedCar = new() {
|
||||
{ WayType.NONE, 1 },
|
||||
{ WayType.NONE, 0 },
|
||||
{ WayType.motorway, 110 },
|
||||
{ WayType.trunk, 100 },
|
||||
{ WayType.primary, 80 },
|
||||
@ -102,13 +102,13 @@ public class Tag
|
||||
{ WayType.secondary_link, 25 },
|
||||
{ WayType.tertiary_link, 25 },
|
||||
{ WayType.living_street, 10 },
|
||||
{ WayType.service, 1 },
|
||||
{ WayType.service, 0 },
|
||||
{ WayType.pedestrian, 0 },
|
||||
{ WayType.track, 15 },
|
||||
{ WayType.track, 0 },
|
||||
{ WayType.bus_guideway, 0 },
|
||||
{ WayType.escape, 0 },
|
||||
{ WayType.raceway, 0 },
|
||||
{ WayType.road, 20 },
|
||||
{ WayType.road, 25 },
|
||||
{ WayType.busway, 0 },
|
||||
{ WayType.footway, 0 },
|
||||
{ WayType.bridleway, 0 },
|
||||
@ -125,9 +125,9 @@ public class Tag
|
||||
{ WayType.trunk, 0 },
|
||||
{ WayType.primary, 0 },
|
||||
{ WayType.secondary, 0 },
|
||||
{ WayType.tertiary, 2 },
|
||||
{ WayType.tertiary, 0 },
|
||||
{ WayType.unclassified, 1 },
|
||||
{ WayType.residential, 4 },
|
||||
{ WayType.residential, 3 },
|
||||
{ WayType.motorway_link, 0 },
|
||||
{ WayType.trunk_link, 0 },
|
||||
{ WayType.primary_link, 0 },
|
||||
@ -136,9 +136,9 @@ public class Tag
|
||||
{ WayType.living_street, 5 },
|
||||
{ WayType.service, 2 },
|
||||
{ WayType.pedestrian, 5 },
|
||||
{ WayType.track, 1 },
|
||||
{ WayType.track, 0 },
|
||||
{ WayType.bus_guideway, 0 },
|
||||
{ WayType.escape, 1 },
|
||||
{ WayType.escape, 0 },
|
||||
{ WayType.raceway, 0 },
|
||||
{ WayType.road, 3 },
|
||||
{ WayType.busway, 0 },
|
||||
|
@ -45,7 +45,7 @@ public class Pathfinder
|
||||
neighbor.currentPathWeight = newPotentialWeight;
|
||||
neighbor.currentPathLength = closestNodeToGoal.currentPathLength + Utils.DistanceBetween(closestNodeToGoal, neighbor);
|
||||
|
||||
if (neighbor.Equals(goalNode) || closestNodeToGoal.directDistanceToGoal < 10) //change for faster
|
||||
if (neighbor.Equals(goalNode) || closestNodeToGoal.directDistanceToGoal < 250)
|
||||
stop = true;
|
||||
else
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ public class Server
|
||||
|
||||
|
||||
Coordinates start = new Coordinates(48.793319f, 9.832102f);
|
||||
Coordinates finish = new Coordinates(48.8407888f, 10.0676020f);
|
||||
Coordinates finish = new Coordinates(48.840728f, 10.067603f);
|
||||
DateTime startTime = DateTime.Now;
|
||||
OsmNode[] path = Pathfinder.CustomAStar("D:/stuttgart-regbez-latest", start, finish, Tag.SpeedType.car).ToArray();
|
||||
TimeSpan duration = DateTime.Now - startTime;
|
||||
|
Loading…
Reference in New Issue
Block a user