GPS Geschwindigkeitsanzeige
This commit is contained in:
@@ -372,20 +372,7 @@ function buildFairwayRouteCandidate(
|
||||
const departureTimestamp = requestedDepartureTimestamp(request.departureTime);
|
||||
const durationMinutes = Math.round((distanceNm / speedKn) * 60);
|
||||
const eta = new Date(departureTimestamp + durationMinutes * 60 * 1000).toISOString();
|
||||
const warnings: RouteWarning[] = [
|
||||
...(searchTruncated
|
||||
? [
|
||||
{
|
||||
code: "ROUTE_SEARCH_LIMITED",
|
||||
severity: "caution" as const,
|
||||
message:
|
||||
"Die Snap-Suche wurde wegen eines dichten Fahrwassernetzes begrenzt. " +
|
||||
"Die Route ist befahrbar verbunden, aber möglicherweise nicht die kürzeste Option."
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...routeSnapWarnings(routeSnaps)
|
||||
];
|
||||
const warnings: RouteWarning[] = routeSnapWarnings(routeSnaps);
|
||||
|
||||
const route: RouteResult = {
|
||||
geometry: {
|
||||
|
||||
@@ -499,7 +499,7 @@ describe("route building", () => {
|
||||
expect(route?.dataSources).not.toContain("long-detour");
|
||||
});
|
||||
|
||||
it("reports bounded snap-search truncation instead of silently claiming no route", () => {
|
||||
it("still routes when a bounded snap search found a connected path", () => {
|
||||
const start = { lat: 52.00035, lon: 7.0005 };
|
||||
const mainStart = { lat: 52, lon: 7.0005 };
|
||||
const destination = { lat: 52, lon: 7.04 };
|
||||
@@ -552,7 +552,7 @@ describe("route building", () => {
|
||||
expect(boundedRoute).not.toBeNull();
|
||||
expect(
|
||||
boundedRoute?.warnings.some((warning) => warning.code === "ROUTE_SEARCH_LIMITED")
|
||||
).toBe(true);
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("does not fall back to a misleading straight line when no fairway graph matches", () => {
|
||||
|
||||
Reference in New Issue
Block a user