Added support for !DAO! marker parsing
This commit is contained in:
@@ -106,6 +106,7 @@ export interface IPosition {
|
||||
range?: number; // Kilometers
|
||||
phg?: IPowerHeightGain;
|
||||
dfs?: IDirectionFinding;
|
||||
dao?: IDAO; // Optional DAO fields for added position precision
|
||||
symbol?: ISymbol;
|
||||
comment?: string;
|
||||
|
||||
@@ -114,6 +115,17 @@ export interface IPosition {
|
||||
distanceTo?(other: IPosition): number; // Optional method to calculate distance to another position
|
||||
}
|
||||
|
||||
export interface ITimestamp {
|
||||
day?: number; // Day of month (DHM format)
|
||||
month?: number; // Month (MDHM format)
|
||||
hours: number;
|
||||
minutes: number;
|
||||
seconds?: number;
|
||||
format: "DHM" | "HMS" | "MDHM"; // Day-Hour-Minute, Hour-Minute-Second, Month-Day-Hour-Minute
|
||||
zulu?: boolean; // Is UTC/Zulu time
|
||||
toDate(): Date; // Convert to Date object respecting timezone
|
||||
}
|
||||
|
||||
export interface IPowerHeightGain {
|
||||
power?: number; // Transmit power in watts
|
||||
height?: number; // Antenna height in meters
|
||||
@@ -130,23 +142,19 @@ export interface IDirectionFinding {
|
||||
directivity?: number | "omni" | "unknown"; // Optional directivity pattern (numeric code or "omni")
|
||||
}
|
||||
|
||||
export interface ITimestamp {
|
||||
day?: number; // Day of month (DHM format)
|
||||
month?: number; // Month (MDHM format)
|
||||
hours: number;
|
||||
minutes: number;
|
||||
seconds?: number;
|
||||
format: "DHM" | "HMS" | "MDHM"; // Day-Hour-Minute, Hour-Minute-Second, Month-Day-Hour-Minute
|
||||
zulu?: boolean; // Is UTC/Zulu time
|
||||
toDate(): Date; // Convert to Date object respecting timezone
|
||||
}
|
||||
|
||||
export interface ITelemetry {
|
||||
sequence: number;
|
||||
analog: number[];
|
||||
digital?: number;
|
||||
}
|
||||
|
||||
export interface IDAO {
|
||||
datum_id?: string; // Geodetic datum identifier (e.g., "W84" for WGS84)
|
||||
resolution?: number; // DAO resolution (0-3)
|
||||
latitude?: number; // Added latitude precision
|
||||
longitude?: number; // Added longitude precision
|
||||
}
|
||||
|
||||
// Position Report Payload
|
||||
export interface PositionPayload {
|
||||
type:
|
||||
@@ -158,6 +166,7 @@ export interface PositionPayload {
|
||||
timestamp?: ITimestamp;
|
||||
position: IPosition;
|
||||
messaging: boolean; // Whether APRS messaging is enabled
|
||||
dao?: IDAO; // Optional DAO fields for added position precision
|
||||
micE?: {
|
||||
messageType?: string;
|
||||
isStandard?: boolean;
|
||||
@@ -224,6 +233,7 @@ export interface ObjectPayload {
|
||||
timestamp: ITimestamp;
|
||||
alive: boolean; // True if object is active, false if killed
|
||||
position: IPosition;
|
||||
dao?: IDAO; // Optional DAO fields for added position precision
|
||||
course?: number;
|
||||
speed?: number;
|
||||
}
|
||||
@@ -235,6 +245,7 @@ export interface ItemPayload {
|
||||
name: string; // 3-9 character item name
|
||||
alive: boolean; // True if item is active, false if killed
|
||||
position: IPosition;
|
||||
dao?: IDAO; // Optional DAO fields for added position precision
|
||||
}
|
||||
|
||||
// Status Payload
|
||||
@@ -244,6 +255,7 @@ export interface StatusPayload {
|
||||
timestamp?: ITimestamp;
|
||||
text: string;
|
||||
maidenhead?: string; // Optional Maidenhead grid locator
|
||||
dao?: IDAO; // Optional DAO fields for added position precision
|
||||
symbol?: {
|
||||
table: string;
|
||||
code: string;
|
||||
@@ -306,6 +318,7 @@ export interface WeatherPayload {
|
||||
type: DataType.WeatherReportNoPosition;
|
||||
timestamp?: ITimestamp;
|
||||
position?: IPosition;
|
||||
dao?: IDAO; // Optional DAO fields for added position precision
|
||||
windDirection?: number; // Degrees
|
||||
windSpeed?: number; // MPH
|
||||
windGust?: number; // MPH
|
||||
@@ -411,4 +424,5 @@ export interface Extras {
|
||||
spd?: number;
|
||||
fields?: Field[];
|
||||
telemetry?: ITelemetry;
|
||||
dao?: IDAO; // Optional DAO fields for added position precision
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user