RFC-0013: D0 Device Layer — Raw Telemetry Schema

RFC-0013: D0 Device Layer — Raw Telemetry Schema

Motivation

Telemachus Core v0.2 (RFC-0001) defines a unified 10 Hz schema for mobility data. In practice, the distinction between raw device output and pipeline-enriched data is not formalized. This leads to:

  • RS3 exports containing road_type, event, target_speed — columns that a real device never sends
  • Real device data (Teltonika FMC880) missing fields the schema expects (heading, hdop)
  • No clear contract for what a “D0 file” should contain vs. what a “D1 file” adds

This RFC introduces a strict layered data model (D0→D4) where each layer has an explicit column contract.

Principle

D0 = raw device output. No enrichment, no interpretation, no external data.

A D0 file contains only what the telematics device physically measures and transmits. Any column derived from external sources (maps, DEM, algorithms) belongs to D1 or higher.

D0 Column Specification

Mandatory Fields

Every D0-compliant file MUST contain these columns:

ColumnTypeUnitSourceFrequencyDescription
tsdatetimeUTC ISO 8601Device clockIMU rateTimestamp of the measurement frame
latfloat64degrees WGS84GNSSGNSS rateLatitude. NaN between GNSS ticks if GNSS rate < IMU rate
lonfloat64degrees WGS84GNSSGNSS rateLongitude. NaN between GNSS ticks
speed_mpsfloat32m/sGNSSGNSS rateGround speed. NaN between GNSS ticks
ax_mps2float32m/s²IMU accelIMU rateLongitudinal acceleration (+ = forward)
ay_mps2float32m/s²IMU accelIMU rateLateral acceleration (+ = left)
az_mps2float32m/s²IMU accelIMU rateVertical acceleration (~9.81 at rest)
device_idstringConfigper-fileUnique device identifier
trip_idstringConfigper-fileUnique trip identifier

These fields SHOULD be present when the hardware provides them:

ColumnTypeUnitDescription
heading_degfloat32degrees [0, 360)Course over ground (COG). NaN when stationary
altitude_gps_mfloat32mGNSS altitude (NMEA GGA). Typical accuracy: 10–30m
hdopfloat32Horizontal dilution of precision. < 2.0 = good
n_satellitesint8Number of satellites used in fix. > 6 = reliable

Optional Fields (extended IMU)

Present only if the device has the corresponding sensor:

ColumnTypeUnitDescription
gx_rad_sfloat32rad/sGyroscope X (roll rate)
gy_rad_sfloat32rad/sGyroscope Y (pitch rate)
gz_rad_sfloat32rad/sGyroscope Z (yaw rate)

If the device lacks a gyroscope (e.g., Teltonika FMC880), these columns MUST be absent or all-NaN. They MUST NOT be filled with zeros.

Optional Fields (vehicle I/O)

ColumnTypeDescription
ignitionboolVehicle ignition state (digital input)
odometer_mfloat64Odometer reading (CAN/OBD, if available)

Multi-Rate Convention

D0 files are timestamped at the IMU rate (typically 10 Hz). GNSS columns (lat, lon, speed_mps, heading_deg, etc.) contain NaN on rows where no GNSS fix is available. This is called “multi-rate D0.”

Example at 10 Hz IMU + 1 Hz GNSS:

ts,                          lat,       lon,      speed_mps, ax_mps2, ay_mps2, az_mps2
2025-01-01T08:00:00.000Z,   49.3347,   1.3830,   5.2,       0.12,    0.03,    9.81
2025-01-01T08:00:00.100Z,   NaN,       NaN,      NaN,       0.15,   -0.01,    9.80
2025-01-01T08:00:00.200Z,   NaN,       NaN,      NaN,       0.11,    0.02,    9.82
...
2025-01-01T08:00:01.000Z,   49.3348,   1.3831,   5.3,       0.13,    0.01,    9.81

What D0 MUST NOT Contain

The following columns are explicitly excluded from D0. They belong to higher layers:

ColumnCorrect LayerReason
road_typeD1 (Road Context)Requires map data
speed_limit_kmhD1 (Road Context)Requires map data
altitude_dem_mD1 (DEM Enrichment)Requires external DEM
slope_pctD1 (DEM Enrichment)Derived from DEM
eventD2 (Event Detection)Algorithmic output
sqs_globalD1 (Signal Quality)Computed metric
lat_matchedD1 (Map Matching)Requires OSRM
target_speedD3 (Indicators)Model output

Layer Model (D0→D4)

LayerNameInputOutputDescription
D0DeviceHardwareRaw CSV/ParquetWhat the device sends
D1Cleaned & ContextualizedD0Enriched D0 + new columnsGPS interpolation, IMU calibration, map matching, DEM, SQS
D2Events & SituationsD1D1 + event column + event tableDriving events, curve classification
D3IndicatorsD1 + D2KPI JSON per tripDriving score, distances, event rates, Road Genome
D4Fleet AggregationD3 × NPanel statisticsBenchmarking, trends, anomalies

D1 — Columns Added

ColumnStageDescription
lat (interpolated)GPS UpsamplingNaN gaps filled (linear or kinematic)
interpolatedGPS UpsamplingBoolean: true if this row was interpolated
dist_mGPS CleaningIncremental haversine distance
lat_matched, lon_matchedMap MatchingOSRM-snapped position
road_typeRoad ContextOSM road classification
speed_limit_kmhRoad ContextRegulatory speed limit
urbanRoad ContextUrban zone (boolean)
altitude_dem_mDEM EnrichmentSRTM/IGN altitude
slope_pctDEM EnrichmentGrade (%)
sqs_globalSignal QualityScore 0–1

D2 — Columns Added

ColumnDescription
eventEvent type per row (empty if none)
curve_radius_mInstantaneous curve radius
curve_classClassification: hairpin / sharp / moderate / gentle / straight

D2 — Event Types

CodeSignalDefault ThresholdCategory
HARSH_BRAKEax< -3.0 m/s²Driving
HARSH_ACCELax> +2.5 m/s²Driving
SHARP_TURNgz or ay> 0.3 rad/s or > 5.0 m/s²Driving
SPEED_BUMPaz_delta3.0–5.0 m/s²Infrastructure
POTHOLEaz_delta> 5.0 m/s²Infrastructure
CURBay + azay > 2.5 and az_delta > 3.0Infrastructure
DOOR_OPENgy> 3.0 rad/s (stationary)Logistics
STOPspeed< 0.3 m/s for ≥ 5sKinematic

D3 — Indicators

KPIUnitDescription
distance_kmkmTotal trip distance
duration_ssTotal trip duration
driving_score0–100Exponential score based on events/km
event_rate_per_kmevents/kmWeighted event frequency
sqs0–1Signal Quality Score

D3 — Road Genome

Per-segment (100m) profile:

FieldDescription
kappa_meanMean curvature κ (rad/m)
alpha_meanMean slope α (fraction)
v_cible_kmhTarget speed from v_max × exp(−λ₁
riskRisk index
road_typeDominant road type

Hardware Mapping

Teltonika FMC880 (Exobox DL100)

Device fieldD0 columnNotes
TimestamptsUTC
Latitudelat1 Hz
Longitudelon1 Hz
Speedspeed_mpsConvert from km/h
Courseheading_degCOG 0–360°
Altitudealtitude_gps_mNMEA GGA
HDOPhdop
Satellitesn_satellites
Accel X/Y/Zax_mps2 / ay_mps2 / az_mps210 Hz
GyroNot available on FMC880
IgnitionignitionDigital input

RoadSimulator3 (synthetic)

RS3 fieldD0 columnNotes
timestampts10 Hz uniform
lat, lonlat, lonNaN between ticks if multi-rate
speedspeed_mps
headingheading_degComputed from trajectory
acc_x/y/zax_mps2 / ay_mps2 / az_mps2Includes gravity on az
gyro_x/y/zgx_rad_s / gy_rad_s / gz_rad_sNaN if disabled

Note: RS3 also exports road_type, event, target_speed etc. These are ground truth metadata for validation (see P014), NOT part of D0.

Validation Rules

A D0 file is valid if:

  1. All mandatory columns are present
  2. ts is monotonically increasing
  3. az_mps2 mean at rest ≈ 9.81 ± 1.0 m/s² (gravity check)
  4. lat / lon are within [-90, 90] / [-180, 180] when not NaN
  5. No enrichment columns are present (see §3.6)

Relationship to Other RFCs

RFCRelationship
RFC-0001 (Core v0.2)This RFC formalizes the D0 layer implicit in RFC-0001
RFC-0003 (Events)D2 event types and thresholds
RFC-0005 (Quality)SQS dimensions feed from D0 quality fields (hdop, n_satellites)
RFC-0007 (Manifest)D0 manifest should declare device_model and sensor capabilities
RFC-0009 (RS3 Pipeline)RS3 produces D0-compliant output + separate ground truth

Migration from v0.1

Existing Telemachus files that mix D0 and D1 columns remain valid for processing. The pipeline SHOULD accept both formats. New exports SHOULD conform to the layered model.

References

  • Telemachus Core v0.2 (RFC-0001)
  • P013 — IMU Rectification Without Gyroscope (Edet, 2026)
  • P014 — Ground Truth Validation (Edet, 2026)
  • Teltonika FMC880 Technical Specification
  • NMEA 0183 Standard (GGA, RMC sentences)

End of RFC-0013.

Réseau 5 sortants 0 entrants

Sources · Liens sortants

  • P013 — In-field IMU Rectification Without Gyroscope
  • P014 — Closed-Loop Validation of Telematics Pipelines via Synthetic Ground Truth
  • RFC-0001 — RFC-0001: Telemachus Core v0.2 – Schema Evolution
  • RFC-0003
  • RFC-0005

Cité par · Liens entrants

Aucune citation détectée.