[feat](trx-rs): remove NOAA APT decoder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-28 23:21:32 +01:00
parent 804b0d8846
commit 0a60684e28
29 changed files with 33 additions and 1457 deletions
-2
View File
@@ -66,8 +66,6 @@ pub const AUDIO_MSG_VCHAN_BW: u8 = 0x13;
pub const AUDIO_MSG_FT4_DECODE: u8 = 0x14;
/// Server → client: FT2 decoded message (JSON `DecodedMessage::Ft2`).
pub const AUDIO_MSG_FT2_DECODE: u8 = 0x15;
/// Server → client: weather satellite APT image complete (JSON `DecodedMessage::WxsatImage`).
pub const AUDIO_MSG_WXSAT_IMAGE: u8 = 0x16;
/// Server → client: Meteor-M LRPT image complete (JSON `DecodedMessage::LrptImage`).
pub const AUDIO_MSG_LRPT_IMAGE: u8 = 0x17;
-36
View File
@@ -28,8 +28,6 @@ pub enum DecodedMessage {
Ft2(Ft8Message),
#[serde(rename = "wspr")]
Wspr(WsprMessage),
#[serde(rename = "wxsat_image")]
WxsatImage(WxsatImage),
#[serde(rename = "lrpt_image")]
LrptImage(LrptImage),
}
@@ -44,7 +42,6 @@ impl DecodedMessage {
Self::Cw(m) => m.rig_id = Some(id),
Self::Ft8(m) | Self::Ft4(m) | Self::Ft2(m) => m.rig_id = Some(id),
Self::Wspr(m) => m.rig_id = Some(id),
Self::WxsatImage(m) => m.rig_id = Some(id),
Self::LrptImage(m) => m.rig_id = Some(id),
}
}
@@ -58,7 +55,6 @@ impl DecodedMessage {
Self::Cw(m) => m.rig_id.as_deref(),
Self::Ft8(m) | Self::Ft4(m) | Self::Ft2(m) => m.rig_id.as_deref(),
Self::Wspr(m) => m.rig_id.as_deref(),
Self::WxsatImage(m) => m.rig_id.as_deref(),
Self::LrptImage(m) => m.rig_id.as_deref(),
}
}
@@ -211,38 +207,6 @@ pub struct Ft8Message {
pub message: String,
}
/// A completed weather satellite APT image, saved to disk as a PNG.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WxsatImage {
#[serde(skip_serializing_if = "Option::is_none")]
pub rig_id: Option<String>,
/// UTC timestamp (milliseconds since epoch) of pass start (first decoded line).
pub pass_start_ms: i64,
/// UTC timestamp (milliseconds since epoch) when the image was finalised.
pub pass_end_ms: i64,
/// Number of decoded image lines.
pub line_count: u32,
/// Absolute filesystem path to the saved PNG file.
pub path: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub ts_ms: Option<i64>,
/// Identified satellite (e.g. "NOAA-15", "NOAA-18", "NOAA-19").
#[serde(default, skip_serializing_if = "Option::is_none")]
pub satellite: Option<String>,
/// Sensor channel name for sub-channel A (e.g. "1-VIS", "2-NIR", "4-TIR").
#[serde(default, skip_serializing_if = "Option::is_none")]
pub channel_a: Option<String>,
/// Sensor channel name for sub-channel B.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub channel_b: Option<String>,
/// Geographic bounds `[south, west, north, east]` for map overlay.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub geo_bounds: Option<[f64; 4]>,
/// Ground track points `[[lat, lon], ...]` from SGP4 propagation.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub ground_track: Option<Vec<[f64; 2]>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WsprMessage {
#[serde(skip_serializing_if = "Option::is_none")]
+1 -1
View File
@@ -35,7 +35,7 @@ pub enum TleSource {
Unavailable,
}
/// Half-swath width in km for NOAA APT / Meteor LRPT imagery.
/// Half-swath width in km for Meteor LRPT imagery.
const SWATH_HALF_WIDTH_KM: f64 = 1400.0;
/// Earth radius in km (WGS84 mean).
-2
View File
@@ -31,7 +31,6 @@ pub enum RigCommand {
SetFt4DecodeEnabled(bool),
SetFt2DecodeEnabled(bool),
SetWsprDecodeEnabled(bool),
SetWxsatDecodeEnabled(bool),
SetLrptDecodeEnabled(bool),
ResetAprsDecoder,
ResetHfAprsDecoder,
@@ -40,7 +39,6 @@ pub enum RigCommand {
ResetFt4Decoder,
ResetFt2Decoder,
ResetWsprDecoder,
ResetWxsatDecoder,
ResetLrptDecoder,
SetBandwidth(u32),
SetSdrGain(f64),
@@ -520,9 +520,7 @@ pub fn command_from_rig_command(cmd: RigCommand) -> Box<dyn RigCommandHandler> {
| RigCommand::ResetFt4Decoder
| RigCommand::ResetFt2Decoder
| RigCommand::ResetWsprDecoder
| RigCommand::SetWxsatDecodeEnabled(_)
| RigCommand::SetLrptDecodeEnabled(_)
| RigCommand::ResetWxsatDecoder
| RigCommand::ResetLrptDecoder
| RigCommand::SetBandwidth(_)
| RigCommand::SetSdrGain(_)
+3 -11
View File
@@ -46,8 +46,6 @@ pub struct RigState {
#[serde(default)]
pub wspr_decode_enabled: bool,
#[serde(default)]
pub wxsat_decode_enabled: bool,
#[serde(default)]
pub lrpt_decode_enabled: bool,
#[serde(default)]
pub cw_auto: bool,
@@ -82,8 +80,6 @@ pub struct RigState {
#[serde(default, skip_serializing)]
pub wspr_decode_reset_seq: u64,
#[serde(default, skip_serializing)]
pub wxsat_decode_reset_seq: u64,
#[serde(default, skip_serializing)]
pub lrpt_decode_reset_seq: u64,
}
@@ -167,7 +163,7 @@ impl RigState {
ft4_decode_enabled: false,
ft2_decode_enabled: false,
wspr_decode_enabled: false,
wxsat_decode_enabled: false,
lrpt_decode_enabled: false,
cw_auto: true,
cw_wpm: 15,
@@ -182,7 +178,7 @@ impl RigState {
ft4_decode_reset_seq: 0,
ft2_decode_reset_seq: 0,
wspr_decode_reset_seq: 0,
wxsat_decode_reset_seq: 0,
lrpt_decode_reset_seq: 0,
}
}
@@ -243,7 +239,6 @@ impl RigState {
ft4_decode_enabled: snapshot.ft4_decode_enabled,
ft2_decode_enabled: snapshot.ft2_decode_enabled,
wspr_decode_enabled: snapshot.wspr_decode_enabled,
wxsat_decode_enabled: snapshot.wxsat_decode_enabled,
lrpt_decode_enabled: snapshot.lrpt_decode_enabled,
filter: snapshot.filter,
spectrum: None, // spectrum flows through /api/spectrum, not persistent state
@@ -255,7 +250,7 @@ impl RigState {
ft4_decode_reset_seq: 0,
ft2_decode_reset_seq: 0,
wspr_decode_reset_seq: 0,
wxsat_decode_reset_seq: 0,
lrpt_decode_reset_seq: 0,
}
}
@@ -294,7 +289,6 @@ impl RigState {
ft4_decode_enabled: self.ft4_decode_enabled,
ft2_decode_enabled: self.ft2_decode_enabled,
wspr_decode_enabled: self.wspr_decode_enabled,
wxsat_decode_enabled: self.wxsat_decode_enabled,
lrpt_decode_enabled: self.lrpt_decode_enabled,
filter: self.filter.clone(),
spectrum: self.spectrum.clone(),
@@ -507,8 +501,6 @@ pub struct RigSnapshot {
#[serde(default)]
pub wspr_decode_enabled: bool,
#[serde(default)]
pub wxsat_decode_enabled: bool,
#[serde(default)]
pub lrpt_decode_enabled: bool,
#[serde(default)]
pub cw_auto: bool,