Skip to content

SensorGnssSpectrum (UORB message)

GNSS spectrum analysis.

Reports a basic RF spectrum analysis for a GNSS receiver, decoded from the u-blox UBX-MON-SPAN message (enabled via the GPS_UBX_SPECTRUM parameter). Published by the gps driver (UBX protocol only), once per RF block, via the block-specific topics below. The center frequency of bin i is: f(i) = center_frequency + spectrum_span * (i - 127) / 256

TOPICS: sensor_gnss_spectrum_block0 sensor_gnss_spectrum_block1 sensor_gnss_spectrum_block2

Fields

NameTypeUnit [Frame]Range/EnumDescription
timestampuint64usTime since system start
timestamp_sampleuint64usTimestamp of the raw data
device_iduint32Unique device ID for the sensor that does not change between power cycles
block_iduint8Only used for multi-topic publishing. Use center_frequency to determine which RF band it is.
spectrumuint8[256](2^-2)dBSpectrum magnitude per bin (number of points = spectrum_span / resolution)
spectrum_spanuint32HzFrequency span covered by the spectrum
resolutionuint32HzFrequency resolution of the spectrum (bin width)
center_frequencyuint32HzCenter frequency of the spectrum span
programmable_gain_amplifieruint8dBProgrammable gain amplifier setting

Source Message

Source file (GitHub)

Click here to see original file
c
# GNSS spectrum analysis
#
# Reports a basic RF spectrum analysis for a GNSS receiver, decoded from the u-blox UBX-MON-SPAN
# message (enabled via the GPS_UBX_SPECTRUM parameter).
# Published by the `gps` driver (UBX protocol only), once per RF block, via the block-specific topics below.
# The center frequency of bin i is: f(i) = center_frequency + spectrum_span * (i - 127) / 256

uint64 timestamp # [us] Time since system start
uint64 timestamp_sample # [us] Timestamp of the raw data

uint32 device_id # Unique device ID for the sensor that does not change between power cycles

uint8 block_id # [-] Only used for multi-topic publishing. Use center_frequency to determine which RF band it is.

uint8[256] spectrum # [(2^-2)dB] Spectrum magnitude per bin (number of points = spectrum_span / resolution)
uint32 spectrum_span # [Hz] Frequency span covered by the spectrum
uint32 resolution # [Hz] Frequency resolution of the spectrum (bin width)
uint32 center_frequency # [Hz] Center frequency of the spectrum span
uint8 programmable_gain_amplifier # [dB] Programmable gain amplifier setting

# One topic per RF block ID
# TOPICS sensor_gnss_spectrum_block0 sensor_gnss_spectrum_block1 sensor_gnss_spectrum_block2