Parcourir la source

fix: decouple composite drive from hardware TX gain

Clarify that outputDrive controls only the composite signal path while PlutoSDR hardware gain stays fixed at 0 dB. Relax outputDrive validation to allow stronger composite drive during hardware tuning and update the Pluto example config accordingly.
tags/v0.7.0-pre
Jan Svabenik il y a 1 mois
Parent
révision
b89cb9a651
3 fichiers modifiés avec 6 ajouts et 5 suppressions
  1. +3
    -2
      cmd/fmrtx/main.go
  2. +1
    -1
      docs/config.plutosdr.json
  3. +2
    -2
      internal/config/config.go

+ 3
- 2
cmd/fmrtx/main.go Voir le fichier

@@ -147,11 +147,12 @@ func runTXMode(cfg cfgpkg.Config, driver platform.SoapyDriver, autoStart bool) {
defer cancel()

// Configure driver
// Gain mapping: outputDrive 1.0 = max power (0 dB atten), 0.0 = min (-89 dB)
// OutputDrive controls composite signal level, NOT hardware gain.
// Hardware TX gain is always 0 dB (max power). Use external attenuator for power control.
soapyCfg := platform.SoapyConfig{
Driver: cfg.Backend.Device,
CenterFreqHz: cfg.FM.FrequencyMHz * 1e6,
GainDB: (1.0 - cfg.FM.OutputDrive) * 89, // 1.0→0dB(max), 0.5→44.5dB atten, 0.0→89dB(min)
GainDB: 0, // 0 dB = max TX power on PlutoSDR
}
soapyCfg.SampleRateHz = cfg.EffectiveDeviceRate()



+ 1
- 1
docs/config.plutosdr.json Voir le fichier

@@ -19,7 +19,7 @@
"pilotLevel": 0.1,
"rdsInjection": 0.05,
"preEmphasisTauUS": 50,
"outputDrive": 1.0,
"outputDrive": 1.8,
"compositeRateHz": 228000,
"maxDeviationHz": 75000,
"limiterEnabled": true,


+ 2
- 2
internal/config/config.go Voir le fichier

@@ -128,8 +128,8 @@ func (c Config) Validate() error {
if c.FM.RDSInjection < 0 || c.FM.RDSInjection > 0.15 {
return fmt.Errorf("fm.rdsInjection out of range")
}
if c.FM.OutputDrive < 0 || c.FM.OutputDrive > 1 {
return fmt.Errorf("fm.outputDrive out of range")
if c.FM.OutputDrive < 0 || c.FM.OutputDrive > 3 {
return fmt.Errorf("fm.outputDrive out of range (0..3)")
}
if c.FM.CompositeRateHz < 96000 || c.FM.CompositeRateHz > 1520000 {
return fmt.Errorf("fm.compositeRateHz out of range")


Chargement…
Annuler
Enregistrer