@golemio/pid 2.20.1-dev.1446980737 → 2.20.1-dev.1447504019
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/docs/openapi-output.yaml +53 -14
- package/package.json +1 -1
package/docs/openapi-output.yaml
CHANGED
|
@@ -570,7 +570,28 @@ paths:
|
|
|
570
570
|
/v2/vehiclepositions:
|
|
571
571
|
get:
|
|
572
572
|
summary: GET All Vehicle Positions
|
|
573
|
-
description:
|
|
573
|
+
description: |
|
|
574
|
+
Positions in one the following states are included by default:
|
|
575
|
+
- `at_stop` - The position is tracking and the closest anchor point or metro rail track segment is a stop.
|
|
576
|
+
- `on_track` - The position is tracking, but is neither `at_stop` nor `off_track`.
|
|
577
|
+
|
|
578
|
+
Using the `includeNotTracking` parameter, positions in one the following states can be additionally included:
|
|
579
|
+
- `after_track` - The position is not tracking and the trip's last known position is tracking. For metro positions, this can also mean that it is tracking, the vehicle is 200+ meters from the closest metro rail track segment of its track and the vehicle's message attributes `tm` and `odch` or higher than the arrival to the final stop. For other positions from TCP sources (DPP buses and trams), this can also mean that it is tracking and the vehicle sent a message while at the final stop or sent a message with the `tjr` attribute higher than the arrival to the final stop.
|
|
580
|
+
- `before_track` - The position is not tracking and either the trip's previous position is not known, or the previous position's state is `at_stop` or `on_track`.
|
|
581
|
+
- `before_track_delayed` - The last position of the vehicle's trip that is of state `before_track` or `invisible`, with a delay predicted based on the vehicle's previous trip.
|
|
582
|
+
- `canceled` - The position is canceled.
|
|
583
|
+
- `off_track` - The position is tracking and the vehicle is 200+ meters from the closest anchor point or metro rail track segment of its track. For metro positions, it is additionally required that the vehicle's message attributes `tm` and `odch` or less than or equal to the arrival to the final stop.
|
|
584
|
+
|
|
585
|
+
Using the `includeNotPublic` parameter, positions in the following state can be additionally included:
|
|
586
|
+
- `not_public` - The position belongs to a non-public trip (trip without run schedule).
|
|
587
|
+
|
|
588
|
+
The following states also exist internally but are excluded from the API output:
|
|
589
|
+
- `duplicate` - The position is not tracking, the trip's last known position is tracking and there is another position with identical `origin_timestamp`.
|
|
590
|
+
- `invisible` - The position is not tracking and either:
|
|
591
|
+
- the trip's previous position is not known or the previous position's state is `at_stop` or `on_track`, and the vehicle is on its way from the garage;
|
|
592
|
+
- or the trip's last known position is tracking and the vehicle is on its way to the garage.
|
|
593
|
+
- `mismatched` - The position does not make sense (e.g. it was sent late and thus has a mismatched stop sequence).
|
|
594
|
+
- `unknown` - The position is not yet processed (or was determined to never be processed).
|
|
574
595
|
tags:
|
|
575
596
|
- 🛤 PID Realtime Positions (v2)
|
|
576
597
|
parameters:
|
|
@@ -2570,8 +2591,7 @@ components:
|
|
|
2570
2591
|
type: string
|
|
2571
2592
|
example: "service-3-8585"
|
|
2572
2593
|
state_position:
|
|
2573
|
-
|
|
2574
|
-
example: "at_stop"
|
|
2594
|
+
$ref: "#/components/schemas/StatePosition"
|
|
2575
2595
|
required:
|
|
2576
2596
|
- gtfs_trip_id
|
|
2577
2597
|
- route_type
|
|
@@ -2630,17 +2650,8 @@ components:
|
|
|
2630
2650
|
description: "Delay of the vehicle in seconds."
|
|
2631
2651
|
example: 10
|
|
2632
2652
|
state_position:
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
example: at_stop
|
|
2636
|
-
enum:
|
|
2637
|
-
- before_track
|
|
2638
|
-
- before_track_delayed
|
|
2639
|
-
- at_stop
|
|
2640
|
-
- on_track
|
|
2641
|
-
- off_track
|
|
2642
|
-
- after_track
|
|
2643
|
-
- unknown
|
|
2653
|
+
nullable: true
|
|
2654
|
+
$ref: "#/components/schemas/StatePosition"
|
|
2644
2655
|
last_stop_sequence:
|
|
2645
2656
|
type: integer
|
|
2646
2657
|
nullable: true
|
|
@@ -2746,6 +2757,34 @@ components:
|
|
|
2746
2757
|
nullable: true
|
|
2747
2758
|
example: true
|
|
2748
2759
|
|
|
2760
|
+
StatePosition:
|
|
2761
|
+
type: string
|
|
2762
|
+
example: at_stop
|
|
2763
|
+
enum:
|
|
2764
|
+
- at_stop
|
|
2765
|
+
- before_track
|
|
2766
|
+
- before_track_delayed
|
|
2767
|
+
- canceled
|
|
2768
|
+
- off_track
|
|
2769
|
+
- on_track
|
|
2770
|
+
description: |
|
|
2771
|
+
- `at_stop` - The position is tracking and the closest anchor point or metro rail track segment is a stop.
|
|
2772
|
+
- `before_track` - The position is not tracking and either the trip's previous position is not known, or the previous position's state is `at_stop` or `on_track`.
|
|
2773
|
+
- `before_track_delayed` - The last position of the vehicle's trip that is of state `before_track` or `invisible`, with a delay predicted based on the vehicle's previous trip.
|
|
2774
|
+
- `canceled` - The position is canceled.
|
|
2775
|
+
- `off_track` - The position is tracking and the vehicle is 200+ meters from the closest anchor point or metro rail track segment of its track. For metro positions, it is additionally required that the vehicle's message attributes `tm` and `odch` or less than or equal to the arrival to the final stop.
|
|
2776
|
+
- `on_track` - The position is tracking, but is neither `at_stop` nor `off_track`.
|
|
2777
|
+
|
|
2778
|
+
The following states also exist internally but are excluded from the API output:
|
|
2779
|
+
- `after_track` - The position is not tracking and the trip's last known position is tracking. For metro positions, this can also mean that it is tracking, the vehicle is 200+ meters from the closest metro rail track segment of its track and the vehicle's message attributes `tm` and `odch` or higher than the arrival to the final stop. For other positions from TCP sources (DPP buses and trams), this can also mean that it is tracking and the vehicle sent a message while at the final stop or sent a message with the `tjr` attribute higher than the arrival to the final stop.
|
|
2780
|
+
- `duplicate` - The position is not tracking, the trip's last known position is tracking and there is another position with identical `origin_timestamp`.
|
|
2781
|
+
- `invisible` - The position is not tracking and either:
|
|
2782
|
+
- the trip's previous position is not known or the previous position's state is `at_stop` or `on_track`, and the vehicle is on its way from the garage;
|
|
2783
|
+
- or the trip's last known position is tracking and the vehicle is on its way to the garage.
|
|
2784
|
+
- `mismatched` - The position does not make sense (e.g. it was sent late and thus has a mismatched stop sequence).
|
|
2785
|
+
- `not_public` - The position belongs to a non-public trip (trip without run schedule).
|
|
2786
|
+
- `unknown` - The position is not yet processed (or was determined to never be processed).
|
|
2787
|
+
|
|
2749
2788
|
PublicTripShapeFeatureCollection:
|
|
2750
2789
|
type: object
|
|
2751
2790
|
properties:
|