Add live transmitter position (status) alongside logged points
devices/<serial>/log messages now carry a "type": "log" or "status". "log" persists a LocatePoint as before; "status" carries the same position + telemetry shape but is broadcast live over the job's realtime channel without touching locate_points — it's a current- position update, not a recorded point. The job map renders the latest status as a blue "you are here" marker (with a soft accuracy-radius halo) that moves in place as new updates arrive, separate from the colored polyline of logged points. Clicking it shows the same detail readout as a logged point. The simulator gained a message-type toggle (Log point / Status update) so both paths can be exercised from /sim. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
import { IsNotEmpty, IsString, MaxLength } from 'class-validator';
|
||||
import { MqttPointDto } from '../../ingest/dto/mqtt-messages.dto';
|
||||
import { MqttLogMessageDto } from '../../ingest/dto/mqtt-messages.dto';
|
||||
|
||||
// What the simulator UI sends the backend. Mirrors a devices/<serial>/log
|
||||
// payload plus the two fields that live in the topic/routing rather than the
|
||||
// wire payload itself (serial, jobId) so this DTO doubles as validation for
|
||||
// both the REST call and the outgoing MQTT message.
|
||||
export class SimPublishPointDto extends MqttPointDto {
|
||||
// What the simulator UI sends the backend: a devices/<serial>/log payload
|
||||
// (type: "log" persists a point, "status" is a live-only position update)
|
||||
// plus "serial", which lives in the topic rather than the wire payload.
|
||||
export class SimPublishPointDto extends MqttLogMessageDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(64)
|
||||
serial: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
jobId: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user