Skip to content

Commit

Permalink
Update LBandConfig to add additonal fields and default values. (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
axlan authored Nov 17, 2023
2 parents e84f995 + 4c71d3a commit 1ead8a8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 19 deletions.
29 changes: 19 additions & 10 deletions python/fusion_engine_client/messages/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,28 +666,37 @@ class LBandConfig(NamedTuple):
@brief Configuration of the L-band demodulator parameters.
"""
## The center frequency of the L-band beam (Hz).
center_frequency_hz: float
center_frequency_hz: float = 1555492500.0

## The size of the signal acquisition search space (in Hz) around the center
## frequency.
##
## For example, a value of 6000 will search +/- 3 kHz around the center
## frequency.
search_window_hz: float
search_window_hz: float = 2000.0
## If `true`, only output data frames with the configured service ID.
## Otherwise, output all decoded frames.
filter_data_by_service_id: bool = True
## Enable/disable the descrambler. */
use_descrambler: bool = True
## Service ID of the provider.
pmp_service_id: int
## Data rate of the provider (bps).
pmp_data_rate_bps: int
pmp_service_id: int = 0x5555
## Unique word of the provider.
pmp_unique_word: int
pmp_unique_word: int = 0xE15AE893E15AE893
## Data rate of the provider (bps).
pmp_data_rate_bps: int = 4800
## The initialization value for the descrambling vector.
descrambler_init: int = 0x6969

LBandConfigConstruct = Struct(
"center_frequency_hz" / Float32l,
"center_frequency_hz" / Float64l,
"search_window_hz" / Float32l,
"pmp_service_id" / Int32ul,
"filter_data_by_service_id" / Flag,
"use_descrambler" / Flag,
"pmp_service_id" / Int16ul,
"pmp_unique_word" / Int64ul,
"pmp_data_rate_bps" / Int16ul,
Padding(2),
"pmp_unique_word" / Int32ul,
"descrambler_init" / Int16ul,
)

class Empty(NamedTuple):
Expand Down
30 changes: 21 additions & 9 deletions src/point_one/fusion_engine/messages/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1439,8 +1439,10 @@ struct P1_ALIGNAS(4) TroposphereConfig {
* @ingroup config_and_ctrl_messages
*/
struct P1_ALIGNAS(4) LBandConfig {
/** The center frequency of the L-band beam (Hz). */
float center_frequency_hz = NAN;
/**
* The center frequency of the L-band beam (Hz).
*/
double center_frequency_hz = 1555492500.0;

/**
* The size of the signal acquisition search space (in Hz) around the center
Expand All @@ -1449,18 +1451,28 @@ struct P1_ALIGNAS(4) LBandConfig {
* For example, a value of 6000 will search +/- 3 kHz around the center
* frequency.
*/
float search_window_hz = NAN;
float search_window_hz = 2000.0;

/** Service ID of the provider. */
uint32_t pmp_service_id = 0;
/**
* If `true`, only output data frames with the configured service ID.
* Otherwise, output all decoded frames.
*/
bool filter_data_by_service_id = true;

/** Data rate of the provider (bps). */
uint16_t pmp_data_rate_bps = 0;
/** Enable/disable the descrambler. */
bool use_descrambler = true;

uint8_t reserved[2] = {0};
/** Service ID of the provider. */
uint16_t pmp_service_id = 0x5555;

/** Unique word of the provider. */
uint32_t pmp_unique_word = 0;
uint64_t pmp_unique_word = 0xE15AE893E15AE893ull;

/** Data rate of the provider (bps). */
uint16_t pmp_data_rate_bps = 4800;

/** The initialization value for the descrambling vector. */
uint16_t descrambler_init = 0x6969;
};

/** @} */
Expand Down

0 comments on commit 1ead8a8

Please sign in to comment.