Also parse the extras from the comment field
This commit is contained in:
@@ -57,7 +57,7 @@ export enum DataType {
|
||||
ThirdParty = "}",
|
||||
|
||||
// Invalid/Test Data
|
||||
InvalidOrTest = ",",
|
||||
InvalidOrTest = ","
|
||||
}
|
||||
|
||||
export interface ISymbol {
|
||||
@@ -77,12 +77,39 @@ export interface IPosition {
|
||||
course?: number; // Course in degrees
|
||||
symbol?: ISymbol;
|
||||
comment?: string;
|
||||
/**
|
||||
* Optional reported radio range in miles (from RNG token in comment)
|
||||
*/
|
||||
range?: number;
|
||||
/**
|
||||
* Optional power/height/gain information from PHG token
|
||||
* PHG format: PHGpphhgg (pp=power, hh=height, gg=gain) as numeric values
|
||||
*/
|
||||
phg?: IPowerHeightGain;
|
||||
/** Direction-finding / DF information parsed from comment tokens */
|
||||
dfs?: IDirectionFinding;
|
||||
|
||||
toString(): string; // Return combined position representation (e.g., "lat,lon,alt")
|
||||
toCompressed?(): CompressedPosition; // Optional method to convert to compressed format
|
||||
distanceTo?(other: IPosition): number; // Optional method to calculate distance to another position
|
||||
}
|
||||
|
||||
export interface IPowerHeightGain {
|
||||
power?: number; // Transmit power in watts
|
||||
height?: number; // Antenna height in meters
|
||||
gain?: number; // Antenna gain in dBi
|
||||
directivity?: number | "omni" | "unknown"; // Optional directivity pattern (numeric code or "omni")
|
||||
}
|
||||
|
||||
export interface IDirectionFinding {
|
||||
bearing?: number; // Direction finding bearing in degrees
|
||||
strength?: number; // Relative signal strength (0-9)
|
||||
height?: number; // Antenna height in meters
|
||||
gain?: number; // Antenna gain in dBi
|
||||
quality?: number; // Signal quality or other metric (0-9)
|
||||
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)
|
||||
@@ -197,12 +224,7 @@ export interface QueryPayload {
|
||||
target?: string; // Target callsign or area
|
||||
}
|
||||
|
||||
export type TelemetryVariant =
|
||||
| "data"
|
||||
| "parameters"
|
||||
| "unit"
|
||||
| "coefficients"
|
||||
| "bitsense";
|
||||
export type TelemetryVariant = "data" | "parameters" | "unit" | "coefficients" | "bitsense";
|
||||
|
||||
// Telemetry Data Payload
|
||||
export interface TelemetryDataPayload {
|
||||
|
||||
Reference in New Issue
Block a user