MaterialManagementTripBasedRecord

Introduction
One row of the trip-based material management data: in the Trip view, a trip with the material its vehicle spread during it. Every trip in scope has a row, including a trip with no spread activity, whose material, material type and spread measures are null.
A trip has one row unless it has more than one type of a material. It then has as many rows as the material with the most types, each holding one type of each material, so that every type has its own total and rate. The trip's own fields (MaterialManagementTripBasedRecord.primary, MaterialManagementTripBasedRecord.deviceId, MaterialManagementTripBasedRecord.driverId, MaterialManagementTripBasedRecord.tripStart, MaterialManagementTripBasedRecord.tripEnd and the total distance and time) repeat in each of its rows, so do not add them up across rows.
As in the Material Management report, the total distance is the trip's distance and the total time runs from MaterialManagementTripBasedRecord.tripStart to MaterialManagementTripBasedRecord.tripEnd, the start of the asset's next trip.
The trip id changes when trips are merged, so the device id and trip start are the stable key of a trip. A trip's rows can change after it is first returned, when its material aggregates are written or recalculated, so when you reload a date range, replace every row of each trip rather than merging rows by key.
Properties

antiIceRate

The distance-weighted average rate the spreader controller reported for anti-ice (liquid) material, in litres per kilometre.

antiIceRateDistance

antiIceTotal

The total anti-ice (liquid) material spread, in litres.

deviceId

The id of the asset that drove the trip.

driverId

The id of the driver of the trip, or of the Unassigned driver (NoDriverId) when the trip has no driver or the caller cannot see it. A sort on it puts the Unassigned driver lowest, then orders the drivers by id.

plowDistance

The distance driven with the plow active, in kilometres.
The stored material aggregates do not record plow activity yet, so this is always null.

plowTime

The time spent with the plow active.
The stored material aggregates do not record plow activity yet, so this is always null.

preWetRate

The distance-weighted average rate the spreader controller reported for pre-wet material, in litres per tonne of solid material.

preWetRateDistance

preWetTotal

The total pre-wet material spread, in litres.

primary

The value the row is grouped by: the trip id in the Trip view. It repeats in each row of a trip that has more than one.

solidRate

The distance-weighted average rate the spreader controller reported for solid material, in kilograms per kilometre.

solidRateDistance

The distance MaterialManagementMeasures.solidRate was averaged over, in kilometres. To average rates across rows, weight each row's rate by this distance: the sum of rate times rate distance divided by the sum of rate distances.
Until the stored aggregates record the distance their own rate was averaged over, the spread distance of the aggregates that reported a rate stands in for it. It equals that distance whenever the controller reported a rate throughout the application.

solidTotal

The total solid material spread, in grams.

spreadDistance

The distance driven while applying the row's solid material type, in kilometres. The spread distances of the rows of one trip add up to the distance driven while applying solid material during it.

spreadTime

The time spent applying the row's solid material type. The spread times of the rows of one trip add up to the time spent applying solid material during it.

totalDistance

The total distance of the row, in kilometres.

totalTime

The total time of the row.

tripEnd

When the trip ended, in UTC: the start of the asset's next trip, as in the Material Management report. For the asset's latest trip, which has no next trip yet, it is the time of the request.

tripStart

When the trip started, in UTC.

Loading API Runner...