Wideband autonomous SDR analysis engine forked from sdr-visual-suite
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

28 lignes
1004B

  1. package main
  2. import (
  3. "fmt"
  4. "sdr-wideband-suite/internal/demod/gpudemod"
  5. "sdr-wideband-suite/internal/telemetry"
  6. )
  7. func observeStreamingResult(coll *telemetry.Collector, prefix string, res gpudemod.StreamingExtractResult) {
  8. if coll == nil {
  9. return
  10. }
  11. tags := telemetry.TagsFromPairs("signal_id", fmt.Sprintf("%d", res.SignalID), "path", prefix)
  12. coll.SetGauge(prefix+".n_out", float64(res.NOut), tags)
  13. coll.SetGauge(prefix+".phase_count", float64(res.PhaseCount), tags)
  14. coll.SetGauge(prefix+".history_len", float64(res.HistoryLen), tags)
  15. coll.SetGauge(prefix+".rate", float64(res.Rate), tags)
  16. coll.SetGauge(prefix+".output_len", float64(len(res.IQ)), tags)
  17. if len(res.IQ) > 0 {
  18. stats := computeIQHeadStats(res.IQ, 64)
  19. coll.Observe(prefix+".head_mean_mag", stats.meanMag, tags)
  20. coll.Observe(prefix+".head_max_step", stats.maxStep, tags)
  21. coll.Observe(prefix+".head_p95_step", stats.p95Step, tags)
  22. coll.SetGauge(prefix+".head_low_magnitude_count", float64(stats.lowMag), tags)
  23. }
  24. }