Control de Viajes
Comandos para gestionar el ciclo de vida de los viajes.
STPSTART - Iniciar Viaje
Inicia un nuevo viaje, capturando GPS y timestamp de inicio.
Sintaxis
STPSTART // Sin conductor
STPSTART,CODIGO_CONDUCTOR // Con conductor (1-16 chars)Respuesta
RTPSTART,<id>; Trip startedEjemplo
>STPSTART,CHOFER001<
>RTPSTART,127; Trip started ;ID=865413053386354;*5B<- ID de viaje se incrementa automáticamente (1-65535)
- GPS y timestamp se capturan al inicio
- Histogramas se resetean
- Contadores GC no se resetean automáticamente
STPSTOP - Finalizar Viaje
Finaliza el viaje activo, calculando combustible y eficiencia.
Sintaxis
STPSTOPRespuesta
RTPSTOP,<id>,<dist>; Trip endedEjemplo
>STPSTOP<
>RTPSTOP,127,245; Trip ended ;ID=865413053386354;*13<- GPS y timestamp de finalización se capturan
- Datos quedan disponibles hasta el próximo
STPSTART - Estado cambia a IDLE
QTPSTATUS - Estado Actual
Consulta el estado actual del viaje de forma compacta.
Sintaxis
QTPSTATUSRespuesta
RTPSTATUS,<estado>,<id>,<dist>km,<fuel>L,<tiempo>,<conductor>| Campo | Descripción |
|---|---|
estado | active o idle |
id | ID del viaje (0 si no hay viaje) |
dist | Distancia en km |
fuel | Combustible en litros (1 decimal) |
tiempo | Formato <h>h<m>m |
conductor | Código o - si no hay |
Ejemplos
// Viaje activo
>QTPSTATUS<
>RTPSTATUS,active,127,245km,18.5L,4h15m,CHOFER001;ID=865413053386354;*10<
// Sin viaje
>QTPSTATUS<
>RTPSTATUS,idle,0,0km,0.0L,0h0m,-;ID=865413053386354;*1A<STPDRV / QTPDRV - Código de Conductor
Consultar
QTPDRV
RTPDRV,<codigo> // Código actual
RTPDRV,- // Sin conductorEstablecer
STPDRV,CODIGO // Asignar conductor (1-16 chars)
STPDRV, // Limpiar conductor
STPDRV,* // Limpiar conductor (alternativo)Ejemplos
>STPDRV,JUAN123<
>RTPDRV,JUAN123; Driver code set ;ID=865413053386354;*60<
>STPDRV,*<
>RTPDRV,-; Driver code cleared ;ID=865413053386354;*77<Métricas Individuales
QTPRPM - Revoluciones del Motor
>QTPRPM<
>RTPRPM,avg:2150,max:3200;ID=865413053386354;*0A<QTPSPD - Velocidad
>QTPSPD<
>RTPSPD,avg:78,max:125;ID=865413053386354;*3C<QTPTEMP - Temperatura del Motor
>QTPTEMP<
>RTPTEMP,avg:78.5,min:65.2,max:92.3;ID=865413053386354;*2F<Si el viaje está activo, muestra datos del viaje actual. Si no hay viaje, muestra datos del último viaje completado.
Last updated on