Skip to end of banner
Go to start of banner

SIRI-VM 2.0

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Current »

Realtime vehicle position data is delivered through a vehicleMonitoringDeliveryStructure containing one or more VehicleActivity elements.

VehicleActivity

The vehicle position for one vehicle is contained in a VehicleActivity element. The following fields are supported by Samtrafiken. Any fields or attributes not on the list are ignored.

Field

Required

Notes

RecordedAtTime

Required

ValidUntilTime

Required

Ignored by Samtrafiken

MonitoredVehicleJourney > LineRef

Required

MonitoredVehicleJourney > VehicleRef

Required

A unique id for the physical vehicle. If the static data contains this vehicle, then the id should match the static data. The value should be a positive number.

MonitoredVehicleJourney > FramedVehicleJourneyRef > DatedVehicleJourneyRef

Required

Reference to ServiceJourney in the static data, for example SE:022:ServiceJourney:1234567-12345

MonitoredVehicleJourney > FramedVehicleJourneyRef > DataFrameRef

Required

Trip start date in YYYY-MM-DD format. Used to match with static data

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:

  • WGS84

  • 4326

  • SWEREF99TM

  • RT90

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

  • full

  • standingAvailable

  • seatsAvailable

MonitoredVehicleJourney > Delay

Required

Ignored by Samtrafiken, Samtrafiken reads delays from SIRI-ET streams.

Required in order to adhere to the Nordic SIRI profile. Duration which can be negative if the vehicle is early. PT0S when there are no delays.

Example

<?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-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: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:0000001-0000001</ns5:DatedVehicleJourneyRef>
            </ns5:FramedVehicleJourneyRef>
            <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>-PT15S</ns5:Delay>
            <ns5:VehicleRef>3830101497</ns5:VehicleRef>
        </ns5:MonitoredVehicleJourney>
    </ns5:VehicleActivity>
    <ns5:VehicleActivity>
    ...
    </ns5:VehicleActivity>
</vehicleMonitoringDeliveryStructure>
  • No labels