...
Field | Required | Notes |
---|---|---|
RecoredAtTime | Required | |
MonitoredVehicleJourney > FramedVehicleJourneyRef > DatedVehicleJourneyRef | Required | Should match static data id. |
MonitoredVehicleJourney > FramedVehicleJourneyRef > VehicleRef | Required | An id for this physical vehicle |
MonitoredVehicleJourney > VehicleLocation > Latitude | Required | Northing coordinate, WGS84 |
MonitoredVehicleJourney > VehicleLocation > Longitude | Required | Easting coordinate, WGS84 |
MonitoredVehicleJourney > VehicleLocation[SrsName] | Optional | WGS84 when unspecified. WGS84 is recommended since this avoids possible loss of resolution during conversion. Valid values:
|
MonitoredVehicleJourney > Bearing | Optional | Compass bearing in degrees (0-359.99), rounded down to the nearest integer by Samtrafiken. |
MonitoredVehicleJourney > Velocity | Optional | Speed, in kilometers per hour, rounded down to the nearest integer by Samtrafiken.. |
MonitoredVehicleJourney > Occupancy | Optional | Realtime occupancy. One of
|
Example
The following example shows what SIRI-VM data delivered to Samtrafiken can look like. Note that there are multiple fields which are not interpreted by Samtrafiken (see table above regarding which fields are required)
Code Block |
---|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <vehicleMonitoringDeliveryStructure version="2.0" xmlns:ns5="http://www.siri.org.uk/siri" xmlns:ns2="http://www.ifopt.org.uk/acsb" xmlns:ns4="http://datex2.eu/schema/2_0RC1/2_0" xmlns:ns3="http://www.ifopt.org.uk/ifopt"> <ns5:ResponseTimestamp>2024-10-21T18:10:15+02:00</ns5:ResponseTimestamp> <ns5:SubscriberRef>Samtrafiken</ns5:SubscriberRef> <!-- SubscriberRef, according to the publish/subscribe subscription when using publish/subscribe for data transfer --> <ns5:SubscriptionRef>vehicle_monitoring-24-VASTERBOTTEN-1729534205</ns5:SubscriptionRef> <!-- subscription reference, only present when using publish/subscribe for data transfer --> <ns5:VehicleActivity> <!-- One VehicleMonitoringDeliveryStructure contains one or more VehicleActivities --> <ns5:RecordedAtTime>2024-10-21T18:09:56+02:00</ns5:RecordedAtTime> <!-- Position timestamp --> <ns5:ValidUntilTime>9999-12-31T23:59:59+01:00</ns5:ValidUntilTime> <ns5:ProgressBetweenStops> <ns5:LinkDistance>341</ns5:LinkDistance> <ns5:Percentage>34.90</ns5:Percentage> </ns5:ProgressBetweenStops> <ns5:MonitoredVehicleJourney> <ns5:LineRef>SE:022:Line:9011000000001000</ns5:LineRef> <ns5:FramedVehicleJourneyRef> <ns5:DataFrameRef>2024-10-21T04:00:00</ns5:DataFrameRef> <ns5:DatedVehicleJourneyRef>SE:022:ServiceJourney:16150240000001-1617694<0000001</ns5:DatedVehicleJourneyRef> </ns5:FramedVehicleJourneyRef> <ns5:OperatorRef>25</ns5:OperatorRef> <ns5:OriginRef>SE:022:Quay:9022000000001000</ns5:OriginRef> <ns5:DestinationRef>SE:022:Quay:9022000000002000</ns5:DestinationRef> <ns5:Monitored>true</ns5:Monitored> <ns5:DataSource>DinTur</ns5:DataSource> <ns5:VehicleLocation> <ns5:Longitude>17.32767</ns5:Longitude> <ns5:Latitude>62.395068</ns5:Latitude> </ns5:VehicleLocation> <ns5:Bearing>129.0</ns5:Bearing> <ns5:Delay>-PT256S<PT15S</ns5:Delay> <ns5:VehicleStatus>offRoute</ns5:VehicleStatus> <ns5:VehicleRef>3830101497</ns5:VehicleRef> </ns5:MonitoredVehicleJourney> </ns5:VehicleActivity> <ns5:VehicleActivity> ... </ns5:VehicleActivity> </vehicleMonitoringDeliveryStructure> |