Update InterchangeSystemBuilderArguments with new properties for controlling event emitter degree delta

This commit is contained in:
2025-11-20 16:26:25 -08:00
parent fb01406a29
commit 1d98e8450e
3 changed files with 19 additions and 1 deletions

View File

@@ -46,7 +46,21 @@ export interface InterchangeSystemBuilderArguments {
* Controls whether to self-calculate ETAs or use the external
* shuttle provider for them.
*/
useSelfUpdatingEtas: boolean
useSelfUpdatingEtas: boolean;
/**
* The size of the threshold to detect when a shuttle has arrived
* at a stop, in latitude/longitude degrees.
*/
shuttleStopArrivalDegreeDelta: number;
/**
* The size of the threshold to detect when a shuttle is "near"
* a stop, in latitude/longitude degrees. To determine this value,
* find the distance at which the shuttle would normally take
* ~1 minute to reach the next stop.
*/
shutleStopNearbyDegreeDelta: number;
}
export class InterchangeSystem {

View File

@@ -24,6 +24,8 @@ const supportedSystems: InterchangeSystemBuilderArguments[] = [
parkingSystemId: ChapmanApiBasedParkingRepositoryLoader.id,
name: "Chapman University",
useSelfUpdatingEtas: true,
shuttleStopArrivalDegreeDelta: 0.001,
shutleStopNearbyDegreeDelta: 0.003,
}
]

View File

@@ -25,6 +25,8 @@ const systemInfoForTesting: InterchangeSystemBuilderArguments = {
passioSystemId: "263",
parkingSystemId: ChapmanApiBasedParkingRepositoryLoader.id,
useSelfUpdatingEtas: false,
shuttleStopArrivalDegreeDelta: 0.001,
shutleStopNearbyDegreeDelta: 0.003,
};
export function buildSystemForTesting() {