Refactor departure time calculation to account for walk duration
Introduce `trainWalkDurationSeconds` in `useDepartureTime` hooks for both mobile and web apps to filter train journeys based on total arrival time including walking. Add default origin station constants in core package and use them in mobile store instead of returning null when no origin is saved. Normalize HAFAS coordinates in destination station hooks to handle large integer values. Update `cleanLocation` to preserve full addresses with commas and remove the 10KB request body limit on ICS parsing to support larger calendar files. Make rate limiting configurable via environment variables to handle higher API fan-out from calendar event pages.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import type { Station } from "./types";
|
||||
|
||||
export const DEFAULT_ORIGIN_ADDRESS = "Goethegasse 36, 2340 Moedling";
|
||||
export const DEFAULT_ORIGIN_LAT = 48.0806926;
|
||||
export const DEFAULT_ORIGIN_LNG = 16.2908052;
|
||||
export const DEFAULT_ORIGIN_STATION_NAME = "Mödling Bahnhof";
|
||||
export const DEFAULT_ORIGIN_STATION_EXT_ID = "1231701";
|
||||
|
||||
export const DEFAULT_ORIGIN_STATION: Station = {
|
||||
name: DEFAULT_ORIGIN_ADDRESS,
|
||||
extId: DEFAULT_ORIGIN_STATION_EXT_ID,
|
||||
lat: DEFAULT_ORIGIN_LAT,
|
||||
lng: DEFAULT_ORIGIN_LNG,
|
||||
};
|
||||
@@ -5,3 +5,4 @@ export * from './formatting';
|
||||
export * from './status-utils';
|
||||
export * from './hafas-time';
|
||||
export * from './hafas-parser';
|
||||
export * from './defaults';
|
||||
|
||||
Reference in New Issue
Block a user