Traducido del English por IA ·
Ni lo uno ni lo otro, más o menos. El NEO-6M ya te proporciona ambos. La sentencia $GPRMC incluye la velocidad sobre el suelo (en nudos) y el rumbo sobre el suelo, y el receptor obtiene la velocidad a partir del efecto Doppler, que es mucho mejor que restar dos posiciones tomadas con 30 s de diferencia. Dos posiciones separadas 30 s mostrarán un tractor que fue y volvió por un pasillo como si estuviera detenido.Con TinyGPS++ son dos líneas:
float kmh = gps.speed.kmph(); // already converted from knots
float hdg = gps.course.deg();
snprintf(buf, sizeof buf,
"{"lat":%.6f,"lng":%.6f,"speed_kmh":%.1f,"course_deg":%.0f}",
gps.location.lat(), gps.location.lng(), kmh, hdg);
Envíalos como números en el mismo mensaje que lat/lng. Mismo mensaje, mismo coste, así que para @roberts.r son unos bytes más, no otro mensaje. Luego una regla de alarma sobre speed_kmh > 15 con un debounce de 2 lecturas para que un solo salto del GPS no la dispare.Si alguna vez necesitas algo calculado a posteriori (distancia por turno, por ejemplo), eso va en el flujo raíz antes de Save telemetry como clave derivada.
Neither contractor, sort of. The NEO-6M already gives you both. The $GPRMC sentence has speed over ground (in knots) and course over ground, and the receiver gets speed from Doppler, which is far better than differencing two fixes 30 s apart. Two fixes 30 s apart will show a tractor that went down and back an aisle as standing still.
With TinyGPS++ it’s two lines:
float kmh = gps.speed.kmph(); // already converted from knots
float hdg = gps.course.deg();
snprintf(buf, sizeof buf,
"{"lat":%.6f,"lng":%.6f,"speed_kmh":%.1f,"course_deg":%.0f}",
gps.location.lat(), gps.location.lng(), kmh, hdg);
Send them as numbers in the same message as lat/lng. Same message, same cost, so @roberts.r it’s a few bytes more, not another message. Then an alarm rule on speed_kmh > 15 with a debounce of 2 readings so one GPS jump doesn’t fire it.
If you ever do need something computed after the fact (distance per shift, say), that goes in the root flow before Save telemetry as a derived key.

