corequery-gtfs 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/gtfs-config.d.ts +2 -0
- package/dist/data/gtfs-schedule-data.d.ts +16 -10
- package/dist/data/gtfs-schedule-data.js +27 -23
- package/dist/data/gtfs-schedule-data.js.map +1 -1
- package/dist/data/trip/added/gtfs-added-trip-originating-movement.d.ts +4 -2
- package/dist/data/trip/added/gtfs-added-trip-originating-movement.js +7 -5
- package/dist/data/trip/added/gtfs-added-trip-originating-movement.js.map +1 -1
- package/dist/data/trip/added/gtfs-added-trip-regular-movement.d.ts +8 -4
- package/dist/data/trip/added/gtfs-added-trip-regular-movement.js +13 -9
- package/dist/data/trip/added/gtfs-added-trip-regular-movement.js.map +1 -1
- package/dist/data/trip/added/gtfs-added-trip-terminating-movement.d.ts +4 -2
- package/dist/data/trip/added/gtfs-added-trip-terminating-movement.js +7 -5
- package/dist/data/trip/added/gtfs-added-trip-terminating-movement.js.map +1 -1
- package/dist/data/trip/replaced/gtfs-replaced-trip-originating-movement.d.ts +12 -4
- package/dist/data/trip/replaced/gtfs-replaced-trip-originating-movement.js +46 -10
- package/dist/data/trip/replaced/gtfs-replaced-trip-originating-movement.js.map +1 -1
- package/dist/data/trip/replaced/gtfs-replaced-trip-regular-movement.d.ts +20 -6
- package/dist/data/trip/replaced/gtfs-replaced-trip-regular-movement.js +85 -15
- package/dist/data/trip/replaced/gtfs-replaced-trip-regular-movement.js.map +1 -1
- package/dist/data/trip/replaced/gtfs-replaced-trip-terminating-movement.d.ts +12 -4
- package/dist/data/trip/replaced/gtfs-replaced-trip-terminating-movement.js +46 -10
- package/dist/data/trip/replaced/gtfs-replaced-trip-terminating-movement.js.map +1 -1
- package/dist/data/trip/replaced/types.d.ts +2 -1
- package/dist/data/trip/updated/gtfs-updated-trip-originating-movement.js +5 -2
- package/dist/data/trip/updated/gtfs-updated-trip-originating-movement.js.map +1 -1
- package/dist/data/trip/updated/gtfs-updated-trip-regular-movement.js +18 -7
- package/dist/data/trip/updated/gtfs-updated-trip-regular-movement.js.map +1 -1
- package/dist/data/trip/updated/gtfs-updated-trip-terminating-movement.js +5 -2
- package/dist/data/trip/updated/gtfs-updated-trip-terminating-movement.js.map +1 -1
- package/dist/gtfs-system.d.ts +2 -7
- package/dist/gtfs-system.js +8 -17
- package/dist/gtfs-system.js.map +1 -1
- package/dist/parser/gtfs-feed-parser.d.ts +2 -0
- package/dist/parser/gtfs-feed-parser.js +1 -0
- package/dist/parser/gtfs-feed-parser.js.map +1 -1
- package/dist/parser/realtime/gtfs-added-trip-update-parser.d.ts +1 -0
- package/dist/parser/realtime/gtfs-added-trip-update-parser.js +28 -20
- package/dist/parser/realtime/gtfs-added-trip-update-parser.js.map +1 -1
- package/dist/parser/realtime/gtfs-realtime-data-parser.d.ts +2 -0
- package/dist/parser/realtime/gtfs-realtime-data-parser.js +1 -0
- package/dist/parser/realtime/gtfs-realtime-data-parser.js.map +1 -1
- package/dist/parser/realtime/gtfs-trip-movements-interpolator.d.ts +6 -0
- package/dist/parser/realtime/gtfs-trip-movements-interpolator.js +5 -41
- package/dist/parser/realtime/gtfs-trip-movements-interpolator.js.map +1 -1
- package/dist/parser/realtime/gtfs-trip-update-parser.d.ts +2 -0
- package/dist/parser/realtime/gtfs-trip-update-parser.js +1 -0
- package/dist/parser/realtime/gtfs-trip-update-parser.js.map +1 -1
- package/dist/parser/realtime/gtfs-updated-trip-update-parser.d.ts +2 -0
- package/dist/parser/realtime/gtfs-updated-trip-update-parser.js +3 -3
- package/dist/parser/realtime/gtfs-updated-trip-update-parser.js.map +1 -1
- package/dist/parser/schedule/gtfs-schedule-data-parser.js +6 -1
- package/dist/parser/schedule/gtfs-schedule-data-parser.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { LineGtfsIdsConfig, StopGtfsIdsConfig } from "./ids.js";
|
|
2
2
|
import type { BonusLinesMappingConfig, LineRoutesMappingConfig } from "./routes.js";
|
|
3
3
|
import type { TimezoneConfig } from "./timezone-config.js";
|
|
4
|
+
export type GtfsInterpolationMode = "follow-spec" | "lerp";
|
|
4
5
|
export type GtfsConfig = {
|
|
5
6
|
readonly lineGtfsIds: LineGtfsIdsConfig;
|
|
6
7
|
readonly stopGtfsIds: StopGtfsIdsConfig;
|
|
7
8
|
readonly lineRoutesMapping: LineRoutesMappingConfig;
|
|
8
9
|
readonly bonusLinesMapping?: BonusLinesMappingConfig;
|
|
9
10
|
readonly timezoneConfig: TimezoneConfig;
|
|
11
|
+
readonly interpolationMode?: GtfsInterpolationMode;
|
|
10
12
|
};
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import type { GtfsCalendar } from "./gtfs-calendar.js";
|
|
2
2
|
import type { GtfsScheduledTrip } from "./trip/scheduled/gtfs-scheduled-trip.js";
|
|
3
3
|
import type { GtfsTransfer } from "./gtfs-transfer.js";
|
|
4
|
+
export type GtfsScheduleDataFields = {
|
|
5
|
+
readonly trips: readonly GtfsScheduledTrip[];
|
|
6
|
+
readonly calendars: readonly GtfsCalendar[];
|
|
7
|
+
readonly transfers: readonly GtfsTransfer[];
|
|
8
|
+
readonly ignoredTripIds: readonly string[];
|
|
9
|
+
};
|
|
4
10
|
export declare class GtfsScheduleData {
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
readonly trips: readonly GtfsScheduledTrip[];
|
|
12
|
+
readonly calendars: readonly GtfsCalendar[];
|
|
13
|
+
readonly transfers: readonly GtfsTransfer[];
|
|
14
|
+
/**
|
|
15
|
+
* Trip IDs intentionally ignored during parsing (e.g. replacement buses), so
|
|
16
|
+
* realtime updates for them aren't classified as trips we failed to match.
|
|
17
|
+
*/
|
|
18
|
+
readonly ignoredTripIds: readonly string[];
|
|
7
19
|
private readonly _tripsById;
|
|
8
20
|
private readonly _calendarsById;
|
|
9
21
|
private readonly _transfersMapping;
|
|
10
|
-
/**
|
|
11
|
-
* Trip IDs we saw during parsing, but intentionally ignored (e.g. because
|
|
12
|
-
* they were replacement buses). We store them so that if we see them in a
|
|
13
|
-
* realtime trip update, we don't classify it as a trip we failed to match.
|
|
14
|
-
) */
|
|
15
22
|
private readonly _ignoredTripIds;
|
|
16
23
|
static readonly empty: GtfsScheduleData;
|
|
17
|
-
constructor(
|
|
24
|
+
constructor(fields: GtfsScheduleDataFields);
|
|
25
|
+
with(newValues: Partial<GtfsScheduleDataFields>): GtfsScheduleData;
|
|
18
26
|
allTrips(): readonly GtfsScheduledTrip[];
|
|
19
27
|
getTrip(gtfsTripId: string): GtfsScheduledTrip | null;
|
|
20
28
|
getCalendar(gtfsCalendarId: string): GtfsCalendar | null;
|
|
21
29
|
getTransfersForTrip(gtfsTripId: string): readonly GtfsTransfer[];
|
|
22
30
|
isTripIgnored(gtfsTripId: string): boolean;
|
|
23
31
|
requireCalendar(gtfsCalendarId: string): GtfsCalendar;
|
|
24
|
-
withIgnoredTripIds(newIgnoredTripIds: readonly string[]): GtfsScheduleData;
|
|
25
|
-
withTransfers(newTransfers: readonly GtfsTransfer[]): GtfsScheduleData;
|
|
26
32
|
static fromTrips(trips: readonly GtfsScheduledTrip[]): GtfsScheduleData;
|
|
27
33
|
}
|
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
import { GtfsTransferMapping } from "./gtfs-transfer-mapping.js";
|
|
2
2
|
export class GtfsScheduleData {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
trips;
|
|
4
|
+
calendars;
|
|
5
|
+
transfers;
|
|
6
|
+
/**
|
|
7
|
+
* Trip IDs intentionally ignored during parsing (e.g. replacement buses), so
|
|
8
|
+
* realtime updates for them aren't classified as trips we failed to match.
|
|
9
|
+
*/
|
|
10
|
+
ignoredTripIds;
|
|
5
11
|
_tripsById;
|
|
6
12
|
_calendarsById;
|
|
7
13
|
_transfersMapping;
|
|
8
|
-
/**
|
|
9
|
-
* Trip IDs we saw during parsing, but intentionally ignored (e.g. because
|
|
10
|
-
* they were replacement buses). We store them so that if we see them in a
|
|
11
|
-
* realtime trip update, we don't classify it as a trip we failed to match.
|
|
12
|
-
) */
|
|
13
14
|
_ignoredTripIds;
|
|
14
15
|
static empty = GtfsScheduleData.fromTrips([]);
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
constructor(fields) {
|
|
17
|
+
this.trips = fields.trips;
|
|
18
|
+
this.calendars = fields.calendars;
|
|
19
|
+
this.transfers = fields.transfers;
|
|
20
|
+
this.ignoredTripIds = fields.ignoredTripIds;
|
|
17
21
|
// Arguably we should be taking the map as the constructor argument because
|
|
18
22
|
// the GtfsTransferConnector operates on a map, that it converts back to an
|
|
19
23
|
// array, only to have it immediately passed on to this constructor where
|
|
20
24
|
// we convert it back again :)
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
this._tripsById = new Map(this.trips.map((trip) => [trip.gtfsTripId, trip]));
|
|
26
|
+
this._calendarsById = new Map(this.calendars.map((calendar) => [calendar.gtfsCalendarId, calendar]));
|
|
27
|
+
this._transfersMapping = GtfsTransferMapping.build(this.transfers, (x) => x.getInvolvedTripIds());
|
|
28
|
+
this._ignoredTripIds = new Set(this.ignoredTripIds);
|
|
29
|
+
}
|
|
30
|
+
with(newValues) {
|
|
31
|
+
return new GtfsScheduleData({ ...this, ...newValues });
|
|
27
32
|
}
|
|
28
33
|
allTrips() {
|
|
29
|
-
return this.
|
|
34
|
+
return this.trips;
|
|
30
35
|
}
|
|
31
36
|
getTrip(gtfsTripId) {
|
|
32
37
|
return this._tripsById.get(gtfsTripId) ?? null;
|
|
@@ -47,12 +52,6 @@ export class GtfsScheduleData {
|
|
|
47
52
|
}
|
|
48
53
|
return calendar;
|
|
49
54
|
}
|
|
50
|
-
withIgnoredTripIds(newIgnoredTripIds) {
|
|
51
|
-
return new GtfsScheduleData(this._trips, Array.from(this._calendarsById.values()), this._transfers, newIgnoredTripIds);
|
|
52
|
-
}
|
|
53
|
-
withTransfers(newTransfers) {
|
|
54
|
-
return new GtfsScheduleData(this._trips, Array.from(this._calendarsById.values()), newTransfers, Array.from(this._ignoredTripIds));
|
|
55
|
-
}
|
|
56
55
|
static fromTrips(trips) {
|
|
57
56
|
const calendars = new Map();
|
|
58
57
|
for (const trip of trips) {
|
|
@@ -60,7 +59,12 @@ export class GtfsScheduleData {
|
|
|
60
59
|
calendars.set(trip.calendar.gtfsCalendarId, trip.calendar);
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
|
-
return new GtfsScheduleData(
|
|
62
|
+
return new GtfsScheduleData({
|
|
63
|
+
trips,
|
|
64
|
+
calendars: [...calendars.values()],
|
|
65
|
+
transfers: [],
|
|
66
|
+
ignoredTripIds: [],
|
|
67
|
+
});
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
//# sourceMappingURL=gtfs-schedule-data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtfs-schedule-data.js","sourceRoot":"","sources":["../../src/data/gtfs-schedule-data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"gtfs-schedule-data.js","sourceRoot":"","sources":["../../src/data/gtfs-schedule-data.ts"],"names":[],"mappings":"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"}
|
|
@@ -4,14 +4,16 @@ import type { IGtfsAddedTripServicingMovement } from "./types.js";
|
|
|
4
4
|
export type GtfsAddedTripOriginatingMovementFields = {
|
|
5
5
|
readonly stopId: number;
|
|
6
6
|
readonly positionId: number | null;
|
|
7
|
-
readonly
|
|
7
|
+
readonly scheduledDepartureTime: Temporal.Instant | null;
|
|
8
|
+
readonly knownRealtimeDepartureTime: Temporal.Instant;
|
|
8
9
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
9
10
|
readonly gtfsStopSequence: number;
|
|
10
11
|
};
|
|
11
12
|
export declare class GtfsAddedTripOriginatingMovement implements IGtfsAddedTripServicingMovement {
|
|
12
13
|
readonly stopId: number;
|
|
13
14
|
readonly positionId: number | null;
|
|
14
|
-
readonly
|
|
15
|
+
readonly scheduledDepartureTime: Temporal.Instant | null;
|
|
16
|
+
readonly knownRealtimeDepartureTime: Temporal.Instant;
|
|
15
17
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
16
18
|
readonly gtfsStopSequence: number;
|
|
17
19
|
constructor(fields: GtfsAddedTripOriginatingMovementFields);
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export class GtfsAddedTripOriginatingMovement {
|
|
2
2
|
stopId;
|
|
3
3
|
positionId;
|
|
4
|
-
|
|
4
|
+
scheduledDepartureTime;
|
|
5
|
+
knownRealtimeDepartureTime;
|
|
5
6
|
gtfsIdMetadata;
|
|
6
7
|
gtfsStopSequence;
|
|
7
8
|
constructor(fields) {
|
|
8
9
|
this.stopId = fields.stopId;
|
|
9
10
|
this.positionId = fields.positionId;
|
|
10
|
-
this.
|
|
11
|
+
this.scheduledDepartureTime = fields.scheduledDepartureTime;
|
|
12
|
+
this.knownRealtimeDepartureTime = fields.knownRealtimeDepartureTime;
|
|
11
13
|
this.gtfsIdMetadata = fields.gtfsIdMetadata;
|
|
12
14
|
this.gtfsStopSequence = fields.gtfsStopSequence;
|
|
13
15
|
}
|
|
@@ -24,7 +26,7 @@ export class GtfsAddedTripOriginatingMovement {
|
|
|
24
26
|
return false;
|
|
25
27
|
}
|
|
26
28
|
get timeRelevantToDeparturesAlgorithm() {
|
|
27
|
-
return this.
|
|
29
|
+
return this.knownRealtimeDepartureTime;
|
|
28
30
|
}
|
|
29
31
|
asCorequeryFields() {
|
|
30
32
|
return {
|
|
@@ -32,8 +34,8 @@ export class GtfsAddedTripOriginatingMovement {
|
|
|
32
34
|
originalPositionId: this.positionId,
|
|
33
35
|
currentPositionId: this.positionId,
|
|
34
36
|
departureTimeType: "provided-live-time",
|
|
35
|
-
departureTime: this.
|
|
36
|
-
formerDepartureTime:
|
|
37
|
+
departureTime: this.knownRealtimeDepartureTime,
|
|
38
|
+
formerDepartureTime: this.scheduledDepartureTime,
|
|
37
39
|
};
|
|
38
40
|
}
|
|
39
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtfs-added-trip-originating-movement.js","sourceRoot":"","sources":["../../../../src/data/trip/added/gtfs-added-trip-originating-movement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gtfs-added-trip-originating-movement.js","sourceRoot":"","sources":["../../../../src/data/trip/added/gtfs-added-trip-originating-movement.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,gCAAgC;IAClC,MAAM,CAAS;IACf,UAAU,CAAgB;IAE1B,sBAAsB,CAA0B;IAChD,0BAA0B,CAAmB;IAE7C,cAAc,CAAqB;IACnC,gBAAgB,CAAS;IAElC,YAAY,MAA8C;QACxD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAEpC,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAC5D,IAAI,CAAC,0BAA0B,GAAG,MAAM,CAAC,0BAA0B,CAAC;QAEpE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAClD,CAAC;IAED,IAAI,CACF,SAA0D;QAE1D,OAAO,IAAI,gCAAgC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,IAAI;QACN,OAAO,aAAsB,CAAC;IAChC,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAa,CAAC;IACvB,CAAC;IAED,IAAI,aAAa;QACf,OAAO,KAAc,CAAC;IACxB,CAAC;IAED,IAAI,iCAAiC;QACnC,OAAO,IAAI,CAAC,0BAA0B,CAAC;IACzC,CAAC;IAED,iBAAiB;QACf,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,kBAAkB,EAAE,IAAI,CAAC,UAAU;YACnC,iBAAiB,EAAE,IAAI,CAAC,UAAU;YAElC,iBAAiB,EAAE,oBAAoB;YACvC,aAAa,EAAE,IAAI,CAAC,0BAA0B;YAC9C,mBAAmB,EAAE,IAAI,CAAC,sBAAsB;SACjD,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -4,8 +4,10 @@ import type { IGtfsAddedTripServicingMovement } from "./types.js";
|
|
|
4
4
|
export type GtfsAddedTripRegularMovementFields = {
|
|
5
5
|
readonly stopId: number;
|
|
6
6
|
readonly positionId: number | null;
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
7
|
+
readonly scheduledArrivalTime: Temporal.Instant | null;
|
|
8
|
+
readonly knownRealtimeArrivalTime: Temporal.Instant;
|
|
9
|
+
readonly scheduledDepartureTime: Temporal.Instant | null;
|
|
10
|
+
readonly knownRealtimeDepartureTime: Temporal.Instant;
|
|
9
11
|
readonly picksUp: boolean;
|
|
10
12
|
readonly dropsOff: boolean;
|
|
11
13
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
@@ -14,8 +16,10 @@ export type GtfsAddedTripRegularMovementFields = {
|
|
|
14
16
|
export declare class GtfsAddedTripRegularMovement implements IGtfsAddedTripServicingMovement {
|
|
15
17
|
readonly stopId: number;
|
|
16
18
|
readonly positionId: number | null;
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
+
readonly scheduledArrivalTime: Temporal.Instant | null;
|
|
20
|
+
readonly knownRealtimeArrivalTime: Temporal.Instant;
|
|
21
|
+
readonly scheduledDepartureTime: Temporal.Instant | null;
|
|
22
|
+
readonly knownRealtimeDepartureTime: Temporal.Instant;
|
|
19
23
|
readonly picksUp: boolean;
|
|
20
24
|
readonly dropsOff: boolean;
|
|
21
25
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export class GtfsAddedTripRegularMovement {
|
|
2
2
|
stopId;
|
|
3
3
|
positionId;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
scheduledArrivalTime;
|
|
5
|
+
knownRealtimeArrivalTime;
|
|
6
|
+
scheduledDepartureTime;
|
|
7
|
+
knownRealtimeDepartureTime;
|
|
6
8
|
picksUp;
|
|
7
9
|
dropsOff;
|
|
8
10
|
gtfsIdMetadata;
|
|
@@ -10,8 +12,10 @@ export class GtfsAddedTripRegularMovement {
|
|
|
10
12
|
constructor(fields) {
|
|
11
13
|
this.stopId = fields.stopId;
|
|
12
14
|
this.positionId = fields.positionId;
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
+
this.scheduledArrivalTime = fields.scheduledArrivalTime;
|
|
16
|
+
this.knownRealtimeArrivalTime = fields.knownRealtimeArrivalTime;
|
|
17
|
+
this.scheduledDepartureTime = fields.scheduledDepartureTime;
|
|
18
|
+
this.knownRealtimeDepartureTime = fields.knownRealtimeDepartureTime;
|
|
15
19
|
this.picksUp = fields.picksUp;
|
|
16
20
|
this.dropsOff = fields.dropsOff;
|
|
17
21
|
this.gtfsIdMetadata = fields.gtfsIdMetadata;
|
|
@@ -30,7 +34,7 @@ export class GtfsAddedTripRegularMovement {
|
|
|
30
34
|
return true;
|
|
31
35
|
}
|
|
32
36
|
get timeRelevantToDeparturesAlgorithm() {
|
|
33
|
-
return this.
|
|
37
|
+
return this.knownRealtimeDepartureTime;
|
|
34
38
|
}
|
|
35
39
|
asCorequeryFields() {
|
|
36
40
|
return {
|
|
@@ -38,11 +42,11 @@ export class GtfsAddedTripRegularMovement {
|
|
|
38
42
|
originalPositionId: this.positionId,
|
|
39
43
|
currentPositionId: this.positionId,
|
|
40
44
|
arrivalTimeType: "provided-live-time",
|
|
41
|
-
arrivalTime: this.
|
|
42
|
-
formerArrivalTime:
|
|
45
|
+
arrivalTime: this.knownRealtimeArrivalTime,
|
|
46
|
+
formerArrivalTime: this.scheduledArrivalTime,
|
|
43
47
|
departureTimeType: "provided-live-time",
|
|
44
|
-
departureTime: this.
|
|
45
|
-
formerDepartureTime:
|
|
48
|
+
departureTime: this.knownRealtimeDepartureTime,
|
|
49
|
+
formerDepartureTime: this.scheduledDepartureTime,
|
|
46
50
|
picksUp: this.picksUp,
|
|
47
51
|
dropsOff: this.dropsOff,
|
|
48
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtfs-added-trip-regular-movement.js","sourceRoot":"","sources":["../../../../src/data/trip/added/gtfs-added-trip-regular-movement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gtfs-added-trip-regular-movement.js","sourceRoot":"","sources":["../../../../src/data/trip/added/gtfs-added-trip-regular-movement.ts"],"names":[],"mappings":"AAqBA,MAAM,OAAO,4BAA4B;IAC9B,MAAM,CAAS;IACf,UAAU,CAAgB;IAE1B,oBAAoB,CAA0B;IAC9C,wBAAwB,CAAmB;IAE3C,sBAAsB,CAA0B;IAChD,0BAA0B,CAAmB;IAE7C,OAAO,CAAU;IACjB,QAAQ,CAAU;IAElB,cAAc,CAAqB;IACnC,gBAAgB,CAAS;IAElC,YAAY,MAA0C;QACpD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;QACxD,IAAI,CAAC,wBAAwB,GAAG,MAAM,CAAC,wBAAwB,CAAC;QAChE,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAC5D,IAAI,CAAC,0BAA0B,GAAG,MAAM,CAAC,0BAA0B,CAAC;QACpE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAClD,CAAC;IAED,IAAI,CACF,SAAsD;QAEtD,OAAO,IAAI,4BAA4B,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,IAAI,IAAI;QACN,OAAO,SAAkB,CAAC;IAC5B,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAa,CAAC;IACvB,CAAC;IAED,IAAI,aAAa;QACf,OAAO,IAAa,CAAC;IACvB,CAAC;IAED,IAAI,iCAAiC;QACnC,OAAO,IAAI,CAAC,0BAA0B,CAAC;IACzC,CAAC;IAED,iBAAiB;QACf,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,kBAAkB,EAAE,IAAI,CAAC,UAAU;YACnC,iBAAiB,EAAE,IAAI,CAAC,UAAU;YAElC,eAAe,EAAE,oBAAoB;YACrC,WAAW,EAAE,IAAI,CAAC,wBAAwB;YAC1C,iBAAiB,EAAE,IAAI,CAAC,oBAAoB;YAE5C,iBAAiB,EAAE,oBAAoB;YACvC,aAAa,EAAE,IAAI,CAAC,0BAA0B;YAC9C,mBAAmB,EAAE,IAAI,CAAC,sBAAsB;YAEhD,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -4,14 +4,16 @@ import type { IGtfsAddedTripServicingMovement } from "./types.js";
|
|
|
4
4
|
export type GtfsAddedTripTerminatingMovementFields = {
|
|
5
5
|
readonly stopId: number;
|
|
6
6
|
readonly positionId: number | null;
|
|
7
|
-
readonly
|
|
7
|
+
readonly scheduledArrivalTime: Temporal.Instant | null;
|
|
8
|
+
readonly knownRealtimeArrivalTime: Temporal.Instant;
|
|
8
9
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
9
10
|
readonly gtfsStopSequence: number;
|
|
10
11
|
};
|
|
11
12
|
export declare class GtfsAddedTripTerminatingMovement implements IGtfsAddedTripServicingMovement {
|
|
12
13
|
readonly stopId: number;
|
|
13
14
|
readonly positionId: number | null;
|
|
14
|
-
readonly
|
|
15
|
+
readonly scheduledArrivalTime: Temporal.Instant | null;
|
|
16
|
+
readonly knownRealtimeArrivalTime: Temporal.Instant;
|
|
15
17
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
16
18
|
readonly gtfsStopSequence: number;
|
|
17
19
|
constructor(fields: GtfsAddedTripTerminatingMovementFields);
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export class GtfsAddedTripTerminatingMovement {
|
|
2
2
|
stopId;
|
|
3
3
|
positionId;
|
|
4
|
-
|
|
4
|
+
scheduledArrivalTime;
|
|
5
|
+
knownRealtimeArrivalTime;
|
|
5
6
|
gtfsIdMetadata;
|
|
6
7
|
gtfsStopSequence;
|
|
7
8
|
constructor(fields) {
|
|
8
9
|
this.stopId = fields.stopId;
|
|
9
10
|
this.positionId = fields.positionId;
|
|
10
|
-
this.
|
|
11
|
+
this.scheduledArrivalTime = fields.scheduledArrivalTime;
|
|
12
|
+
this.knownRealtimeArrivalTime = fields.knownRealtimeArrivalTime;
|
|
11
13
|
this.gtfsIdMetadata = fields.gtfsIdMetadata;
|
|
12
14
|
this.gtfsStopSequence = fields.gtfsStopSequence;
|
|
13
15
|
}
|
|
@@ -24,7 +26,7 @@ export class GtfsAddedTripTerminatingMovement {
|
|
|
24
26
|
return false;
|
|
25
27
|
}
|
|
26
28
|
get timeRelevantToDeparturesAlgorithm() {
|
|
27
|
-
return this.
|
|
29
|
+
return this.knownRealtimeArrivalTime;
|
|
28
30
|
}
|
|
29
31
|
asCorequeryFields() {
|
|
30
32
|
return {
|
|
@@ -32,8 +34,8 @@ export class GtfsAddedTripTerminatingMovement {
|
|
|
32
34
|
originalPositionId: this.positionId,
|
|
33
35
|
currentPositionId: this.positionId,
|
|
34
36
|
arrivalTimeType: "provided-live-time",
|
|
35
|
-
arrivalTime: this.
|
|
36
|
-
formerArrivalTime:
|
|
37
|
+
arrivalTime: this.knownRealtimeArrivalTime,
|
|
38
|
+
formerArrivalTime: this.scheduledArrivalTime,
|
|
37
39
|
};
|
|
38
40
|
}
|
|
39
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtfs-added-trip-terminating-movement.js","sourceRoot":"","sources":["../../../../src/data/trip/added/gtfs-added-trip-terminating-movement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gtfs-added-trip-terminating-movement.js","sourceRoot":"","sources":["../../../../src/data/trip/added/gtfs-added-trip-terminating-movement.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,gCAAgC;IAClC,MAAM,CAAS;IACf,UAAU,CAAgB;IAE1B,oBAAoB,CAA0B;IAC9C,wBAAwB,CAAmB;IAE3C,cAAc,CAAqB;IACnC,gBAAgB,CAAS;IAElC,YAAY,MAA8C;QACxD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAEpC,IAAI,CAAC,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;QACxD,IAAI,CAAC,wBAAwB,GAAG,MAAM,CAAC,wBAAwB,CAAC;QAEhE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAClD,CAAC;IAED,IAAI,CACF,SAA0D;QAE1D,OAAO,IAAI,gCAAgC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,IAAI;QACN,OAAO,aAAsB,CAAC;IAChC,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAa,CAAC;IACvB,CAAC;IAED,IAAI,aAAa;QACf,OAAO,KAAc,CAAC;IACxB,CAAC;IAED,IAAI,iCAAiC;QACnC,OAAO,IAAI,CAAC,wBAAwB,CAAC;IACvC,CAAC;IAED,iBAAiB;QACf,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,kBAAkB,EAAE,IAAI,CAAC,UAAU;YACnC,iBAAiB,EAAE,IAAI,CAAC,UAAU;YAElC,eAAe,EAAE,oBAAoB;YACrC,WAAW,EAAE,IAAI,CAAC,wBAAwB;YAC1C,iBAAiB,EAAE,IAAI,CAAC,oBAAoB;SAC7C,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -3,15 +3,22 @@ import type { StopGtfsIdMetadata } from "../../ids/stop-gtfs-id-metadata.js";
|
|
|
3
3
|
import type { IGtfsReplacedTripServicingMovement } from "./types.js";
|
|
4
4
|
export type GtfsReplacedTripOriginatingMovementFields = {
|
|
5
5
|
readonly stopId: number;
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
6
|
+
readonly originalPositionId: number | null;
|
|
7
|
+
readonly currentPositionId: number | null;
|
|
8
|
+
readonly scheduledDepartureTime: Temporal.Instant | null;
|
|
9
|
+
readonly knownRealtimeDepartureTime: Temporal.Instant | null;
|
|
10
|
+
readonly assumedRealtimeDepartureTime: Temporal.Instant | null;
|
|
8
11
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
9
12
|
readonly gtfsStopSequence: number;
|
|
10
13
|
};
|
|
11
14
|
export declare class GtfsReplacedTripOriginatingMovement implements IGtfsReplacedTripServicingMovement {
|
|
12
15
|
readonly stopId: number;
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
16
|
+
readonly originalPositionId: number | null;
|
|
17
|
+
readonly currentPositionId: number | null;
|
|
18
|
+
readonly scheduledDepartureTime: Temporal.Instant | null;
|
|
19
|
+
readonly knownRealtimeDepartureTime: Temporal.Instant | null;
|
|
20
|
+
readonly assumedRealtimeDepartureTime: Temporal.Instant | null;
|
|
21
|
+
readonly effectiveDepartureTime: Temporal.Instant;
|
|
15
22
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
16
23
|
readonly gtfsStopSequence: number;
|
|
17
24
|
constructor(fields: GtfsReplacedTripOriginatingMovementFields);
|
|
@@ -21,4 +28,5 @@ export declare class GtfsReplacedTripOriginatingMovement implements IGtfsReplace
|
|
|
21
28
|
get isNonTerminal(): false;
|
|
22
29
|
get timeRelevantToDeparturesAlgorithm(): Temporal.Instant;
|
|
23
30
|
asCorequeryFields(): ServiceOriginatingMovementFields;
|
|
31
|
+
private get _departureTimeCorequeryFields();
|
|
24
32
|
}
|
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
export class GtfsReplacedTripOriginatingMovement {
|
|
2
2
|
stopId;
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
originalPositionId;
|
|
4
|
+
currentPositionId;
|
|
5
|
+
scheduledDepartureTime;
|
|
6
|
+
knownRealtimeDepartureTime;
|
|
7
|
+
assumedRealtimeDepartureTime;
|
|
8
|
+
effectiveDepartureTime;
|
|
5
9
|
gtfsIdMetadata;
|
|
6
10
|
gtfsStopSequence;
|
|
7
11
|
constructor(fields) {
|
|
8
12
|
this.stopId = fields.stopId;
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
13
|
+
this.originalPositionId = fields.originalPositionId;
|
|
14
|
+
this.currentPositionId = fields.currentPositionId;
|
|
15
|
+
this.scheduledDepartureTime = fields.scheduledDepartureTime;
|
|
16
|
+
this.knownRealtimeDepartureTime = fields.knownRealtimeDepartureTime;
|
|
17
|
+
this.assumedRealtimeDepartureTime = fields.assumedRealtimeDepartureTime;
|
|
11
18
|
this.gtfsIdMetadata = fields.gtfsIdMetadata;
|
|
12
19
|
this.gtfsStopSequence = fields.gtfsStopSequence;
|
|
20
|
+
const effectiveDepartureTime = this.knownRealtimeDepartureTime ??
|
|
21
|
+
this.assumedRealtimeDepartureTime ??
|
|
22
|
+
this.scheduledDepartureTime;
|
|
23
|
+
if (effectiveDepartureTime == null)
|
|
24
|
+
throw new Error("No departure time.");
|
|
25
|
+
this.effectiveDepartureTime = effectiveDepartureTime;
|
|
13
26
|
}
|
|
14
27
|
with(newValues) {
|
|
15
28
|
return new GtfsReplacedTripOriginatingMovement({ ...this, ...newValues });
|
|
@@ -24,17 +37,40 @@ export class GtfsReplacedTripOriginatingMovement {
|
|
|
24
37
|
return false;
|
|
25
38
|
}
|
|
26
39
|
get timeRelevantToDeparturesAlgorithm() {
|
|
27
|
-
return this.
|
|
40
|
+
return this.effectiveDepartureTime;
|
|
28
41
|
}
|
|
29
42
|
asCorequeryFields() {
|
|
30
43
|
return {
|
|
31
44
|
stopId: this.stopId,
|
|
32
|
-
originalPositionId: this.
|
|
33
|
-
currentPositionId: this.
|
|
34
|
-
|
|
35
|
-
departureTime: this.departureTime,
|
|
36
|
-
formerDepartureTime: null,
|
|
45
|
+
originalPositionId: this.originalPositionId,
|
|
46
|
+
currentPositionId: this.currentPositionId,
|
|
47
|
+
...this._departureTimeCorequeryFields,
|
|
37
48
|
};
|
|
38
49
|
}
|
|
50
|
+
get _departureTimeCorequeryFields() {
|
|
51
|
+
if (this.knownRealtimeDepartureTime !== null) {
|
|
52
|
+
return {
|
|
53
|
+
departureTimeType: "provided-live-time",
|
|
54
|
+
departureTime: this.knownRealtimeDepartureTime,
|
|
55
|
+
formerDepartureTime: this.scheduledDepartureTime,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
else if (this.assumedRealtimeDepartureTime !== null) {
|
|
59
|
+
return {
|
|
60
|
+
departureTimeType: "interpolated-live-time",
|
|
61
|
+
departureTime: this.assumedRealtimeDepartureTime,
|
|
62
|
+
formerDepartureTime: this.scheduledDepartureTime,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
return {
|
|
67
|
+
departureTimeType: "scheduled-time",
|
|
68
|
+
// Given the others must be null at this point, the effective time must
|
|
69
|
+
// equal the scheduled time.
|
|
70
|
+
departureTime: this.effectiveDepartureTime,
|
|
71
|
+
formerDepartureTime: null,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
39
75
|
}
|
|
40
76
|
//# sourceMappingURL=gtfs-replaced-trip-originating-movement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gtfs-replaced-trip-originating-movement.js","sourceRoot":"","sources":["../../../../src/data/trip/replaced/gtfs-replaced-trip-originating-movement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gtfs-replaced-trip-originating-movement.js","sourceRoot":"","sources":["../../../../src/data/trip/replaced/gtfs-replaced-trip-originating-movement.ts"],"names":[],"mappings":"AAiBA,MAAM,OAAO,mCAAmC;IACrC,MAAM,CAAS;IACf,kBAAkB,CAAgB;IAClC,iBAAiB,CAAgB;IAEjC,sBAAsB,CAA0B;IAChD,0BAA0B,CAA0B;IACpD,4BAA4B,CAA0B;IACtD,sBAAsB,CAAmB;IAEzC,cAAc,CAAqB;IACnC,gBAAgB,CAAS;IAElC,YAAY,MAAiD;QAC3D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;QACpD,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAElD,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAC5D,IAAI,CAAC,0BAA0B,GAAG,MAAM,CAAC,0BAA0B,CAAC;QACpE,IAAI,CAAC,4BAA4B,GAAG,MAAM,CAAC,4BAA4B,CAAC;QAExE,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAEhD,MAAM,sBAAsB,GAC1B,IAAI,CAAC,0BAA0B;YAC/B,IAAI,CAAC,4BAA4B;YACjC,IAAI,CAAC,sBAAsB,CAAC;QAC9B,IAAI,sBAAsB,IAAI,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC1E,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;IACvD,CAAC;IAED,IAAI,CACF,SAA6D;QAE7D,OAAO,IAAI,mCAAmC,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,IAAI,IAAI;QACN,OAAO,aAAsB,CAAC;IAChC,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAa,CAAC;IACvB,CAAC;IAED,IAAI,aAAa;QACf,OAAO,KAAc,CAAC;IACxB,CAAC;IAED,IAAI,iCAAiC;QACnC,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACrC,CAAC;IAED,iBAAiB;QACf,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YAEzC,GAAG,IAAI,CAAC,6BAA6B;SACtC,CAAC;IACJ,CAAC;IAED,IAAY,6BAA6B;QACvC,IAAI,IAAI,CAAC,0BAA0B,KAAK,IAAI,EAAE,CAAC;YAC7C,OAAO;gBACL,iBAAiB,EAAE,oBAA6B;gBAChD,aAAa,EAAE,IAAI,CAAC,0BAA0B;gBAC9C,mBAAmB,EAAE,IAAI,CAAC,sBAAsB;aACjD,CAAC;QACJ,CAAC;aAAM,IAAI,IAAI,CAAC,4BAA4B,KAAK,IAAI,EAAE,CAAC;YACtD,OAAO;gBACL,iBAAiB,EAAE,wBAAiC;gBACpD,aAAa,EAAE,IAAI,CAAC,4BAA4B;gBAChD,mBAAmB,EAAE,IAAI,CAAC,sBAAsB;aACjD,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,iBAAiB,EAAE,gBAAyB;gBAE5C,uEAAuE;gBACvE,4BAA4B;gBAC5B,aAAa,EAAE,IAAI,CAAC,sBAAsB;gBAE1C,mBAAmB,EAAE,IAAI;aAC1B,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -3,9 +3,14 @@ import type { StopGtfsIdMetadata } from "../../ids/stop-gtfs-id-metadata.js";
|
|
|
3
3
|
import type { IGtfsReplacedTripServicingMovement } from "./types.js";
|
|
4
4
|
export type GtfsReplacedTripRegularMovementFields = {
|
|
5
5
|
readonly stopId: number;
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
6
|
+
readonly originalPositionId: number | null;
|
|
7
|
+
readonly currentPositionId: number | null;
|
|
8
|
+
readonly scheduledArrivalTime: Temporal.Instant | null;
|
|
9
|
+
readonly knownRealtimeArrivalTime: Temporal.Instant | null;
|
|
10
|
+
readonly assumedRealtimeArrivalTime: Temporal.Instant | null;
|
|
11
|
+
readonly scheduledDepartureTime: Temporal.Instant | null;
|
|
12
|
+
readonly knownRealtimeDepartureTime: Temporal.Instant | null;
|
|
13
|
+
readonly assumedRealtimeDepartureTime: Temporal.Instant | null;
|
|
9
14
|
readonly picksUp: boolean;
|
|
10
15
|
readonly dropsOff: boolean;
|
|
11
16
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
@@ -13,9 +18,16 @@ export type GtfsReplacedTripRegularMovementFields = {
|
|
|
13
18
|
};
|
|
14
19
|
export declare class GtfsReplacedTripRegularMovement implements IGtfsReplacedTripServicingMovement {
|
|
15
20
|
readonly stopId: number;
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
21
|
+
readonly originalPositionId: number | null;
|
|
22
|
+
readonly currentPositionId: number | null;
|
|
23
|
+
readonly scheduledArrivalTime: Temporal.Instant | null;
|
|
24
|
+
readonly knownRealtimeArrivalTime: Temporal.Instant | null;
|
|
25
|
+
readonly assumedRealtimeArrivalTime: Temporal.Instant | null;
|
|
26
|
+
readonly effectiveArrivalTime: Temporal.Instant;
|
|
27
|
+
readonly scheduledDepartureTime: Temporal.Instant | null;
|
|
28
|
+
readonly knownRealtimeDepartureTime: Temporal.Instant | null;
|
|
29
|
+
readonly assumedRealtimeDepartureTime: Temporal.Instant | null;
|
|
30
|
+
readonly effectiveDepartureTime: Temporal.Instant;
|
|
19
31
|
readonly picksUp: boolean;
|
|
20
32
|
readonly dropsOff: boolean;
|
|
21
33
|
readonly gtfsIdMetadata: StopGtfsIdMetadata;
|
|
@@ -27,4 +39,6 @@ export declare class GtfsReplacedTripRegularMovement implements IGtfsReplacedTri
|
|
|
27
39
|
get isNonTerminal(): true;
|
|
28
40
|
get timeRelevantToDeparturesAlgorithm(): Temporal.Instant;
|
|
29
41
|
asCorequeryFields(): ServiceRegularMovementFields;
|
|
42
|
+
private get _arrivalTimeCorequeryFields();
|
|
43
|
+
private get _departureTimeCorequeryFields();
|
|
30
44
|
}
|