opentripmodel / otm5-change-requests

Tracking and reporting bugs and change requests of the OTM5 specification.
5 stars 1 forks source link

Add a TravelDistanceEvent #58

Closed bmeesters closed 1 year ago

bmeesters commented 2 years ago

Type of request

Is your feature request related to a problem? OTM5 already supports events coming from devices related to fleet management systems, such as the temperature in a truck (frozen or cooled goods) and GPS updates to indicate where the vehicle is driving. However, there is currently no way to communicate what distance is (planned/projected/realized) traveled. This information is often needed for billing and shared among parties.

Describe the solution you'd like

A new event, for example named TravelDistanceEvent that contains the distance traveled in a specific lifecycle. The event can also optionally contain the corresponding move action to provide the from/to locations and the route used. Alternatively the fields from, to and route are also optionally available on the new event.

Describe alternatives you've considered You can achieve almost the same by adding a distance field on the move itself and use those moves in the trip/consignment. This is a smaller change, but not reusable for FMS parties providing the distance traveled using an event. To compensate for this you can add an odometer field to the LocationUpdateEvents.

Additional context Add any other context or screenshots about the feature request here.

thomaskolmans commented 2 years ago

Not in favor for this event. As it's not an event in the literal sense of the word. At most it would be a SensorUpdateEvent which is how we've implemented this actually (an odometer is a sensor to some extend).

I would see the case for a odometer field on the LocationUpdateEvent, that makes sense and is valuable information.

bmeesters commented 2 years ago

I think it is a fair criticism that it is not really an event compared to the others. That said, just an odometer is not enough. We work with quite a few TMS parties and it is very common to want to communicate expected or realized driven kilometres on the trip level. I am not sure how we can achieve that in another way? You could add a field 'distance' on the trip itself, or maybe a result that can contain more than just the distance. Tough that does not feel very generic.

bmeesters commented 2 years ago

Do you have an alternative that could work?

thomaskolmans commented 2 years ago

Yes I would opt for distance (in meters or ValueWithUnit). This field can be both added in Trip and the Action with type move. Both of these models have already a full lifecycle implemented and can thus show very accurately what has been planned (pre-calculated) and then realized.

bmeesters commented 2 years ago

I suppose that works, though note that only the move has lifecycles, the trip has not. Might be good to think about the value-with-lifecycles idea again we had earlier. Can imagine something similar being useful for load-carriers.

Anyway, thanks for thinking along. It will not make it in 5.4 anyway, so there is some discussion.

bmeesters commented 1 year ago

This is quite dormant and I don't see any demand for it much anymore so I will just close it