Skip to Content
CommandsTRIP ModuleIntroduction

TRIP Module

Advanced vehicle trip tracking system that captures and analyzes complete journey data.


What is it for?

Use caseDescription
📊 Trip analysisCaptures complete metrics: distance, fuel, duration, efficiency
🎯 Drive ScoreConfigurable driving score (0-100)
📈 HistogramsTime distribution by RPM, speed, throttle and turbo ranges
👤 IdentificationDriver code associated with each trip
🔢 GC Counters8 generic counters for driving events
📍 GeolocationStart and end GPS with 7-decimal precision

Technical Features

System Limits

ParameterRangePrecision
Duration0 - 455 hours (19 days)1 minute
Distance0 - 65,535 km1 km
Fuel0 - 6,553 liters0.1 L
Efficiency0 - 655.3 km/L0.1 km/L
GPS±180° lat/lon7 decimals (~1cm)
Speed0 - 255 km/h1 km/h
RPM0 - 10,000 RPM10 RPM
Temperature-40°C to 150°C0.1°C
Driver code1-16 charactersASCII
GC Counters0 - 65,535 events1 event

Fuel Calculation Methods

The module automatically selects the best available method:

MethodPrecisionDescription
ODOLITER±0.5%Total odometer accumulator
FUEL_TRIP±1%ECU trip counter
CALCULATED±5%Calculation based on MAF/RPM
NONE-No data available

Trip Lifecycle

💤 IDLE
No active trip
STPSTART
🚗 ACTIVE
Trip in progress
STPSTOP
📊 IDLE
Data available

Typical Flow

  1. Start trip: STPSTART or STPSTART,DRIVER_CODE
  2. During trip: Automatic accumulation of GPS, CAN, sensor data
  3. Query status: QTPSTATUS at any time
  4. End trip: STPSTOP
  5. Get reports: QTPR0, QTPR1, QTPSCO, histograms

Naming Convention

PrefixFunctionExamples
STPSetters (modify state)STPSTART, STPSTOP, STPGCI,0
QTPGetters (query only)QTPSTATUS, QTPR0, QTPSCO
RTPModule responsesRTPSTART, RTPSTATUS

Response format:

>RTPCOMMAND,data;ID=<device_id>;*<checksum><

Scoring Counters (GC0-GC7)

IndexNameSemanticsUse
GC0OVERSPEEDFixedSpeed violations
GC1OVERREVFixedRPM violations
GC2HARSH_ACCELFixedHarsh accelerations (greater than 0.40g)
GC3HARSH_BRAKEFixedHarsh braking (less than -0.50g)
GC4HARSH_CORNERFixedHarsh cornering (greater than 0.50g)
GC5CUSTOM_1Client definedE.g.: phone use, seatbelt
GC6CUSTOM_2Client definedE.g.: fatigue, distractions
GC7CUSTOM_3Client definedCustom events

Available Commands


Quick Reference

Setters (STP)

CommandDescription
STPSTARTStart trip
STPSTART,<driver>Start trip with driver
STPSTOPEnd trip
STPDRV,<code>Set driver code
STPGCI,<idx>Increment GC counter
STPGCS,<idx>,<val>Set counter value
STPGCE,<idx>,<0 or 1>Enable/disable counter
STPSCOEN,<0 or 1>Enable/disable scoring
STPSCOCFG,<params>Configure scoring weights
STPIDLECFG,<t>,<rpm>Configure IDLE thresholds
STPNEUCFG,<speed>Configure NEUTRAL speed
STPNEUEN,<0 or 1>Enable NEUTRAL detection
STPGRSTReset global statistics

Getters (QTP)

CommandDescription
QTPSTATUSCompact current status
QTPR0Report part 1: GPS and metrics
QTPR1Report part 2: speed, RPM, driver
QTPR2-QTPR9Histograms
QTPR10Complete Drive Score
QTPDRVDriver code
QTPGC,<idx>Query individual counter
QTPGCLList of enabled counters
QTPSCODrive Score and analysis
QTPSCOENScoring status
QTPSCOCFGWeight configuration
QTPRPM / QTPSPD / QTPTEMPIndividual metrics
QTPGTOTComplete global statistics
QTPGRECHistorical records
QTPGSCOGlobal scores
QTPGGCAccumulated counters
QTPGKMS / QTPGTRIPS / QTPGHRSQuick queries

Integration with Other Modules

Behavior (HM)

HM events can increment GC counters:

// Configure HM00 for harsh GPS acceleration >SHM00E,0,7,20,3,4000,10< // Create rule to increment GC0 on harsh acceleration >SRL20E;TRG=HM00+;ACC={STPGCI,0}<

Event Engine (RL)

Complete automation with rules:

// On trip start, send STATUS to server >SRL04E;TRG=TD00+;ACC={GU401H}< // On trip end, send complete report >SRL00E;TRG=TD00-;ACC={GU000H}<

View Event Engine →


Basic Example

// 1. Start trip with driver >STPSTART,JUAN123< >RTPSTART,1; Trip started ... // 2. Query status during trip >QTPSTATUS< >RTPSTATUS,active,1,45km,5.2L,1h15m,JUAN123... // 3. End trip >STPSTOP< >RTPSTOP,1,45; Trip ended ... // 4. Get drive score >QTPSCO< >RTPSCO,score:82,rating:GOOD,ovspd:3,ovrev:1,hacc:2,hbrk:4,hcrv:1,...

Troubleshooting

ProblemCauseSolution
Score always 100Scoring disabled>STPSCOEN,1<
Counters don’t incrementCounters disabled>STPGCE,*,1<
Fuel always 0.0LECU without fuel dataCheck CAN connection
GPS +00000000+000000000GPS without fixCheck GPS antenna
Empty histogramsTrip too shortWait more time
Last updated