mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-05 00:46:00 +08:00
feat(bridge): map GPS position + true heading into telemetry
Bridge now sends latitude_deg/longitude_deg/heading_deg; map them to PLANE_LATITUDE/PLANE_LONGITUDE/PLANE_HEADING_DEGREES_TRUE so position and course land in the telemetry store and surface in /api/bridge/live. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,9 @@ function mapBridgeTelemetry(raw: Record<string, any>): FlightLabTelemetryState {
|
||||
ADF_STANDBY_FREQUENCY: raw.adf_standby_freq_hz ?? raw.ADF_STANDBY_FREQUENCY ?? 0,
|
||||
COM_ACTIVE_FREQUENCY: raw.com_active_frequency ?? raw.COM_ACTIVE_FREQUENCY ?? 0,
|
||||
COM_STANDBY_FREQUENCY: raw.com_standby_frequency ?? raw.COM_STANDBY_FREQUENCY ?? 0,
|
||||
PLANE_LATITUDE: raw.latitude_deg ?? raw.PLANE_LATITUDE ?? 0,
|
||||
PLANE_LONGITUDE: raw.longitude_deg ?? raw.PLANE_LONGITUDE ?? 0,
|
||||
PLANE_HEADING_DEGREES_TRUE: raw.heading_deg ?? raw.PLANE_HEADING_DEGREES_TRUE ?? 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ export interface FlightLabTelemetryState {
|
||||
ADF_STANDBY_FREQUENCY: number // Hz
|
||||
COM_ACTIVE_FREQUENCY?: number // MHz (e.g. 121.900), COM1 active radio
|
||||
COM_STANDBY_FREQUENCY?: number // MHz, COM1 standby radio
|
||||
PLANE_LATITUDE?: number // degrees, WGS84 (N+)
|
||||
PLANE_LONGITUDE?: number // degrees, WGS84 (E+)
|
||||
PLANE_HEADING_DEGREES_TRUE?: number // degrees, 0..360
|
||||
timestamp?: number
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user