Browse Source

Emit carrier frequency offset as JSON

chirpmodem-v8.0.0
jvn314 1 month ago
parent
commit
55e21d2dbf
  1. 2
      plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp
  2. 2
      plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp

2
plugins/channelrx/demodmeshtastic/meshtasticdemod.cpp

@ -601,6 +601,8 @@ QString MeshtasticDemod::buildMeshtasticJsonPacket( @@ -601,6 +601,8 @@ QString MeshtasticDemod::buildMeshtasticJsonPacket(
rf["signal_db"] = msg.getSingalDb();
rf["noise_db"] = msg.getNoiseDb();
rf["snr_db"] = msg.getSingalDb() - msg.getNoiseDb();
// Emit the carrier frequency offset in Hz rounded to two decimal places.
rf["cfoHz"] = std::round(msg.getCfoHz() * 100.0) / 100.0;
root["rf"] = rf;
// LoRa

2
plugins/channelrx/demodmeshtastic/meshtasticdemoddecoder.cpp

@ -362,6 +362,8 @@ bool MeshtasticDemodDecoder::handleMessage(const Message& cmd) @@ -362,6 +362,8 @@ bool MeshtasticDemodDecoder::handleMessage(const Message& cmd)
outputMsg->setSyncWord(msgSyncWord);
outputMsg->setSignalDb(msgSignalDb);
outputMsg->setNoiseDb(msgNoiseDb);
// Forward this frame's carrier frequency offset to the decode report.
outputMsg->setCfoHz(msg.getCfoHz());
outputMsg->setMsgTimestamp(msgTimestamp);
outputMsg->setPacketSize(getPacketLength());
outputMsg->setNbParityBits(getNbParityBits());

Loading…
Cancel
Save