mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
Update InterchangeSystemBuilderArguments with new properties for controlling event emitter degree delta
This commit is contained in:
@@ -46,7 +46,21 @@ export interface InterchangeSystemBuilderArguments {
|
|||||||
* Controls whether to self-calculate ETAs or use the external
|
* Controls whether to self-calculate ETAs or use the external
|
||||||
* shuttle provider for them.
|
* 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 {
|
export class InterchangeSystem {
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ const supportedSystems: InterchangeSystemBuilderArguments[] = [
|
|||||||
parkingSystemId: ChapmanApiBasedParkingRepositoryLoader.id,
|
parkingSystemId: ChapmanApiBasedParkingRepositoryLoader.id,
|
||||||
name: "Chapman University",
|
name: "Chapman University",
|
||||||
useSelfUpdatingEtas: true,
|
useSelfUpdatingEtas: true,
|
||||||
|
shuttleStopArrivalDegreeDelta: 0.001,
|
||||||
|
shutleStopNearbyDegreeDelta: 0.003,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ const systemInfoForTesting: InterchangeSystemBuilderArguments = {
|
|||||||
passioSystemId: "263",
|
passioSystemId: "263",
|
||||||
parkingSystemId: ChapmanApiBasedParkingRepositoryLoader.id,
|
parkingSystemId: ChapmanApiBasedParkingRepositoryLoader.id,
|
||||||
useSelfUpdatingEtas: false,
|
useSelfUpdatingEtas: false,
|
||||||
|
shuttleStopArrivalDegreeDelta: 0.001,
|
||||||
|
shutleStopNearbyDegreeDelta: 0.003,
|
||||||
};
|
};
|
||||||
|
|
||||||
export function buildSystemForTesting() {
|
export function buildSystemForTesting() {
|
||||||
|
|||||||
Reference in New Issue
Block a user