#pragma once // Requires: nlohmann/json (header-only), libcurl #include #include #include #include #include #include #include namespace sigtera { enum class DataType { iq, spectrogram }; inline std::string to_string(DataType v) { switch (v) { case DataType::iq: return "iq"; case DataType::spectrogram: return "spectrogram"; } return ""; } enum class Format { blue, matlab, raw, sigmf, vita49, wav }; inline std::string to_string(Format v) { switch (v) { case Format::blue: return "blue"; case Format::matlab: return "matlab"; case Format::raw: return "raw"; case Format::sigmf: return "sigmf"; case Format::vita49: return "vita49"; case Format::wav: return "wav"; } return ""; } enum class Precision { float32, float64, int16, int8 }; inline std::string to_string(Precision v) { switch (v) { case Precision::float32: return "float32"; case Precision::float64: return "float64"; case Precision::int16: return "int16"; case Precision::int8: return "int8"; } return ""; } enum class FrontEnd { front_end }; inline std::string to_string(FrontEnd v) { switch (v) { case FrontEnd::front_end: return "front_end"; } return ""; } enum class SelfInterferenceCancelation { True, False }; inline std::string to_string(SelfInterferenceCancelation v) { switch (v) { case SelfInterferenceCancelation::True: return "True"; case SelfInterferenceCancelation::False: return "False"; } return ""; } enum class Signal { acars, acars_group, acars_transmitter, adsb, adsb_group, adsb_transmitter, ais_group, ais_message, ais_transmitter, am, am_group, aprs, aprs_group, aprs_transmitter, apsk, ask, ble, ble_group, ble_transmitter, chirp, cpfsk, dmr, dmr_group, dmr_transmitter, dpsk, dqpsk, dsss, fhss, fm, fm_group, fsk, gfsk, gmsk, gps, gps_group, gsm, gsm_group, gsm_transmitter, iridium, iridium_group, iridium_handset, iridium_satellite, lora, lorawan, lorawan_group, lorawan_transmitter, meshcore, meshcore_group, meshcore_transmitter, meshtastic, meshtastic_group, meshtastic_transmitter, msk, ofdm, ook, p25, p25_group, p25_transmitter, pam, psk, qam, tetra, tetra_group, tetra_transmitter, tone, wifi, wifi_group, wifi_transmitter, zigbee, zigbee_group, zigbee_transmitter }; inline std::string to_string(Signal v) { switch (v) { case Signal::acars: return "acars"; case Signal::acars_group: return "acars_group"; case Signal::acars_transmitter: return "acars_transmitter"; case Signal::adsb: return "adsb"; case Signal::adsb_group: return "adsb_group"; case Signal::adsb_transmitter: return "adsb_transmitter"; case Signal::ais_group: return "ais_group"; case Signal::ais_message: return "ais_message"; case Signal::ais_transmitter: return "ais_transmitter"; case Signal::am: return "am"; case Signal::am_group: return "am_group"; case Signal::aprs: return "aprs"; case Signal::aprs_group: return "aprs_group"; case Signal::aprs_transmitter: return "aprs_transmitter"; case Signal::apsk: return "apsk"; case Signal::ask: return "ask"; case Signal::ble: return "ble"; case Signal::ble_group: return "ble_group"; case Signal::ble_transmitter: return "ble_transmitter"; case Signal::chirp: return "chirp"; case Signal::cpfsk: return "cpfsk"; case Signal::dmr: return "dmr"; case Signal::dmr_group: return "dmr_group"; case Signal::dmr_transmitter: return "dmr_transmitter"; case Signal::dpsk: return "dpsk"; case Signal::dqpsk: return "dqpsk"; case Signal::dsss: return "dsss"; case Signal::fhss: return "fhss"; case Signal::fm: return "fm"; case Signal::fm_group: return "fm_group"; case Signal::fsk: return "fsk"; case Signal::gfsk: return "gfsk"; case Signal::gmsk: return "gmsk"; case Signal::gps: return "gps"; case Signal::gps_group: return "gps_group"; case Signal::gsm: return "gsm"; case Signal::gsm_group: return "gsm_group"; case Signal::gsm_transmitter: return "gsm_transmitter"; case Signal::iridium: return "iridium"; case Signal::iridium_group: return "iridium_group"; case Signal::iridium_handset: return "iridium_handset"; case Signal::iridium_satellite: return "iridium_satellite"; case Signal::lora: return "lora"; case Signal::lorawan: return "lorawan"; case Signal::lorawan_group: return "lorawan_group"; case Signal::lorawan_transmitter: return "lorawan_transmitter"; case Signal::meshcore: return "meshcore"; case Signal::meshcore_group: return "meshcore_group"; case Signal::meshcore_transmitter: return "meshcore_transmitter"; case Signal::meshtastic: return "meshtastic"; case Signal::meshtastic_group: return "meshtastic_group"; case Signal::meshtastic_transmitter: return "meshtastic_transmitter"; case Signal::msk: return "msk"; case Signal::ofdm: return "ofdm"; case Signal::ook: return "ook"; case Signal::p25: return "p25"; case Signal::p25_group: return "p25_group"; case Signal::p25_transmitter: return "p25_transmitter"; case Signal::pam: return "pam"; case Signal::psk: return "psk"; case Signal::qam: return "qam"; case Signal::tetra: return "tetra"; case Signal::tetra_group: return "tetra_group"; case Signal::tetra_transmitter: return "tetra_transmitter"; case Signal::tone: return "tone"; case Signal::wifi: return "wifi"; case Signal::wifi_group: return "wifi_group"; case Signal::wifi_transmitter: return "wifi_transmitter"; case Signal::zigbee: return "zigbee"; case Signal::zigbee_group: return "zigbee_group"; case Signal::zigbee_transmitter: return "zigbee_transmitter"; } return ""; } enum class MessageType { airborne_position, airborne_velocity, aircraft_identification, surface_position }; inline std::string to_string(MessageType v) { switch (v) { case MessageType::airborne_position: return "airborne_position"; case MessageType::airborne_velocity: return "airborne_velocity"; case MessageType::aircraft_identification: return "aircraft_identification"; case MessageType::surface_position: return "surface_position"; } return ""; } enum class FlightPhase { airborne, surface }; inline std::string to_string(FlightPhase v) { switch (v) { case FlightPhase::airborne: return "airborne"; case FlightPhase::surface: return "surface"; } return ""; } enum class StationType { aton, base_station, class_a, class_b, sar_aircraft }; inline std::string to_string(StationType v) { switch (v) { case StationType::aton: return "aton"; case StationType::base_station: return "base_station"; case StationType::class_a: return "class_a"; case StationType::class_b: return "class_b"; case StationType::sar_aircraft: return "sar_aircraft"; } return ""; } enum class Message { multitone, random, tone }; inline std::string to_string(Message v) { switch (v) { case Message::multitone: return "multitone"; case Message::random: return "random"; case Message::tone: return "tone"; } return ""; } enum class Sideband { dsb, dsb_sc, usb, lsb }; inline std::string to_string(Sideband v) { switch (v) { case Sideband::dsb: return "dsb"; case Sideband::dsb_sc: return "dsb_sc"; case Sideband::usb: return "usb"; case Sideband::lsb: return "lsb"; } return ""; } enum class InfoType { message, position, raw, status }; inline std::string to_string(InfoType v) { switch (v) { case InfoType::message: return "message"; case InfoType::position: return "position"; case InfoType::raw: return "raw"; case InfoType::status: return "status"; } return ""; } enum class StationKind { digipeater, home, igate, mobile }; inline std::string to_string(StationKind v) { switch (v) { case StationKind::digipeater: return "digipeater"; case StationKind::home: return "home"; case StationKind::igate: return "igate"; case StationKind::mobile: return "mobile"; } return ""; } enum class PduType { adv_direct_ind, adv_ind, adv_nonconn_ind, scan_rsp }; inline std::string to_string(PduType v) { switch (v) { case PduType::adv_direct_ind: return "adv_direct_ind"; case PduType::adv_ind: return "adv_ind"; case PduType::adv_nonconn_ind: return "adv_nonconn_ind"; case PduType::scan_rsp: return "scan_rsp"; } return ""; } enum class AddressType { public_, random }; inline std::string to_string(AddressType v) { switch (v) { case AddressType::public_: return "public"; case AddressType::random: return "random"; } return ""; } enum class AdvertisingType { beacon, connectable, directed }; inline std::string to_string(AdvertisingType v) { switch (v) { case AdvertisingType::beacon: return "beacon"; case AdvertisingType::connectable: return "connectable"; case AdvertisingType::directed: return "directed"; } return ""; } enum class Waveform { barker, fmcw_sawtooth, fmcw_triangle, linear }; inline std::string to_string(Waveform v) { switch (v) { case Waveform::barker: return "barker"; case Waveform::fmcw_sawtooth: return "fmcw_sawtooth"; case Waveform::fmcw_triangle: return "fmcw_triangle"; case Waveform::linear: return "linear"; } return ""; } enum class Direction { up, down }; inline std::string to_string(Direction v) { switch (v) { case Direction::up: return "up"; case Direction::down: return "down"; } return ""; } enum class Content { voice, embedded, data }; inline std::string to_string(Content v) { switch (v) { case Content::voice: return "voice"; case Content::embedded: return "embedded"; case Content::data: return "data"; } return ""; } enum class Sequence { barker_11, barker_13, barker_2, barker_3, barker_4, barker_5, barker_7, custom, gold_127, gold_31, gold_63, mseq_127, mseq_15, mseq_31, mseq_63, mseq_7 }; inline std::string to_string(Sequence v) { switch (v) { case Sequence::barker_11: return "barker_11"; case Sequence::barker_13: return "barker_13"; case Sequence::barker_2: return "barker_2"; case Sequence::barker_3: return "barker_3"; case Sequence::barker_4: return "barker_4"; case Sequence::barker_5: return "barker_5"; case Sequence::barker_7: return "barker_7"; case Sequence::custom: return "custom"; case Sequence::gold_127: return "gold_127"; case Sequence::gold_31: return "gold_31"; case Sequence::gold_63: return "gold_63"; case Sequence::mseq_127: return "mseq_127"; case Sequence::mseq_15: return "mseq_15"; case Sequence::mseq_31: return "mseq_31"; case Sequence::mseq_63: return "mseq_63"; case Sequence::mseq_7: return "mseq_7"; } return ""; } enum class BaseModulation { apsk, ask, cpfsk, dpsk, dqpsk, fsk, gfsk, gmsk, msk, ook, pam, psk, qam }; inline std::string to_string(BaseModulation v) { switch (v) { case BaseModulation::apsk: return "apsk"; case BaseModulation::ask: return "ask"; case BaseModulation::cpfsk: return "cpfsk"; case BaseModulation::dpsk: return "dpsk"; case BaseModulation::dqpsk: return "dqpsk"; case BaseModulation::fsk: return "fsk"; case BaseModulation::gfsk: return "gfsk"; case BaseModulation::gmsk: return "gmsk"; case BaseModulation::msk: return "msk"; case BaseModulation::ook: return "ook"; case BaseModulation::pam: return "pam"; case BaseModulation::psk: return "psk"; case BaseModulation::qam: return "qam"; } return ""; } enum class HopPattern { custom, random, sequential }; inline std::string to_string(HopPattern v) { switch (v) { case HopPattern::custom: return "custom"; case HopPattern::random: return "random"; case HopPattern::sequential: return "sequential"; } return ""; } enum class BurstType { normal, fcch, sch, dummy }; inline std::string to_string(BurstType v) { switch (v) { case BurstType::normal: return "normal"; case BurstType::fcch: return "fcch"; case BurstType::sch: return "sch"; case BurstType::dummy: return "dummy"; } return ""; } enum class Activity { sbd, voice }; inline std::string to_string(Activity v) { switch (v) { case Activity::sbd: return "sbd"; case Activity::voice: return "voice"; } return ""; } enum class LowDataRateOptimize { auto_, on, off }; inline std::string to_string(LowDataRateOptimize v) { switch (v) { case LowDataRateOptimize::auto_: return "auto"; case LowDataRateOptimize::on: return "on"; case LowDataRateOptimize::off: return "off"; } return ""; } enum class Protocol { lorawan, meshcore, meshtastic, raw }; inline std::string to_string(Protocol v) { switch (v) { case Protocol::lorawan: return "lorawan"; case Protocol::meshcore: return "meshcore"; case Protocol::meshtastic: return "meshtastic"; case Protocol::raw: return "raw"; } return ""; } enum class Region { eu868, us915 }; inline std::string to_string(Region v) { switch (v) { case Region::eu868: return "eu868"; case Region::us915: return "us915"; } return ""; } enum class Duid { voice_ldu1, voice_ldu2, header, terminator, tsbk }; inline std::string to_string(Duid v) { switch (v) { case Duid::voice_ldu1: return "voice_ldu1"; case Duid::voice_ldu2: return "voice_ldu2"; case Duid::header: return "header"; case Duid::terminator: return "terminator"; case Duid::tsbk: return "tsbk"; } return ""; } enum class DeviceRole { end_device, router }; inline std::string to_string(DeviceRole v) { switch (v) { case DeviceRole::end_device: return "end_device"; case DeviceRole::router: return "router"; } return ""; } enum class MessageType2 { msg14_safety_broadcast, msg18_position_report_class_b, msg1_position_report, msg21_aid_to_navigation, msg24_static_data, msg27_long_range_broadcast, msg28_aid_to_navigation_single_slot, msg2_assigned_position_report, msg3_special_position_report, msg4_base_station_report, msg5_static_voyage, msg9_sar_aircraft_position }; inline std::string to_string(MessageType2 v) { switch (v) { case MessageType2::msg14_safety_broadcast: return "msg14_safety_broadcast"; case MessageType2::msg18_position_report_class_b: return "msg18_position_report_class_b"; case MessageType2::msg1_position_report: return "msg1_position_report"; case MessageType2::msg21_aid_to_navigation: return "msg21_aid_to_navigation"; case MessageType2::msg24_static_data: return "msg24_static_data"; case MessageType2::msg27_long_range_broadcast: return "msg27_long_range_broadcast"; case MessageType2::msg28_aid_to_navigation_single_slot: return "msg28_aid_to_navigation_single_slot"; case MessageType2::msg2_assigned_position_report: return "msg2_assigned_position_report"; case MessageType2::msg3_special_position_report: return "msg3_special_position_report"; case MessageType2::msg4_base_station_report: return "msg4_base_station_report"; case MessageType2::msg5_static_voyage: return "msg5_static_voyage"; case MessageType2::msg9_sar_aircraft_position: return "msg9_sar_aircraft_position"; } return ""; } enum class Channel { duplex, simplex }; inline std::string to_string(Channel v) { switch (v) { case Channel::duplex: return "duplex"; case Channel::simplex: return "simplex"; } return ""; } enum class DuplexDirection { downlink, uplink }; inline std::string to_string(DuplexDirection v) { switch (v) { case DuplexDirection::downlink: return "downlink"; case DuplexDirection::uplink: return "uplink"; } return ""; } enum class DuplexDlType { da, ip, sy, vo }; inline std::string to_string(DuplexDlType v) { switch (v) { case DuplexDlType::da: return "da"; case DuplexDlType::ip: return "ip"; case DuplexDlType::sy: return "sy"; case DuplexDlType::vo: return "vo"; } return ""; } enum class DaSource { file, random, text }; inline std::string to_string(DaSource v) { switch (v) { case DaSource::file: return "file"; case DaSource::random: return "random"; case DaSource::text: return "text"; } return ""; } enum class DuplexUlType { aq, da, ip, sy, vo }; inline std::string to_string(DuplexUlType v) { switch (v) { case DuplexUlType::aq: return "aq"; case DuplexUlType::da: return "da"; case DuplexUlType::ip: return "ip"; case DuplexUlType::sy: return "sy"; case DuplexUlType::vo: return "vo"; } return ""; } enum class SimplexType { bc, ms, ra, tl }; inline std::string to_string(SimplexType v) { switch (v) { case SimplexType::bc: return "bc"; case SimplexType::ms: return "ms"; case SimplexType::ra: return "ra"; case SimplexType::tl: return "tl"; } return ""; } struct _ReceiverBase { virtual nlohmann::json to_json() const = 0; virtual ~_ReceiverBase() = default; }; struct BcAcars { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; std::string center_frequency = "131550000, 130025000, 130425000, 130450000, 136700000, 136800000"; double baud = 2400; int samples_per_symbol = 8; std::string registration = ".N123SG"; std::string acars_mode = "2"; std::string label = "H1"; std::string block_id = "1"; std::string text = "POS N37.6W122.4/ALT350/SIGTERA"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "acars"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["registration"] = registration; j["acars_mode"] = acars_mode; j["label"] = label; j["block_id"] = block_id; j["text"] = text; return j; } }; struct BcAdsb { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; MessageType message_type = MessageType::aircraft_identification; std::string icao = "4840D6"; double latitude = 37.7749; double longitude = -122.4194; int altitude = 38000; int surveillance_status = 0; double ground_speed = 450; double track = 90.0; int vertical_rate = 0; std::string callsign = "SIGTERA1"; int category = 0; double movement = 15.0; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "adsb"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["message_type"] = to_string(message_type); j["icao"] = icao; j["latitude"] = latitude; j["longitude"] = longitude; j["altitude"] = altitude; j["surveillance_status"] = surveillance_status; j["ground_speed"] = ground_speed; j["track"] = track; j["vertical_rate"] = vertical_rate; j["callsign"] = callsign; j["category"] = category; j["movement"] = movement; return j; } }; struct BcAis_message { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; std::string center_frequency = "161975000, 162025000"; double baud = 9600; int samples_per_symbol = 8; double BT = 0.4; MessageType2 message_type = MessageType2::msg1_position_report; int mmsi = 338000001; std::string text = "ALL CLEAR"; double lat = 37.7749; double lon = -122.4194; double speed = 0.0; double course = 0.0; int heading = 511; int status = 0; int rot = -128; std::string name = "BUOY"; int aid_type = 1; int repeat = 0; int accuracy = 0; int to_bow = 0; int to_stern = 0; int to_port = 0; int to_starboard = 0; int epfd = 0; int second = 60; int off_position = 0; int reserved_1 = 0; int raim = 0; int virtual_aid = 0; int assigned = 0; std::string name_ext = ""; std::string shipname = "SIGTERA"; std::string callsign = "KXYZ"; int ship_type = 0; int station_type = 1; int restricted = 0; int iala_mrn = 0; int dimension = 0; int dimensions_a = 0; int dimensions_b = 0; int dimension_additional_data = 0; int charted_status = 0; int station_status = 0; int status_bits = 0; int auth = 0; int imo = 0; int month = 0; int day = 0; int hour = 24; int minute = 60; double draught = 5.0; std::string destination = ""; int alt = 1000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ais_message"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["message_type"] = to_string(message_type); j["mmsi"] = mmsi; j["text"] = text; j["lat"] = lat; j["lon"] = lon; j["speed"] = speed; j["course"] = course; j["heading"] = heading; j["status"] = status; j["rot"] = rot; j["name"] = name; j["aid_type"] = aid_type; j["repeat"] = repeat; j["accuracy"] = accuracy; j["to_bow"] = to_bow; j["to_stern"] = to_stern; j["to_port"] = to_port; j["to_starboard"] = to_starboard; j["epfd"] = epfd; j["second"] = second; j["off_position"] = off_position; j["reserved_1"] = reserved_1; j["raim"] = raim; j["virtual_aid"] = virtual_aid; j["assigned"] = assigned; j["name_ext"] = name_ext; j["shipname"] = shipname; j["callsign"] = callsign; j["ship_type"] = ship_type; j["station_type"] = station_type; j["restricted"] = restricted; j["iala_mrn"] = iala_mrn; j["dimension"] = dimension; j["dimensions_a"] = dimensions_a; j["dimensions_b"] = dimensions_b; j["dimension_additional_data"] = dimension_additional_data; j["charted_status"] = charted_status; j["station_status"] = station_status; j["status_bits"] = status_bits; j["auth"] = auth; j["imo"] = imo; j["month"] = month; j["day"] = day; j["hour"] = hour; j["minute"] = minute; j["draught"] = draught; j["destination"] = destination; j["alt"] = alt; return j; } }; struct BcAm { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; Message message = Message::random; std::string frequencies = "1000 2500"; double frequency = 1000; double snr = 10; double center_frequency = 0; double duration = 0.1; Sideband sideband = Sideband::dsb; double modulation_index = 0.5; double message_bandwidth = 3000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "am"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["message"] = to_string(message); j["frequencies"] = frequencies; j["frequency"] = frequency; j["snr"] = snr; j["center_frequency"] = center_frequency; j["duration"] = duration; j["sideband"] = to_string(sideband); j["modulation_index"] = modulation_index; j["message_bandwidth"] = message_bandwidth; return j; } }; struct BcAprs { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; InfoType info_type = InfoType::position; std::string addressee = "WB2OSZ"; std::string text = "Hello"; std::string message_no = "1"; double latitude = 37.7749; double longitude = -122.4194; std::string symbol_table = "/"; std::string symbol_code = ">"; double course = -1; double speed = -1; std::string comment = "Sigtera"; std::string info = ">SIGTERA TEST"; std::string source = "N0CALL"; int source_ssid = 0; std::string destination = "APRS"; std::string path = "WIDE1-1 WIDE2-2"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "aprs"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["info_type"] = to_string(info_type); j["addressee"] = addressee; j["text"] = text; j["message_no"] = message_no; j["latitude"] = latitude; j["longitude"] = longitude; j["symbol_table"] = symbol_table; j["symbol_code"] = symbol_code; j["course"] = course; j["speed"] = speed; j["comment"] = comment; j["info"] = info; j["source"] = source; j["source_ssid"] = source_ssid; j["destination"] = destination; j["path"] = path; return j; } }; struct BcApsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; int modulation_order = 16; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "apsk"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct BcAsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; int modulation_order = 2; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ask"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct BcBle { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; double baud = 1000000; int samples_per_symbol = 8; double BT = 0.5; double modulation_index = 0.5; PduType pdu_type = PduType::adv_ind; std::string target_address = "11:22:33:44:55:66"; int flags = 6; std::string device_name = "Sigtera"; std::string manufacturer_data = ""; int channel = 37; std::string advertiser_address = "C0:FF:EE:C0:DE:01"; AddressType address_type = AddressType::public_; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ble"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["modulation_index"] = modulation_index; j["pdu_type"] = to_string(pdu_type); j["target_address"] = target_address; j["flags"] = flags; j["device_name"] = device_name; j["manufacturer_data"] = manufacturer_data; j["channel"] = channel; j["advertiser_address"] = advertiser_address; j["address_type"] = to_string(address_type); return j; } }; struct BcChirp { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; double duration = 0.001; double bandwidth = 10000; Waveform waveform = Waveform::linear; std::string code_length = "13"; int num_sweeps = 8; Direction direction = Direction::up; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "chirp"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["duration"] = duration; j["bandwidth"] = bandwidth; j["waveform"] = to_string(waveform); j["code_length"] = code_length; j["num_sweeps"] = num_sweeps; j["direction"] = to_string(direction); return j; } }; struct BcCpfsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int modulation_order = 2; double baud = 4800; int samples_per_symbol = 8; double modulation_index = 0.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "cpfsk"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["modulation_index"] = modulation_index; return j; } }; struct BcDmr { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int modulation_order = 4; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 1296; Content content = Content::voice; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dmr"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; j["content"] = to_string(content); return j; } }; struct BcDpsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dpsk"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["baud"] = baud; return j; } }; struct BcDqpsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double baud = 25000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dqpsk"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["baud"] = baud; return j; } }; struct BcDsss { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_chip = 1; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; Sequence sequence = Sequence::barker_13; std::string code = "0000011001010"; BaseModulation base_modulation = BaseModulation::psk; int modulation_order = 16; double baud = 4800; int samples_per_symbol = 8; double modulation_index = 0.5; double freq_sep = 1000; double BT = 0.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dsss"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_chip"] = samples_per_chip; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["sequence"] = to_string(sequence); j["code"] = code; j["base_modulation"] = to_string(base_modulation); j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["modulation_index"] = modulation_index; j["freq_sep"] = freq_sep; j["BT"] = BT; return j; } }; struct BcFhss { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 2000; int num_channels = 8; double channel_spacing = 25000; double hop_rate = 100; HopPattern hop_pattern = HopPattern::random; std::string hop_sequence = "0 3 1 2"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fhss"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; j["num_channels"] = num_channels; j["channel_spacing"] = channel_spacing; j["hop_rate"] = hop_rate; j["hop_pattern"] = to_string(hop_pattern); j["hop_sequence"] = hop_sequence; return j; } }; struct BcFm { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; Message message = Message::random; std::string frequencies = "1000 2500"; double frequency = 1000; double snr = 10; double center_frequency = 0; double duration = 0.1; double deviation = 5000; double message_bandwidth = 3000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fm"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["message"] = to_string(message); j["frequencies"] = frequencies; j["frequency"] = frequency; j["snr"] = snr; j["center_frequency"] = center_frequency; j["duration"] = duration; j["deviation"] = deviation; j["message_bandwidth"] = message_bandwidth; return j; } }; struct BcFsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int modulation_order = 4; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 1000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fsk"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; return j; } }; struct BcGfsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; double baud = 4800; int samples_per_symbol = 8; double BT = 0.5; double modulation_index = 0.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gfsk"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["modulation_index"] = modulation_index; return j; } }; struct BcGmsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; double baud = 9600; int samples_per_symbol = 8; double BT = 0.3; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gmsk"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; return j; } }; struct BcGps { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 1575420000; std::string prn = "1-32"; std::string doppler = "-5000-5000"; double duration = 0.02; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gps"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["prn"] = prn; j["doppler"] = doppler; j["duration"] = duration; return j; } }; struct BcGsm { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; double baud = 270833.3333333333; int samples_per_symbol = 4; double BT = 0.3; BurstType burst_type = BurstType::normal; int tsc = 0; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gsm"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["burst_type"] = to_string(burst_type); j["tsc"] = tsc; return j; } }; struct BcIridium { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; int slot_index = 0; double snr = 10; int samples_per_symbol = 10; std::string pulse_shape = "root_raised_cosine"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.4; double baud = 25000; Channel channel = Channel::simplex; double center_frequency = 1621000000; DuplexDirection duplex_direction = DuplexDirection::downlink; DuplexDlType duplex_dl_type = DuplexDlType::vo; DaSource da_source = DaSource::text; std::string da_file = ""; int da_chars = 10; std::string da_text = "SBD MSG"; DaSource ip_source = DaSource::text; std::string ip_file = ""; int ip_chars = 10; std::string ip_text = "ip payload"; DuplexUlType duplex_ul_type = DuplexUlType::aq; int rid = 42; SimplexType simplex_type = SimplexType::ms; int satellite = 42; int beam = 12; int iridium_time = 1073741824; DaSource ms_source = DaSource::text; std::string ms_file = ""; int ms_chars = 10; std::string ms_text = "HI"; int sat_x = 1000; int sat_y = 1200; int sat_z = 800; std::string tmsi = "0x12345678"; int plane = 1; int message = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["slot_index"] = slot_index; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["baud"] = baud; j["channel"] = to_string(channel); j["center_frequency"] = center_frequency; j["duplex_direction"] = to_string(duplex_direction); j["duplex_dl_type"] = to_string(duplex_dl_type); j["da_source"] = to_string(da_source); j["da_file"] = da_file; j["da_chars"] = da_chars; j["da_text"] = da_text; j["ip_source"] = to_string(ip_source); j["ip_file"] = ip_file; j["ip_chars"] = ip_chars; j["ip_text"] = ip_text; j["duplex_ul_type"] = to_string(duplex_ul_type); j["rid"] = rid; j["simplex_type"] = to_string(simplex_type); j["satellite"] = satellite; j["beam"] = beam; j["iridium_time"] = iridium_time; j["ms_source"] = to_string(ms_source); j["ms_file"] = ms_file; j["ms_chars"] = ms_chars; j["ms_text"] = ms_text; j["sat_x"] = sat_x; j["sat_y"] = sat_y; j["sat_z"] = sat_z; j["tmsi"] = tmsi; j["plane"] = plane; j["message"] = message; return j; } }; struct BcLora { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; Protocol protocol = Protocol::raw; std::string devaddr = "26011BDA"; int fcnt = 1; int fport = 1; std::string app_payload = "48656C6C6F"; std::string nwkskey = "2B7E151628AED2A6ABF7158809CF4F3C"; std::string appskey = "2B7E151628AED2A6ABF7158809CF4F3C"; int route_type = 0; int payload_type = 1; std::string mc_payload = "48656C6C6F"; std::string dest = "FFFFFFFF"; std::string sender = "336A1B2C"; std::string packet_id = "12345678"; int channel_hash = 8; int portnum = 1; std::string text = "Hello Mesh"; std::string mt_payload = ""; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lora"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; j["protocol"] = to_string(protocol); j["devaddr"] = devaddr; j["fcnt"] = fcnt; j["fport"] = fport; j["app_payload"] = app_payload; j["nwkskey"] = nwkskey; j["appskey"] = appskey; j["route_type"] = route_type; j["payload_type"] = payload_type; j["mc_payload"] = mc_payload; j["dest"] = dest; j["sender"] = sender; j["packet_id"] = packet_id; j["channel_hash"] = channel_hash; j["portnum"] = portnum; j["text"] = text; j["mt_payload"] = mt_payload; return j; } }; struct BcLorawan { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lorawan"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; return j; } }; struct BcMeshcore { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshcore"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; return j; } }; struct BcMeshtastic { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshtastic"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; return j; } }; struct BcMsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; double baud = 4800; int samples_per_symbol = 8; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "msk"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; return j; } }; struct BcOfdm { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int modulation_order = 2; int num_subcarriers = 64; int fft_size = 64; int cyclic_prefix_length = 16; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ofdm"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["modulation_order"] = modulation_order; j["num_subcarriers"] = num_subcarriers; j["fft_size"] = fft_size; j["cyclic_prefix_length"] = cyclic_prefix_length; j["baud"] = baud; return j; } }; struct BcOok { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ook"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["baud"] = baud; return j; } }; struct BcP25 { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int modulation_order = 4; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 1200; Duid duid = Duid::voice_ldu1; int nac = 659; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "p25"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; j["duid"] = to_string(duid); j["nac"] = nac; return j; } }; struct BcPam { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; int modulation_order = 4; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "pam"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct BcPsk { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; int modulation_order = 4; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "psk"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct BcQam { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; int modulation_order = 16; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "qam"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct BcTetra { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "root_raised_cosine"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double baud = 18000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tetra"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["baud"] = baud; return j; } }; struct BcTone { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; double duration = 0.1; double phase = 0; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tone"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["duration"] = duration; j["phase"] = phase; return j; } }; struct BcWifi { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; double center_frequency = 0; std::string data_rate = "36"; std::string psdu = "0402002E006008CD37A60020D6013CF1006008AD3BAF00004A6F792C2062726967687420"; int scrambler_init = 93; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "wifi"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["data_rate"] = data_rate; j["psdu"] = psdu; j["scrambler_init"] = scrambler_init; return j; } }; struct BcZigbee { int count = 1; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; std::string upsample_ratio = "2-8"; double pre_padding = 0; double post_padding = 0; double snr = 10; std::string center_frequency = "2405000000:5000000:2480000000"; int channel = 11; std::string psdu = "6188A1FFFF0000010203040506078F62"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "zigbee"; j["count"] = count; j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["upsample_ratio"] = upsample_ratio; j["pre-padding"] = pre_padding; j["post-padding"] = post_padding; j["snr"] = snr; j["center_frequency"] = center_frequency; j["channel"] = channel; j["psdu"] = psdu; return j; } }; struct WbAcars { int count = 1; double snr = 10; std::string center_frequency = "131550000, 130025000, 130425000, 130450000, 136700000, 136800000"; double baud = 2400; int samples_per_symbol = 8; double signal_start_time = 0; std::string registration = ".N123SG"; std::string acars_mode = "2"; std::string label = "H1"; std::string block_id = "1"; std::string text = "POS N37.6W122.4/ALT350/SIGTERA"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "acars"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["signal_start_time"] = signal_start_time; j["registration"] = registration; j["acars_mode"] = acars_mode; j["label"] = label; j["block_id"] = block_id; j["text"] = text; return j; } }; struct WbAcars_group { int count = 1; double signal_start_time = 0; int aircraft = 6; std::string center_frequency = "131550000"; double center_lat = 37.5; double center_lon = -122.4; double radius = 200.0; std::string altitude = "1000-40000"; std::string ground_speed = "150-500"; std::string report_interval = "10-120"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "acars_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["aircraft"] = aircraft; j["center_frequency"] = center_frequency; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["altitude"] = altitude; j["ground_speed"] = ground_speed; j["report_interval"] = report_interval; j["snr"] = snr; j["length"] = length; return j; } }; struct WbAcars_transmitter { int count = 1; std::string center_frequency = "131550000, 130025000, 130425000, 130450000, 136700000, 136800000"; double signal_start_time = 0; std::string registration = ".N123SG"; std::string flight = "SG0123"; std::string acars_mode = "2"; std::string latitude = "36.5-38.5"; std::string longitude = "-123.5--121.5"; std::string altitude = "1000-40000"; std::string ground_speed = "150-500"; std::string track = "0-360"; std::string position_label = "H1"; std::string report_interval = "10-120"; double link_test_interval = 0; std::string free_text = ""; double first_report = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "acars_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["registration"] = registration; j["flight"] = flight; j["acars_mode"] = acars_mode; j["latitude"] = latitude; j["longitude"] = longitude; j["altitude"] = altitude; j["ground_speed"] = ground_speed; j["track"] = track; j["position_label"] = position_label; j["report_interval"] = report_interval; j["link_test_interval"] = link_test_interval; j["free_text"] = free_text; j["first_report"] = first_report; j["snr"] = snr; j["length"] = length; return j; } }; struct WbAdsb { int count = 1; double snr = 10; MessageType message_type = MessageType::aircraft_identification; std::string icao = "4840D6"; double latitude = 37.7749; double longitude = -122.4194; int altitude = 38000; int surveillance_status = 0; double ground_speed = 450; double track = 90.0; int vertical_rate = 0; std::string callsign = "SIGTERA1"; int category = 0; double movement = 15.0; double center_frequency = 0; double signal_start_time = 0; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "adsb"; j["count"] = count; j["snr"] = snr; j["message_type"] = to_string(message_type); j["icao"] = icao; j["latitude"] = latitude; j["longitude"] = longitude; j["altitude"] = altitude; j["surveillance_status"] = surveillance_status; j["ground_speed"] = ground_speed; j["track"] = track; j["vertical_rate"] = vertical_rate; j["callsign"] = callsign; j["category"] = category; j["movement"] = movement; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; return j; } }; struct WbAdsb_group { int count = 1; double signal_start_time = 0; int aircraft = 8; int ground_aircraft = 0; double center_lat = 37.5; double center_lon = -122.4; double radius = 100.0; std::string altitude = "1000-40000"; std::string ground_speed = "150-500"; std::string vertical_rate = "-1000-1000"; std::string taxi_speed = "0-30"; std::string snr = "5-30"; std::string center_frequency = "1090000000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "adsb_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["aircraft"] = aircraft; j["ground_aircraft"] = ground_aircraft; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["altitude"] = altitude; j["ground_speed"] = ground_speed; j["vertical_rate"] = vertical_rate; j["taxi_speed"] = taxi_speed; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct WbAdsb_transmitter { int count = 1; double center_frequency = 1090000000; double signal_start_time = 0; std::string icao = "0x000001-0xFFFFFE"; std::string callsign = ""; int category = 0; std::string latitude = "36.5-38.5"; std::string longitude = "-123.5--121.5"; std::string ground_speed = "150-500"; std::string track = "0-360"; double turn_rate = 0; std::string squitter_phase = "0-0.5"; std::string snr = "5-30"; double length = 10; FlightPhase flight_phase = FlightPhase::airborne; std::string altitude = "1000-40000"; std::string vertical_rate = "-1000-1000"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "adsb_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["icao"] = icao; j["callsign"] = callsign; j["category"] = category; j["latitude"] = latitude; j["longitude"] = longitude; j["ground_speed"] = ground_speed; j["track"] = track; j["turn_rate"] = turn_rate; j["squitter_phase"] = squitter_phase; j["snr"] = snr; j["length"] = length; j["flight_phase"] = to_string(flight_phase); j["altitude"] = altitude; j["vertical_rate"] = vertical_rate; return j; } }; struct WbAis_group { int count = 1; double signal_start_time = 0; int vessels = 8; int class_b_vessels = 0; int base_stations = 0; int atons = 0; int sar_aircraft = 0; double center_lat = 37.75; double center_lon = -122.45; double radius = 10.0; std::string speed = "0-20"; std::string snr = "5-30"; std::string center_frequency = "161975000,162025000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ais_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["vessels"] = vessels; j["class_b_vessels"] = class_b_vessels; j["base_stations"] = base_stations; j["atons"] = atons; j["sar_aircraft"] = sar_aircraft; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["speed"] = speed; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct WbAis_message { int count = 1; double snr = 10; std::string center_frequency = "161975000, 162025000"; double baud = 9600; int samples_per_symbol = 8; double BT = 0.4; double signal_start_time = 0; MessageType2 message_type = MessageType2::msg1_position_report; int mmsi = 338000001; std::string text = "ALL CLEAR"; double lat = 37.7749; double lon = -122.4194; double speed = 0.0; double course = 0.0; int heading = 511; int status = 0; int rot = -128; std::string name = "BUOY"; int aid_type = 1; int repeat = 0; int accuracy = 0; int to_bow = 0; int to_stern = 0; int to_port = 0; int to_starboard = 0; int epfd = 0; int second = 60; int off_position = 0; int reserved_1 = 0; int raim = 0; int virtual_aid = 0; int assigned = 0; std::string name_ext = ""; std::string shipname = "SIGTERA"; std::string callsign = "KXYZ"; int ship_type = 0; int station_type = 1; int restricted = 0; int iala_mrn = 0; int dimension = 0; int dimensions_a = 0; int dimensions_b = 0; int dimension_additional_data = 0; int charted_status = 0; int station_status = 0; int status_bits = 0; int auth = 0; int imo = 0; int month = 0; int day = 0; int hour = 24; int minute = 60; double draught = 5.0; std::string destination = ""; int alt = 1000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ais_message"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["signal_start_time"] = signal_start_time; j["message_type"] = to_string(message_type); j["mmsi"] = mmsi; j["text"] = text; j["lat"] = lat; j["lon"] = lon; j["speed"] = speed; j["course"] = course; j["heading"] = heading; j["status"] = status; j["rot"] = rot; j["name"] = name; j["aid_type"] = aid_type; j["repeat"] = repeat; j["accuracy"] = accuracy; j["to_bow"] = to_bow; j["to_stern"] = to_stern; j["to_port"] = to_port; j["to_starboard"] = to_starboard; j["epfd"] = epfd; j["second"] = second; j["off_position"] = off_position; j["reserved_1"] = reserved_1; j["raim"] = raim; j["virtual_aid"] = virtual_aid; j["assigned"] = assigned; j["name_ext"] = name_ext; j["shipname"] = shipname; j["callsign"] = callsign; j["ship_type"] = ship_type; j["station_type"] = station_type; j["restricted"] = restricted; j["iala_mrn"] = iala_mrn; j["dimension"] = dimension; j["dimensions_a"] = dimensions_a; j["dimensions_b"] = dimensions_b; j["dimension_additional_data"] = dimension_additional_data; j["charted_status"] = charted_status; j["station_status"] = station_status; j["status_bits"] = status_bits; j["auth"] = auth; j["imo"] = imo; j["month"] = month; j["day"] = day; j["hour"] = hour; j["minute"] = minute; j["draught"] = draught; j["destination"] = destination; j["alt"] = alt; return j; } }; struct WbAis_transmitter { int count = 1; std::string center_frequency = "161975000, 162025000"; double signal_start_time = 0; std::string latitude = "37.0-38.0"; std::string longitude = "-123.0--122.0"; std::string slot = "0-2249"; std::string static_phase = "0-360"; std::string snr = "5-30"; double length = 10; StationType station_type = StationType::class_a; std::string mmsi = "992000000-997999999"; std::string aton_name = "BUOY"; int aid_type = 1; int virtual_aid = 0; std::string speed = "0-25"; std::string course = "0-360"; int heading = 511; double rate_of_turn = 0; int nav_status = 0; std::string ship_name = "SIGTERA"; std::string callsign = "KXYZ"; int ship_type = 70; int imo = 0; std::string destination = ""; double draught = 5.0; int to_bow = 50; int to_stern = 20; int to_port = 5; int to_starboard = 5; std::string altitude = "150-1500"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ais_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["latitude"] = latitude; j["longitude"] = longitude; j["slot"] = slot; j["static_phase"] = static_phase; j["snr"] = snr; j["length"] = length; j["station_type"] = to_string(station_type); j["mmsi"] = mmsi; j["aton_name"] = aton_name; j["aid_type"] = aid_type; j["virtual_aid"] = virtual_aid; j["speed"] = speed; j["course"] = course; j["heading"] = heading; j["rate_of_turn"] = rate_of_turn; j["nav_status"] = nav_status; j["ship_name"] = ship_name; j["callsign"] = callsign; j["ship_type"] = ship_type; j["imo"] = imo; j["destination"] = destination; j["draught"] = draught; j["to_bow"] = to_bow; j["to_stern"] = to_stern; j["to_port"] = to_port; j["to_starboard"] = to_starboard; j["altitude"] = altitude; return j; } }; struct WbAm { int count = 1; Message message = Message::random; std::string frequencies = "1000 2500"; double frequency = 1000; double snr = 10; double center_frequency = 0; double signal_start_time = 0; double duration = 0.1; Sideband sideband = Sideband::dsb; double modulation_index = 0.5; double message_bandwidth = 3000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "am"; j["count"] = count; j["message"] = to_string(message); j["frequencies"] = frequencies; j["frequency"] = frequency; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["duration"] = duration; j["sideband"] = to_string(sideband); j["modulation_index"] = modulation_index; j["message_bandwidth"] = message_bandwidth; return j; } }; struct WbAm_group { int count = 1; double signal_start_time = 0; int stations = 8; std::string center_frequency = "540000:10000:1700000"; double modulation_index = 0.8; double message_bandwidth = 5000; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "am_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["stations"] = stations; j["center_frequency"] = center_frequency; j["modulation_index"] = modulation_index; j["message_bandwidth"] = message_bandwidth; j["snr"] = snr; j["length"] = length; return j; } }; struct WbAprs { int count = 1; double snr = 10; InfoType info_type = InfoType::position; std::string addressee = "WB2OSZ"; std::string text = "Hello"; std::string message_no = "1"; double latitude = 37.7749; double longitude = -122.4194; std::string symbol_table = "/"; std::string symbol_code = ">"; double course = -1; double speed = -1; std::string comment = "Sigtera"; std::string info = ">SIGTERA TEST"; double center_frequency = 0; double signal_start_time = 0; std::string source = "N0CALL"; int source_ssid = 0; std::string destination = "APRS"; std::string path = "WIDE1-1 WIDE2-2"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "aprs"; j["count"] = count; j["snr"] = snr; j["info_type"] = to_string(info_type); j["addressee"] = addressee; j["text"] = text; j["message_no"] = message_no; j["latitude"] = latitude; j["longitude"] = longitude; j["symbol_table"] = symbol_table; j["symbol_code"] = symbol_code; j["course"] = course; j["speed"] = speed; j["comment"] = comment; j["info"] = info; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["source"] = source; j["source_ssid"] = source_ssid; j["destination"] = destination; j["path"] = path; return j; } }; struct WbAprs_group { int count = 1; double signal_start_time = 0; int mobiles = 6; int home_stations = 1; int digipeaters = 1; int igates = 0; double center_lat = 37.75; double center_lon = -122.45; double radius = 30.0; std::string speed = "0-60"; std::string beacon_interval = "600-1800"; std::string snr = "5-30"; std::string center_frequency = "144390000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "aprs_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["mobiles"] = mobiles; j["home_stations"] = home_stations; j["digipeaters"] = digipeaters; j["igates"] = igates; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["speed"] = speed; j["beacon_interval"] = beacon_interval; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct WbAprs_transmitter { int count = 1; double center_frequency = 144390000; double signal_start_time = 0; std::string source = "SIGTRA"; std::string source_ssid = "0-15"; std::string destination = "APRS"; std::string path = "WIDE1-1 WIDE2-2"; std::string latitude = "37.0-38.0"; std::string longitude = "-123.0--122.0"; std::string comment = "Sigtera"; std::string status_text = ""; double status_interval = 600; double first_beacon = 0; std::string snr = "5-30"; double length = 10; StationKind station_kind = StationKind::mobile; std::string beacon_interval = "600-1800"; std::string speed = "0-60"; std::string course = "0-360"; double turn_rate = 0; double fast_rate = 90; double slow_rate = 1800; double fast_speed = 52; double slow_speed = 4; double turn_angle = 28; double turn_slope = 255; double turn_time = 15; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "aprs_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["source"] = source; j["source_ssid"] = source_ssid; j["destination"] = destination; j["path"] = path; j["latitude"] = latitude; j["longitude"] = longitude; j["comment"] = comment; j["status_text"] = status_text; j["status_interval"] = status_interval; j["first_beacon"] = first_beacon; j["snr"] = snr; j["length"] = length; j["station_kind"] = to_string(station_kind); j["beacon_interval"] = beacon_interval; j["speed"] = speed; j["course"] = course; j["turn_rate"] = turn_rate; j["fast_rate"] = fast_rate; j["slow_rate"] = slow_rate; j["fast_speed"] = fast_speed; j["slow_speed"] = slow_speed; j["turn_angle"] = turn_angle; j["turn_slope"] = turn_slope; j["turn_time"] = turn_time; return j; } }; struct WbApsk { int count = 1; double snr = 10; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; int modulation_order = 16; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "apsk"; j["count"] = count; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct WbAsk { int count = 1; double snr = 10; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; int modulation_order = 2; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ask"; j["count"] = count; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct WbBle { int count = 1; double snr = 10; double center_frequency = 0; double baud = 1000000; int samples_per_symbol = 8; double BT = 0.5; double modulation_index = 0.5; PduType pdu_type = PduType::adv_ind; std::string target_address = "11:22:33:44:55:66"; int flags = 6; std::string device_name = "Sigtera"; std::string manufacturer_data = ""; double signal_start_time = 0; int channel = 37; std::string advertiser_address = "C0:FF:EE:C0:DE:01"; AddressType address_type = AddressType::public_; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ble"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["modulation_index"] = modulation_index; j["pdu_type"] = to_string(pdu_type); j["target_address"] = target_address; j["flags"] = flags; j["device_name"] = device_name; j["manufacturer_data"] = manufacturer_data; j["signal_start_time"] = signal_start_time; j["channel"] = channel; j["advertiser_address"] = advertiser_address; j["address_type"] = to_string(address_type); return j; } }; struct WbBle_group { int count = 1; double signal_start_time = 0; int devices = 8; int beacons = 4; int directed = 0; std::string advertising_interval = "0.05-1.0"; std::string beacon_uuid = "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0"; int major = 1; std::string snr = "5-30"; std::string center_frequency = "2402000000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ble_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["devices"] = devices; j["beacons"] = beacons; j["directed"] = directed; j["advertising_interval"] = advertising_interval; j["beacon_uuid"] = beacon_uuid; j["major"] = major; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct WbBle_transmitter { int count = 1; double center_frequency = 2402000000.0; double signal_start_time = 0; std::string advertiser_address = "C0:FF:EE:C0:DE:01"; AddressType address_type = AddressType::public_; std::string advertising_interval = "0.1-1.0"; std::string channel_map = "37,38,39"; double first_event = 0; std::string snr = "5-30"; double length = 10; AdvertisingType advertising_type = AdvertisingType::connectable; std::string beacon_uuid = "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0"; int major = 1; std::string minor = "1-65535"; int measured_power = -59; std::string device_name = "Sigtera"; int flags = 6; std::string manufacturer_data = ""; double scan_probability = 0; std::string target_address = "11:22:33:44:55:66"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ble_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["advertiser_address"] = advertiser_address; j["address_type"] = to_string(address_type); j["advertising_interval"] = advertising_interval; j["channel_map"] = channel_map; j["first_event"] = first_event; j["snr"] = snr; j["length"] = length; j["advertising_type"] = to_string(advertising_type); j["beacon_uuid"] = beacon_uuid; j["major"] = major; j["minor"] = minor; j["measured_power"] = measured_power; j["device_name"] = device_name; j["flags"] = flags; j["manufacturer_data"] = manufacturer_data; j["scan_probability"] = scan_probability; j["target_address"] = target_address; return j; } }; struct WbChirp { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; double duration = 0.001; double bandwidth = 10000; Waveform waveform = Waveform::linear; std::string code_length = "13"; int num_sweeps = 8; Direction direction = Direction::up; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "chirp"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["duration"] = duration; j["bandwidth"] = bandwidth; j["waveform"] = to_string(waveform); j["code_length"] = code_length; j["num_sweeps"] = num_sweeps; j["direction"] = to_string(direction); return j; } }; struct WbCpfsk { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; int modulation_order = 2; double baud = 4800; int samples_per_symbol = 8; double modulation_index = 0.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "cpfsk"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["modulation_index"] = modulation_index; return j; } }; struct WbDmr { int count = 1; double snr = 10; double center_frequency = 0; int modulation_order = 4; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 1296; double signal_start_time = 0; Content content = Content::voice; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dmr"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; j["signal_start_time"] = signal_start_time; j["content"] = to_string(content); return j; } }; struct WbDmr_group { int count = 1; double signal_start_time = 0; int repeaters = 4; std::string center_frequency = "451000000:12500:452987500"; std::string call_duration = "2-8"; std::string idle = "1-10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dmr_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["repeaters"] = repeaters; j["center_frequency"] = center_frequency; j["call_duration"] = call_duration; j["idle"] = idle; j["snr"] = snr; j["length"] = length; return j; } }; struct WbDmr_transmitter { int count = 1; std::string center_frequency = "136000000:12500:173987500, 400000000:12500:469987500"; double signal_start_time = 0; int color_code = 1; std::string talkgroup = "1-65535"; int active_slots = 2; std::string call_duration = "2-8"; std::string idle = "1-10"; double hang_time = 2; double first_call = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dmr_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["color_code"] = color_code; j["talkgroup"] = talkgroup; j["active_slots"] = active_slots; j["call_duration"] = call_duration; j["idle"] = idle; j["hang_time"] = hang_time; j["first_call"] = first_call; j["snr"] = snr; j["length"] = length; return j; } }; struct WbDpsk { int count = 1; double snr = 10; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dpsk"; j["count"] = count; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["baud"] = baud; return j; } }; struct WbDqpsk { int count = 1; double snr = 10; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; double baud = 25000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dqpsk"; j["count"] = count; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["baud"] = baud; return j; } }; struct WbDsss { int count = 1; double snr = 10; int samples_per_chip = 1; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; Sequence sequence = Sequence::barker_13; std::string code = "0000011001010"; BaseModulation base_modulation = BaseModulation::psk; int modulation_order = 16; double baud = 4800; int samples_per_symbol = 8; double modulation_index = 0.5; double freq_sep = 1000; double BT = 0.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dsss"; j["count"] = count; j["snr"] = snr; j["samples_per_chip"] = samples_per_chip; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["sequence"] = to_string(sequence); j["code"] = code; j["base_modulation"] = to_string(base_modulation); j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["modulation_index"] = modulation_index; j["freq_sep"] = freq_sep; j["BT"] = BT; return j; } }; struct WbFhss { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 2000; int num_channels = 8; double channel_spacing = 25000; double hop_rate = 100; HopPattern hop_pattern = HopPattern::random; std::string hop_sequence = "0 3 1 2"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fhss"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; j["num_channels"] = num_channels; j["channel_spacing"] = channel_spacing; j["hop_rate"] = hop_rate; j["hop_pattern"] = to_string(hop_pattern); j["hop_sequence"] = hop_sequence; return j; } }; struct WbFm { int count = 1; Message message = Message::random; std::string frequencies = "1000 2500"; double frequency = 1000; double snr = 10; double center_frequency = 0; double signal_start_time = 0; double duration = 0.1; double deviation = 5000; double message_bandwidth = 3000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fm"; j["count"] = count; j["message"] = to_string(message); j["frequencies"] = frequencies; j["frequency"] = frequency; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["duration"] = duration; j["deviation"] = deviation; j["message_bandwidth"] = message_bandwidth; return j; } }; struct WbFm_group { int count = 1; double signal_start_time = 0; int stations = 8; std::string center_frequency = "88100000:200000:107900000"; double deviation = 75000; double message_bandwidth = 15000; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fm_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["stations"] = stations; j["center_frequency"] = center_frequency; j["deviation"] = deviation; j["message_bandwidth"] = message_bandwidth; j["snr"] = snr; j["length"] = length; return j; } }; struct WbFsk { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; int modulation_order = 4; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 1000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fsk"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; return j; } }; struct WbGfsk { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; double baud = 4800; int samples_per_symbol = 8; double BT = 0.5; double modulation_index = 0.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gfsk"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["modulation_index"] = modulation_index; return j; } }; struct WbGmsk { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; double baud = 9600; int samples_per_symbol = 8; double BT = 0.3; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gmsk"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; return j; } }; struct WbGps { int count = 1; double snr = 10; double center_frequency = 1575420000; double signal_start_time = 0; std::string prn = "1-32"; std::string doppler = "-5000-5000"; double duration = 0.02; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gps"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["prn"] = prn; j["doppler"] = doppler; j["duration"] = duration; return j; } }; struct WbGps_group { int count = 1; double signal_start_time = 0; int satellites = 8; std::string prn = "1:1:32"; std::string center_frequency = "1575420000"; std::string doppler = "-5000-5000"; std::string snr = "5-30"; double length = 0.02; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gps_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["satellites"] = satellites; j["prn"] = prn; j["center_frequency"] = center_frequency; j["doppler"] = doppler; j["snr"] = snr; j["length"] = length; return j; } }; struct WbGsm { int count = 1; double snr = 10; double center_frequency = 0; double baud = 270833.3333333333; int samples_per_symbol = 4; double BT = 0.3; double signal_start_time = 0; BurstType burst_type = BurstType::normal; int tsc = 0; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gsm"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["signal_start_time"] = signal_start_time; j["burst_type"] = to_string(burst_type); j["tsc"] = tsc; return j; } }; struct WbGsm_group { int count = 1; double signal_start_time = 0; int cells = 6; std::string center_frequency = "935200000:200000:959800000"; int ncc = 0; std::string busy_timeslots = "0,1,2,3,4,5,6,7"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gsm_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["cells"] = cells; j["center_frequency"] = center_frequency; j["ncc"] = ncc; j["busy_timeslots"] = busy_timeslots; j["snr"] = snr; j["length"] = length; return j; } }; struct WbGsm_transmitter { int count = 1; std::string center_frequency = "935200000:200000:959800000"; double signal_start_time = 0; int ncc = 0; std::string bcc = "0,1,2,3,4,5,6,7"; std::string frame_number = "0-2715647"; std::string busy_timeslots = "0,1,2,3,4,5,6,7"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gsm_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["ncc"] = ncc; j["bcc"] = bcc; j["frame_number"] = frame_number; j["busy_timeslots"] = busy_timeslots; j["snr"] = snr; j["length"] = length; return j; } }; struct WbIridium { int count = 1; int slot_index = 0; double snr = 10; int samples_per_symbol = 10; std::string pulse_shape = "root_raised_cosine"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.4; double baud = 25000; double signal_start_time = 0; Channel channel = Channel::simplex; double center_frequency = 1621000000; DuplexDirection duplex_direction = DuplexDirection::downlink; DuplexDlType duplex_dl_type = DuplexDlType::vo; DaSource da_source = DaSource::text; std::string da_file = ""; int da_chars = 10; std::string da_text = "SBD MSG"; DaSource ip_source = DaSource::text; std::string ip_file = ""; int ip_chars = 10; std::string ip_text = "ip payload"; DuplexUlType duplex_ul_type = DuplexUlType::aq; int rid = 42; SimplexType simplex_type = SimplexType::ms; int satellite = 42; int beam = 12; int iridium_time = 1073741824; DaSource ms_source = DaSource::text; std::string ms_file = ""; int ms_chars = 10; std::string ms_text = "HI"; int sat_x = 1000; int sat_y = 1200; int sat_z = 800; std::string tmsi = "0x12345678"; int plane = 1; int message = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium"; j["count"] = count; j["slot_index"] = slot_index; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["baud"] = baud; j["signal_start_time"] = signal_start_time; j["channel"] = to_string(channel); j["center_frequency"] = center_frequency; j["duplex_direction"] = to_string(duplex_direction); j["duplex_dl_type"] = to_string(duplex_dl_type); j["da_source"] = to_string(da_source); j["da_file"] = da_file; j["da_chars"] = da_chars; j["da_text"] = da_text; j["ip_source"] = to_string(ip_source); j["ip_file"] = ip_file; j["ip_chars"] = ip_chars; j["ip_text"] = ip_text; j["duplex_ul_type"] = to_string(duplex_ul_type); j["rid"] = rid; j["simplex_type"] = to_string(simplex_type); j["satellite"] = satellite; j["beam"] = beam; j["iridium_time"] = iridium_time; j["ms_source"] = to_string(ms_source); j["ms_file"] = ms_file; j["ms_chars"] = ms_chars; j["ms_text"] = ms_text; j["sat_x"] = sat_x; j["sat_y"] = sat_y; j["sat_z"] = sat_z; j["tmsi"] = tmsi; j["plane"] = plane; j["message"] = message; return j; } }; struct WbIridium_group { int count = 1; double signal_start_time = 0; int satellites = 6; int handsets = 2; std::string satellite = "1:1:66"; double center_lat = 37.5; double center_lon = -122.4; double radius = 2500.0; std::string beam = "1-48"; std::string beacon_interval = "1-4"; double broadcast_interval = 4.32; int iridium_time = 1073741824; std::string session_interval = "3-8"; std::string snr = "5-30"; std::string center_frequency = "1626270833"; std::string uplink_frequency = "1616020833:41667:1626437500"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["satellites"] = satellites; j["handsets"] = handsets; j["satellite"] = satellite; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["beam"] = beam; j["beacon_interval"] = beacon_interval; j["broadcast_interval"] = broadcast_interval; j["iridium_time"] = iridium_time; j["session_interval"] = session_interval; j["snr"] = snr; j["center_frequency"] = center_frequency; j["uplink_frequency"] = uplink_frequency; j["length"] = length; return j; } }; struct WbIridium_handset { int count = 1; std::string center_frequency = "1616020833:41667:1626437500"; double signal_start_time = 0; std::string tmsi = "0x00000001-0xFFFFFFFE"; std::string uplink_slot = "2,3,4,5"; std::string session_interval = "3-8"; std::string session_offset = "0-2"; std::string snr = "5-30"; double length = 10; Activity activity = Activity::sbd; std::string sbd_text = "SBD MSG"; std::string call_length = "1-3"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium_handset"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["tmsi"] = tmsi; j["uplink_slot"] = uplink_slot; j["session_interval"] = session_interval; j["session_offset"] = session_offset; j["snr"] = snr; j["length"] = length; j["activity"] = to_string(activity); j["sbd_text"] = sbd_text; j["call_length"] = call_length; return j; } }; struct WbIridium_satellite { int count = 1; double center_frequency = 1626270833; double signal_start_time = 0; std::string satellite = "1-66"; std::string beam = "1-48"; std::string plane = "1,2,3,4,5,6"; std::string orbit_slot = "1,2,3,4,5,6,7,8,9,10,11"; std::string latitude = "-60-60"; std::string longitude = "-180-180"; std::string direction = "ascending,descending"; double altitude = 780; double inclination = 86.4; std::string tmsi = "0x12345678"; int iridium_time = 1073741824; double beacon_interval = 1.0; double broadcast_interval = 4.32; double time_location_interval = 0; double beacon_offset = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium_satellite"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["satellite"] = satellite; j["beam"] = beam; j["plane"] = plane; j["orbit_slot"] = orbit_slot; j["latitude"] = latitude; j["longitude"] = longitude; j["direction"] = direction; j["altitude"] = altitude; j["inclination"] = inclination; j["tmsi"] = tmsi; j["iridium_time"] = iridium_time; j["beacon_interval"] = beacon_interval; j["broadcast_interval"] = broadcast_interval; j["time_location_interval"] = time_location_interval; j["beacon_offset"] = beacon_offset; j["snr"] = snr; j["length"] = length; return j; } }; struct WbLora { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; Protocol protocol = Protocol::raw; std::string devaddr = "26011BDA"; int fcnt = 1; int fport = 1; std::string app_payload = "48656C6C6F"; std::string nwkskey = "2B7E151628AED2A6ABF7158809CF4F3C"; std::string appskey = "2B7E151628AED2A6ABF7158809CF4F3C"; int route_type = 0; int payload_type = 1; std::string mc_payload = "48656C6C6F"; std::string dest = "FFFFFFFF"; std::string sender = "336A1B2C"; std::string packet_id = "12345678"; int channel_hash = 8; int portnum = 1; std::string text = "Hello Mesh"; std::string mt_payload = ""; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lora"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; j["protocol"] = to_string(protocol); j["devaddr"] = devaddr; j["fcnt"] = fcnt; j["fport"] = fport; j["app_payload"] = app_payload; j["nwkskey"] = nwkskey; j["appskey"] = appskey; j["route_type"] = route_type; j["payload_type"] = payload_type; j["mc_payload"] = mc_payload; j["dest"] = dest; j["sender"] = sender; j["packet_id"] = packet_id; j["channel_hash"] = channel_hash; j["portnum"] = portnum; j["text"] = text; j["mt_payload"] = mt_payload; return j; } }; struct WbLorawan { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lorawan"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; return j; } }; struct WbLorawan_group { int count = 1; double center_frequency = 0; double signal_start_time = 0; int devices = 6; std::string tx_interval = "5-60"; std::string spreading_factor = "7,8,9,10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lorawan_group"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["devices"] = devices; j["tx_interval"] = tx_interval; j["spreading_factor"] = spreading_factor; j["snr"] = snr; j["length"] = length; return j; } }; struct WbLorawan_transmitter { int count = 1; double signal_start_time = 0; std::string devaddr = "0x26000001-0x27FFFFFE"; std::string nwkskey = "2B7E151628AED2A6ABF7158809CF4F3C"; std::string appskey = "2B7E151628AED2A6ABF7158809CF4F3C"; std::string fcnt = "0-1000"; int fport = 1; std::string app_payload = "48656C6C6F"; std::string spreading_factor = "7,8,9,10"; std::string tx_interval = "5-60"; double tx_phase = 0; std::string snr = "5-30"; double length = 10; Region region = Region::us915; double center_frequency = 868100000; int sub_band = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lorawan_transmitter"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["devaddr"] = devaddr; j["nwkskey"] = nwkskey; j["appskey"] = appskey; j["fcnt"] = fcnt; j["fport"] = fport; j["app_payload"] = app_payload; j["spreading_factor"] = spreading_factor; j["tx_interval"] = tx_interval; j["tx_phase"] = tx_phase; j["snr"] = snr; j["length"] = length; j["region"] = to_string(region); j["center_frequency"] = center_frequency; j["sub_band"] = sub_band; return j; } }; struct WbMeshcore { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshcore"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; return j; } }; struct WbMeshcore_group { int count = 1; double center_frequency = 0; double signal_start_time = 0; int devices = 6; int repeaters = 1; double center_lat = 37.5; double center_lon = -122.4; double radius = 20.0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshcore_group"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["devices"] = devices; j["repeaters"] = repeaters; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["snr"] = snr; j["length"] = length; return j; } }; struct WbMeshcore_transmitter { int count = 1; double center_frequency = 910525000; double signal_start_time = 0; std::string node_id = "0x00000001-0xFFFFFFFE"; std::string node_name = "Sigtera"; std::string node_type = "chat"; std::string latitude = "37.0-38.0"; std::string longitude = "-123.0--122.0"; double advert_interval = 3600; int timestamp = 1790000000; double tx_phase = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshcore_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["node_id"] = node_id; j["node_name"] = node_name; j["node_type"] = node_type; j["latitude"] = latitude; j["longitude"] = longitude; j["advert_interval"] = advert_interval; j["timestamp"] = timestamp; j["tx_phase"] = tx_phase; j["snr"] = snr; j["length"] = length; return j; } }; struct WbMeshtastic { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshtastic"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; return j; } }; struct WbMeshtastic_group { int count = 1; double center_frequency = 0; double signal_start_time = 0; int devices = 6; std::string modem_preset = "long_fast"; double center_lat = 37.5; double center_lon = -122.4; double radius = 20.0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshtastic_group"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["devices"] = devices; j["modem_preset"] = modem_preset; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["snr"] = snr; j["length"] = length; return j; } }; struct WbMeshtastic_transmitter { int count = 1; double center_frequency = 906875000; double signal_start_time = 0; std::string sender = "0x00000001-0xFFFFFFFE"; std::string long_name = "Sigtera Node"; std::string short_name = "SIG"; std::string modem_preset = "long_fast"; std::string latitude = "37.0-38.0"; std::string longitude = "-123.0--122.0"; std::string altitude = "0-500"; double position_interval = 900; double nodeinfo_interval = 10800; std::string text = ""; std::string packet_id = "0x00000001-0x7FFFFFFF"; double tx_phase = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshtastic_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["sender"] = sender; j["long_name"] = long_name; j["short_name"] = short_name; j["modem_preset"] = modem_preset; j["latitude"] = latitude; j["longitude"] = longitude; j["altitude"] = altitude; j["position_interval"] = position_interval; j["nodeinfo_interval"] = nodeinfo_interval; j["text"] = text; j["packet_id"] = packet_id; j["tx_phase"] = tx_phase; j["snr"] = snr; j["length"] = length; return j; } }; struct WbMsk { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; double baud = 4800; int samples_per_symbol = 8; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "msk"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; return j; } }; struct WbOfdm { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; int modulation_order = 2; int num_subcarriers = 64; int fft_size = 64; int cyclic_prefix_length = 16; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ofdm"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["modulation_order"] = modulation_order; j["num_subcarriers"] = num_subcarriers; j["fft_size"] = fft_size; j["cyclic_prefix_length"] = cyclic_prefix_length; j["baud"] = baud; return j; } }; struct WbOok { int count = 1; double snr = 10; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ook"; j["count"] = count; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["baud"] = baud; return j; } }; struct WbP25 { int count = 1; double snr = 10; double center_frequency = 0; int modulation_order = 4; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 1200; double signal_start_time = 0; Duid duid = Duid::voice_ldu1; int nac = 659; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "p25"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; j["signal_start_time"] = signal_start_time; j["duid"] = to_string(duid); j["nac"] = nac; return j; } }; struct WbP25_group { int count = 1; double signal_start_time = 0; int channels = 4; std::string center_frequency = "769000000:12500:774987500"; int nac = 659; std::string call_duration = "2-8"; std::string idle = "1-10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "p25_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["channels"] = channels; j["center_frequency"] = center_frequency; j["nac"] = nac; j["call_duration"] = call_duration; j["idle"] = idle; j["snr"] = snr; j["length"] = length; return j; } }; struct WbP25_transmitter { int count = 1; std::string center_frequency = "769000000:12500:774987500"; double signal_start_time = 0; std::string role = "traffic"; int nac = 659; std::string talkgroup = "1-65535"; std::string call_duration = "2-8"; std::string idle = "1-10"; double first_call = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "p25_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["role"] = role; j["nac"] = nac; j["talkgroup"] = talkgroup; j["call_duration"] = call_duration; j["idle"] = idle; j["first_call"] = first_call; j["snr"] = snr; j["length"] = length; return j; } }; struct WbPam { int count = 1; double snr = 10; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; int modulation_order = 4; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "pam"; j["count"] = count; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct WbPsk { int count = 1; double snr = 10; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; int modulation_order = 4; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "psk"; j["count"] = count; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct WbQam { int count = 1; double snr = 10; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; int modulation_order = 16; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "qam"; j["count"] = count; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct WbTetra { int count = 1; double snr = 10; int samples_per_symbol = 8; std::string pulse_shape = "root_raised_cosine"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double center_frequency = 0; double signal_start_time = 0; double baud = 18000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tetra"; j["count"] = count; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["baud"] = baud; return j; } }; struct WbTetra_group { int count = 1; double signal_start_time = 0; int carriers = 3; std::string center_frequency = "390000000:25000:391975000"; int mcc = 901; int mnc = 1; std::string colour_code = "1-63"; std::string call_duration = "2-8"; std::string idle = "1-10"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tetra_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["carriers"] = carriers; j["center_frequency"] = center_frequency; j["mcc"] = mcc; j["mnc"] = mnc; j["colour_code"] = colour_code; j["call_duration"] = call_duration; j["idle"] = idle; j["snr"] = snr; j["length"] = length; return j; } }; struct WbTetra_transmitter { int count = 1; int samples_per_symbol = 8; std::string pulse_shape = "root_raised_cosine"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; std::string center_frequency = "390000000:25000:399975000"; double signal_start_time = 0; int mcc = 901; int mnc = 1; std::string colour_code = "1-63"; std::string carrier_number = "0-4095"; std::string carrier_role = "main"; std::string call_duration = "2-8"; std::string idle = "1-10"; double baud = 18000; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tetra_transmitter"; j["count"] = count; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["mcc"] = mcc; j["mnc"] = mnc; j["colour_code"] = colour_code; j["carrier_number"] = carrier_number; j["carrier_role"] = carrier_role; j["call_duration"] = call_duration; j["idle"] = idle; j["baud"] = baud; j["snr"] = snr; j["length"] = length; return j; } }; struct WbTone { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; double duration = 0.1; double phase = 0; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tone"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["duration"] = duration; j["phase"] = phase; return j; } }; struct WbWifi { int count = 1; double snr = 10; double center_frequency = 0; double signal_start_time = 0; std::string data_rate = "36"; std::string psdu = "0402002E006008CD37A60020D6013CF1006008AD3BAF00004A6F792C2062726967687420"; int scrambler_init = 93; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "wifi"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["data_rate"] = data_rate; j["psdu"] = psdu; j["scrambler_init"] = scrambler_init; return j; } }; struct WbWifi_group { int count = 1; double signal_start_time = 0; int access_points = 4; std::string center_frequency = "5180000000:20000000:5825000000"; double beacon_interval = 0.1024; std::string traffic = "0-20"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "wifi_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["access_points"] = access_points; j["center_frequency"] = center_frequency; j["beacon_interval"] = beacon_interval; j["traffic"] = traffic; j["snr"] = snr; j["length"] = length; return j; } }; struct WbWifi_transmitter { int count = 1; std::string center_frequency = "5180000000:20000000:5825000000"; double signal_start_time = 0; std::string ssid = "SIGTERA"; std::string bssid = "1-16777214"; double beacon_interval = 0.1024; std::string traffic = "0-20"; std::string uptime = "0-86400"; std::string sequence_start = "0-4095"; std::string data_rate = "36"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "wifi_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["ssid"] = ssid; j["bssid"] = bssid; j["beacon_interval"] = beacon_interval; j["traffic"] = traffic; j["uptime"] = uptime; j["sequence_start"] = sequence_start; j["data_rate"] = data_rate; j["snr"] = snr; j["length"] = length; return j; } }; struct WbZigbee { int count = 1; double snr = 10; std::string center_frequency = "2405000000:5000000:2480000000"; double signal_start_time = 0; int channel = 11; std::string psdu = "6188A1FFFF0000010203040506078F62"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "zigbee"; j["count"] = count; j["snr"] = snr; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["channel"] = channel; j["psdu"] = psdu; return j; } }; struct WbZigbee_group { int count = 1; double signal_start_time = 0; int end_devices = 5; int routers = 1; int channel = 11; std::string pan_id = "0x1A62"; std::string center_frequency = "2405000000"; std::string report_interval = "0.5-10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "zigbee_group"; j["count"] = count; j["signal_start_time"] = signal_start_time; j["end_devices"] = end_devices; j["routers"] = routers; j["channel"] = channel; j["pan_id"] = pan_id; j["center_frequency"] = center_frequency; j["report_interval"] = report_interval; j["snr"] = snr; j["length"] = length; return j; } }; struct WbZigbee_transmitter { int count = 1; std::string center_frequency = "2405000000:5000000:2480000000"; double signal_start_time = 0; int channel = 11; std::string pan_id = "0x1A62"; std::string short_address = "1-65534"; int parent_address = 0; std::string sequence_start = "0-255"; std::string payload = "0102030405060708"; std::string report_interval = "0.5-10"; double first_report = 0; std::string snr = "5-30"; double length = 10; DeviceRole device_role = DeviceRole::end_device; double poll_interval = 7.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "zigbee_transmitter"; j["count"] = count; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["channel"] = channel; j["pan_id"] = pan_id; j["short_address"] = short_address; j["parent_address"] = parent_address; j["sequence_start"] = sequence_start; j["payload"] = payload; j["report_interval"] = report_interval; j["first_report"] = first_report; j["snr"] = snr; j["length"] = length; j["device_role"] = to_string(device_role); j["poll_interval"] = poll_interval; return j; } }; class _BasebandCuts : public _ReceiverBase { public: std::string seed = "0-4294967295"; DataType data_type = DataType::iq; Format format = Format::raw; Precision precision = Precision::float32; _BasebandCuts& Acars(BcAcars p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Adsb(BcAdsb p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Ais_message(BcAis_message p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Am(BcAm p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Aprs(BcAprs p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Apsk(BcApsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Ask(BcAsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Ble(BcBle p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Chirp(BcChirp p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Cpfsk(BcCpfsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Dmr(BcDmr p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Dpsk(BcDpsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Dqpsk(BcDqpsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Dsss(BcDsss p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Fhss(BcFhss p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Fm(BcFm p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Fsk(BcFsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Gfsk(BcGfsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Gmsk(BcGmsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Gps(BcGps p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Gsm(BcGsm p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Iridium(BcIridium p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Lora(BcLora p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Lorawan(BcLorawan p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Meshcore(BcMeshcore p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Meshtastic(BcMeshtastic p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Msk(BcMsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Ofdm(BcOfdm p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Ook(BcOok p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& P25(BcP25 p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Pam(BcPam p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Psk(BcPsk p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Qam(BcQam p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Tetra(BcTetra p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Tone(BcTone p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Wifi(BcWifi p = {}) { signals_.push_back(p.to_json()); return *this; } _BasebandCuts& Zigbee(BcZigbee p = {}) { signals_.push_back(p.to_json()); return *this; } nlohmann::json to_json() const override { nlohmann::json j, sigs = nlohmann::json::array(); j["mode"] = "dataset_generation"; j["segmentation"] = "baseband_cuts"; j["seed"] = seed; j["data_type"] = to_string(data_type); j["format"] = to_string(format); j["precision"] = to_string(precision); for (auto& s : signals_) sigs.push_back(s); j["signal"] = sigs; return j; } private: std::vector signals_; }; class _Wideband : public _ReceiverBase { public: std::string seed = "0-4294967295"; DataType data_type = DataType::iq; Format format = Format::raw; Precision precision = Precision::float32; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; double length = 10; double acquisition_frequency = 0; double sample_rate = 100000; _Wideband& Acars(WbAcars p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Acars_group(WbAcars_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Acars_transmitter(WbAcars_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Adsb(WbAdsb p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Adsb_group(WbAdsb_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Adsb_transmitter(WbAdsb_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Ais_group(WbAis_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Ais_message(WbAis_message p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Ais_transmitter(WbAis_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Am(WbAm p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Am_group(WbAm_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Aprs(WbAprs p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Aprs_group(WbAprs_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Aprs_transmitter(WbAprs_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Apsk(WbApsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Ask(WbAsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Ble(WbBle p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Ble_group(WbBle_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Ble_transmitter(WbBle_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Chirp(WbChirp p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Cpfsk(WbCpfsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Dmr(WbDmr p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Dmr_group(WbDmr_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Dmr_transmitter(WbDmr_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Dpsk(WbDpsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Dqpsk(WbDqpsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Dsss(WbDsss p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Fhss(WbFhss p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Fm(WbFm p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Fm_group(WbFm_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Fsk(WbFsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Gfsk(WbGfsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Gmsk(WbGmsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Gps(WbGps p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Gps_group(WbGps_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Gsm(WbGsm p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Gsm_group(WbGsm_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Gsm_transmitter(WbGsm_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Iridium(WbIridium p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Iridium_group(WbIridium_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Iridium_handset(WbIridium_handset p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Iridium_satellite(WbIridium_satellite p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Lora(WbLora p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Lorawan(WbLorawan p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Lorawan_group(WbLorawan_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Lorawan_transmitter(WbLorawan_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Meshcore(WbMeshcore p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Meshcore_group(WbMeshcore_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Meshcore_transmitter(WbMeshcore_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Meshtastic(WbMeshtastic p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Meshtastic_group(WbMeshtastic_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Meshtastic_transmitter(WbMeshtastic_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Msk(WbMsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Ofdm(WbOfdm p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Ook(WbOok p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& P25(WbP25 p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& P25_group(WbP25_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& P25_transmitter(WbP25_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Pam(WbPam p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Psk(WbPsk p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Qam(WbQam p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Tetra(WbTetra p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Tetra_group(WbTetra_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Tetra_transmitter(WbTetra_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Tone(WbTone p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Wifi(WbWifi p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Wifi_group(WbWifi_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Wifi_transmitter(WbWifi_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Zigbee(WbZigbee p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Zigbee_group(WbZigbee_group p = {}) { signals_.push_back(p.to_json()); return *this; } _Wideband& Zigbee_transmitter(WbZigbee_transmitter p = {}) { signals_.push_back(p.to_json()); return *this; } nlohmann::json to_json() const override { nlohmann::json j, sigs = nlohmann::json::array(); j["mode"] = "dataset_generation"; j["segmentation"] = "wideband"; j["seed"] = seed; j["data_type"] = to_string(data_type); j["format"] = to_string(format); j["precision"] = to_string(precision); j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["length"] = length; j["acquisition_frequency"] = acquisition_frequency; j["sample_rate"] = sample_rate; for (auto& s : signals_) sigs.push_back(s); j["signal"] = sigs; return j; } private: std::vector signals_; }; struct EnvTxAcars { double snr = 10; std::string center_frequency = "131550000, 130025000, 130425000, 130450000, 136700000, 136800000"; double baud = 2400; int samples_per_symbol = 8; double transmitter_start_time = 0; int count = 1; std::string registration = ".N123SG"; std::string acars_mode = "2"; std::string label = "H1"; std::string block_id = "1"; std::string text = "POS N37.6W122.4/ALT350/SIGTERA"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "acars"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["registration"] = registration; j["acars_mode"] = acars_mode; j["label"] = label; j["block_id"] = block_id; j["text"] = text; return j; } }; struct EnvTxAcars_group { double transmitter_start_time = 0; int count = 1; int aircraft = 6; std::string center_frequency = "131550000"; double center_lat = 37.5; double center_lon = -122.4; double radius = 200.0; std::string altitude = "1000-40000"; std::string ground_speed = "150-500"; std::string report_interval = "10-120"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "acars_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["aircraft"] = aircraft; j["center_frequency"] = center_frequency; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["altitude"] = altitude; j["ground_speed"] = ground_speed; j["report_interval"] = report_interval; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxAcars_transmitter { std::string center_frequency = "131550000, 130025000, 130425000, 130450000, 136700000, 136800000"; double transmitter_start_time = 0; int count = 1; std::string registration = ".N123SG"; std::string flight = "SG0123"; std::string acars_mode = "2"; std::string latitude = "36.5-38.5"; std::string longitude = "-123.5--121.5"; std::string altitude = "1000-40000"; std::string ground_speed = "150-500"; std::string track = "0-360"; std::string position_label = "H1"; std::string report_interval = "10-120"; double link_test_interval = 0; std::string free_text = ""; double first_report = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "acars_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["registration"] = registration; j["flight"] = flight; j["acars_mode"] = acars_mode; j["latitude"] = latitude; j["longitude"] = longitude; j["altitude"] = altitude; j["ground_speed"] = ground_speed; j["track"] = track; j["position_label"] = position_label; j["report_interval"] = report_interval; j["link_test_interval"] = link_test_interval; j["free_text"] = free_text; j["first_report"] = first_report; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxAdsb { double snr = 10; double center_frequency = 0; MessageType message_type = MessageType::aircraft_identification; std::string icao = "4840D6"; double latitude = 37.7749; double longitude = -122.4194; int altitude = 38000; int surveillance_status = 0; double ground_speed = 450; double track = 90.0; int vertical_rate = 0; std::string callsign = "SIGTERA1"; int category = 0; double movement = 15.0; double transmitter_start_time = 0; int count = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "adsb"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["message_type"] = to_string(message_type); j["icao"] = icao; j["latitude"] = latitude; j["longitude"] = longitude; j["altitude"] = altitude; j["surveillance_status"] = surveillance_status; j["ground_speed"] = ground_speed; j["track"] = track; j["vertical_rate"] = vertical_rate; j["callsign"] = callsign; j["category"] = category; j["movement"] = movement; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; return j; } }; struct EnvTxAdsb_group { double transmitter_start_time = 0; int count = 1; int aircraft = 8; int ground_aircraft = 0; double center_lat = 37.5; double center_lon = -122.4; double radius = 100.0; std::string altitude = "1000-40000"; std::string ground_speed = "150-500"; std::string vertical_rate = "-1000-1000"; std::string taxi_speed = "0-30"; std::string snr = "5-30"; std::string center_frequency = "1090000000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "adsb_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["aircraft"] = aircraft; j["ground_aircraft"] = ground_aircraft; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["altitude"] = altitude; j["ground_speed"] = ground_speed; j["vertical_rate"] = vertical_rate; j["taxi_speed"] = taxi_speed; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct EnvTxAdsb_transmitter { double center_frequency = 1090000000; double transmitter_start_time = 0; int count = 1; std::string icao = "0x000001-0xFFFFFE"; std::string callsign = ""; int category = 0; std::string latitude = "36.5-38.5"; std::string longitude = "-123.5--121.5"; std::string ground_speed = "150-500"; std::string track = "0-360"; double turn_rate = 0; std::string squitter_phase = "0-0.5"; std::string snr = "5-30"; double length = 10; FlightPhase flight_phase = FlightPhase::airborne; std::string altitude = "1000-40000"; std::string vertical_rate = "-1000-1000"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "adsb_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["icao"] = icao; j["callsign"] = callsign; j["category"] = category; j["latitude"] = latitude; j["longitude"] = longitude; j["ground_speed"] = ground_speed; j["track"] = track; j["turn_rate"] = turn_rate; j["squitter_phase"] = squitter_phase; j["snr"] = snr; j["length"] = length; j["flight_phase"] = to_string(flight_phase); j["altitude"] = altitude; j["vertical_rate"] = vertical_rate; return j; } }; struct EnvTxAis_group { double transmitter_start_time = 0; int count = 1; int vessels = 8; int class_b_vessels = 0; int base_stations = 0; int atons = 0; int sar_aircraft = 0; double center_lat = 37.75; double center_lon = -122.45; double radius = 10.0; std::string speed = "0-20"; std::string snr = "5-30"; std::string center_frequency = "161975000,162025000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ais_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["vessels"] = vessels; j["class_b_vessels"] = class_b_vessels; j["base_stations"] = base_stations; j["atons"] = atons; j["sar_aircraft"] = sar_aircraft; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["speed"] = speed; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct EnvTxAis_message { double snr = 10; std::string center_frequency = "161975000, 162025000"; double baud = 9600; int samples_per_symbol = 8; double BT = 0.4; double transmitter_start_time = 0; int count = 1; MessageType2 message_type = MessageType2::msg1_position_report; int mmsi = 338000001; std::string text = "ALL CLEAR"; double lat = 37.7749; double lon = -122.4194; double speed = 0.0; double course = 0.0; int heading = 511; int status = 0; int rot = -128; std::string name = "BUOY"; int aid_type = 1; int repeat = 0; int accuracy = 0; int to_bow = 0; int to_stern = 0; int to_port = 0; int to_starboard = 0; int epfd = 0; int second = 60; int off_position = 0; int reserved_1 = 0; int raim = 0; int virtual_aid = 0; int assigned = 0; std::string name_ext = ""; std::string shipname = "SIGTERA"; std::string callsign = "KXYZ"; int ship_type = 0; int station_type = 1; int restricted = 0; int iala_mrn = 0; int dimension = 0; int dimensions_a = 0; int dimensions_b = 0; int dimension_additional_data = 0; int charted_status = 0; int station_status = 0; int status_bits = 0; int auth = 0; int imo = 0; int month = 0; int day = 0; int hour = 24; int minute = 60; double draught = 5.0; std::string destination = ""; int alt = 1000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ais_message"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["message_type"] = to_string(message_type); j["mmsi"] = mmsi; j["text"] = text; j["lat"] = lat; j["lon"] = lon; j["speed"] = speed; j["course"] = course; j["heading"] = heading; j["status"] = status; j["rot"] = rot; j["name"] = name; j["aid_type"] = aid_type; j["repeat"] = repeat; j["accuracy"] = accuracy; j["to_bow"] = to_bow; j["to_stern"] = to_stern; j["to_port"] = to_port; j["to_starboard"] = to_starboard; j["epfd"] = epfd; j["second"] = second; j["off_position"] = off_position; j["reserved_1"] = reserved_1; j["raim"] = raim; j["virtual_aid"] = virtual_aid; j["assigned"] = assigned; j["name_ext"] = name_ext; j["shipname"] = shipname; j["callsign"] = callsign; j["ship_type"] = ship_type; j["station_type"] = station_type; j["restricted"] = restricted; j["iala_mrn"] = iala_mrn; j["dimension"] = dimension; j["dimensions_a"] = dimensions_a; j["dimensions_b"] = dimensions_b; j["dimension_additional_data"] = dimension_additional_data; j["charted_status"] = charted_status; j["station_status"] = station_status; j["status_bits"] = status_bits; j["auth"] = auth; j["imo"] = imo; j["month"] = month; j["day"] = day; j["hour"] = hour; j["minute"] = minute; j["draught"] = draught; j["destination"] = destination; j["alt"] = alt; return j; } }; struct EnvTxAis_transmitter { std::string center_frequency = "161975000, 162025000"; double transmitter_start_time = 0; int count = 1; std::string latitude = "37.0-38.0"; std::string longitude = "-123.0--122.0"; std::string slot = "0-2249"; std::string static_phase = "0-360"; std::string snr = "5-30"; double length = 10; StationType station_type = StationType::class_a; std::string mmsi = "992000000-997999999"; std::string aton_name = "BUOY"; int aid_type = 1; int virtual_aid = 0; std::string speed = "0-25"; std::string course = "0-360"; int heading = 511; double rate_of_turn = 0; int nav_status = 0; std::string ship_name = "SIGTERA"; std::string callsign = "KXYZ"; int ship_type = 70; int imo = 0; std::string destination = ""; double draught = 5.0; int to_bow = 50; int to_stern = 20; int to_port = 5; int to_starboard = 5; std::string altitude = "150-1500"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ais_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["latitude"] = latitude; j["longitude"] = longitude; j["slot"] = slot; j["static_phase"] = static_phase; j["snr"] = snr; j["length"] = length; j["station_type"] = to_string(station_type); j["mmsi"] = mmsi; j["aton_name"] = aton_name; j["aid_type"] = aid_type; j["virtual_aid"] = virtual_aid; j["speed"] = speed; j["course"] = course; j["heading"] = heading; j["rate_of_turn"] = rate_of_turn; j["nav_status"] = nav_status; j["ship_name"] = ship_name; j["callsign"] = callsign; j["ship_type"] = ship_type; j["imo"] = imo; j["destination"] = destination; j["draught"] = draught; j["to_bow"] = to_bow; j["to_stern"] = to_stern; j["to_port"] = to_port; j["to_starboard"] = to_starboard; j["altitude"] = altitude; return j; } }; struct EnvTxAm { Message message = Message::random; std::string frequencies = "1000 2500"; double frequency = 1000; double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; double duration = 0.1; Sideband sideband = Sideband::dsb; double modulation_index = 0.5; double message_bandwidth = 3000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "am"; j["message"] = to_string(message); j["frequencies"] = frequencies; j["frequency"] = frequency; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["duration"] = duration; j["sideband"] = to_string(sideband); j["modulation_index"] = modulation_index; j["message_bandwidth"] = message_bandwidth; return j; } }; struct EnvTxAm_group { double transmitter_start_time = 0; int count = 1; int stations = 8; std::string center_frequency = "540000:10000:1700000"; double modulation_index = 0.8; double message_bandwidth = 5000; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "am_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["stations"] = stations; j["center_frequency"] = center_frequency; j["modulation_index"] = modulation_index; j["message_bandwidth"] = message_bandwidth; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxAprs { double snr = 10; double center_frequency = 0; InfoType info_type = InfoType::position; std::string addressee = "WB2OSZ"; std::string text = "Hello"; std::string message_no = "1"; double latitude = 37.7749; double longitude = -122.4194; std::string symbol_table = "/"; std::string symbol_code = ">"; double course = -1; double speed = -1; std::string comment = "Sigtera"; std::string info = ">SIGTERA TEST"; double transmitter_start_time = 0; int count = 1; std::string source = "N0CALL"; int source_ssid = 0; std::string destination = "APRS"; std::string path = "WIDE1-1 WIDE2-2"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "aprs"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["info_type"] = to_string(info_type); j["addressee"] = addressee; j["text"] = text; j["message_no"] = message_no; j["latitude"] = latitude; j["longitude"] = longitude; j["symbol_table"] = symbol_table; j["symbol_code"] = symbol_code; j["course"] = course; j["speed"] = speed; j["comment"] = comment; j["info"] = info; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["source"] = source; j["source_ssid"] = source_ssid; j["destination"] = destination; j["path"] = path; return j; } }; struct EnvTxAprs_group { double transmitter_start_time = 0; int count = 1; int mobiles = 6; int home_stations = 1; int digipeaters = 1; int igates = 0; double center_lat = 37.75; double center_lon = -122.45; double radius = 30.0; std::string speed = "0-60"; std::string beacon_interval = "600-1800"; std::string snr = "5-30"; std::string center_frequency = "144390000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "aprs_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["mobiles"] = mobiles; j["home_stations"] = home_stations; j["digipeaters"] = digipeaters; j["igates"] = igates; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["speed"] = speed; j["beacon_interval"] = beacon_interval; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct EnvTxAprs_transmitter { double center_frequency = 144390000; double transmitter_start_time = 0; int count = 1; std::string source = "SIGTRA"; std::string source_ssid = "0-15"; std::string destination = "APRS"; std::string path = "WIDE1-1 WIDE2-2"; std::string latitude = "37.0-38.0"; std::string longitude = "-123.0--122.0"; std::string comment = "Sigtera"; std::string status_text = ""; double status_interval = 600; double first_beacon = 0; std::string snr = "5-30"; double length = 10; StationKind station_kind = StationKind::mobile; std::string beacon_interval = "600-1800"; std::string speed = "0-60"; std::string course = "0-360"; double turn_rate = 0; double fast_rate = 90; double slow_rate = 1800; double fast_speed = 52; double slow_speed = 4; double turn_angle = 28; double turn_slope = 255; double turn_time = 15; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "aprs_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["source"] = source; j["source_ssid"] = source_ssid; j["destination"] = destination; j["path"] = path; j["latitude"] = latitude; j["longitude"] = longitude; j["comment"] = comment; j["status_text"] = status_text; j["status_interval"] = status_interval; j["first_beacon"] = first_beacon; j["snr"] = snr; j["length"] = length; j["station_kind"] = to_string(station_kind); j["beacon_interval"] = beacon_interval; j["speed"] = speed; j["course"] = course; j["turn_rate"] = turn_rate; j["fast_rate"] = fast_rate; j["slow_rate"] = slow_rate; j["fast_speed"] = fast_speed; j["slow_speed"] = slow_speed; j["turn_angle"] = turn_angle; j["turn_slope"] = turn_slope; j["turn_time"] = turn_time; return j; } }; struct EnvTxApsk { double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; int modulation_order = 16; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "apsk"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct EnvTxAsk { double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; int modulation_order = 2; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ask"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct EnvTxBle { double snr = 10; double center_frequency = 0; double baud = 1000000; int samples_per_symbol = 8; double BT = 0.5; double modulation_index = 0.5; PduType pdu_type = PduType::adv_ind; std::string target_address = "11:22:33:44:55:66"; int flags = 6; std::string device_name = "Sigtera"; std::string manufacturer_data = ""; double transmitter_start_time = 0; int count = 1; int channel = 37; std::string advertiser_address = "C0:FF:EE:C0:DE:01"; AddressType address_type = AddressType::public_; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ble"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["modulation_index"] = modulation_index; j["pdu_type"] = to_string(pdu_type); j["target_address"] = target_address; j["flags"] = flags; j["device_name"] = device_name; j["manufacturer_data"] = manufacturer_data; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["channel"] = channel; j["advertiser_address"] = advertiser_address; j["address_type"] = to_string(address_type); return j; } }; struct EnvTxBle_group { double transmitter_start_time = 0; int count = 1; int devices = 8; int beacons = 4; int directed = 0; std::string advertising_interval = "0.05-1.0"; std::string beacon_uuid = "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0"; int major = 1; std::string snr = "5-30"; std::string center_frequency = "2402000000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ble_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["devices"] = devices; j["beacons"] = beacons; j["directed"] = directed; j["advertising_interval"] = advertising_interval; j["beacon_uuid"] = beacon_uuid; j["major"] = major; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct EnvTxBle_transmitter { double center_frequency = 2402000000.0; double transmitter_start_time = 0; int count = 1; std::string advertiser_address = "C0:FF:EE:C0:DE:01"; AddressType address_type = AddressType::public_; std::string advertising_interval = "0.1-1.0"; std::string channel_map = "37,38,39"; double first_event = 0; std::string snr = "5-30"; double length = 10; AdvertisingType advertising_type = AdvertisingType::connectable; std::string beacon_uuid = "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0"; int major = 1; std::string minor = "1-65535"; int measured_power = -59; std::string device_name = "Sigtera"; int flags = 6; std::string manufacturer_data = ""; double scan_probability = 0; std::string target_address = "11:22:33:44:55:66"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ble_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["advertiser_address"] = advertiser_address; j["address_type"] = to_string(address_type); j["advertising_interval"] = advertising_interval; j["channel_map"] = channel_map; j["first_event"] = first_event; j["snr"] = snr; j["length"] = length; j["advertising_type"] = to_string(advertising_type); j["beacon_uuid"] = beacon_uuid; j["major"] = major; j["minor"] = minor; j["measured_power"] = measured_power; j["device_name"] = device_name; j["flags"] = flags; j["manufacturer_data"] = manufacturer_data; j["scan_probability"] = scan_probability; j["target_address"] = target_address; return j; } }; struct EnvTxChirp { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; double duration = 0.001; double bandwidth = 10000; Waveform waveform = Waveform::linear; std::string code_length = "13"; int num_sweeps = 8; Direction direction = Direction::up; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "chirp"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["duration"] = duration; j["bandwidth"] = bandwidth; j["waveform"] = to_string(waveform); j["code_length"] = code_length; j["num_sweeps"] = num_sweeps; j["direction"] = to_string(direction); return j; } }; struct EnvTxCpfsk { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; int modulation_order = 2; double baud = 4800; int samples_per_symbol = 8; double modulation_index = 0.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "cpfsk"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["modulation_index"] = modulation_index; return j; } }; struct EnvTxDmr { double snr = 10; double center_frequency = 0; int modulation_order = 4; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 1296; double transmitter_start_time = 0; int count = 1; Content content = Content::voice; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dmr"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["content"] = to_string(content); return j; } }; struct EnvTxDmr_group { double transmitter_start_time = 0; int count = 1; int repeaters = 4; std::string center_frequency = "451000000:12500:452987500"; std::string call_duration = "2-8"; std::string idle = "1-10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dmr_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["repeaters"] = repeaters; j["center_frequency"] = center_frequency; j["call_duration"] = call_duration; j["idle"] = idle; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxDmr_transmitter { std::string center_frequency = "136000000:12500:173987500, 400000000:12500:469987500"; double transmitter_start_time = 0; int count = 1; int color_code = 1; std::string talkgroup = "1-65535"; int active_slots = 2; std::string call_duration = "2-8"; std::string idle = "1-10"; double hang_time = 2; double first_call = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dmr_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["color_code"] = color_code; j["talkgroup"] = talkgroup; j["active_slots"] = active_slots; j["call_duration"] = call_duration; j["idle"] = idle; j["hang_time"] = hang_time; j["first_call"] = first_call; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxDpsk { double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dpsk"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["baud"] = baud; return j; } }; struct EnvTxDqpsk { double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; double baud = 25000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dqpsk"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["baud"] = baud; return j; } }; struct EnvTxDsss { double snr = 10; double center_frequency = 0; int samples_per_chip = 1; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; Sequence sequence = Sequence::barker_13; std::string code = "0000011001010"; BaseModulation base_modulation = BaseModulation::psk; int modulation_order = 16; double baud = 4800; int samples_per_symbol = 8; double modulation_index = 0.5; double freq_sep = 1000; double BT = 0.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dsss"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_chip"] = samples_per_chip; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["sequence"] = to_string(sequence); j["code"] = code; j["base_modulation"] = to_string(base_modulation); j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["modulation_index"] = modulation_index; j["freq_sep"] = freq_sep; j["BT"] = BT; return j; } }; struct EnvTxFhss { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 2000; int num_channels = 8; double channel_spacing = 25000; double hop_rate = 100; HopPattern hop_pattern = HopPattern::random; std::string hop_sequence = "0 3 1 2"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fhss"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; j["num_channels"] = num_channels; j["channel_spacing"] = channel_spacing; j["hop_rate"] = hop_rate; j["hop_pattern"] = to_string(hop_pattern); j["hop_sequence"] = hop_sequence; return j; } }; struct EnvTxFm { Message message = Message::random; std::string frequencies = "1000 2500"; double frequency = 1000; double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; double duration = 0.1; double deviation = 5000; double message_bandwidth = 3000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fm"; j["message"] = to_string(message); j["frequencies"] = frequencies; j["frequency"] = frequency; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["duration"] = duration; j["deviation"] = deviation; j["message_bandwidth"] = message_bandwidth; return j; } }; struct EnvTxFm_group { double transmitter_start_time = 0; int count = 1; int stations = 8; std::string center_frequency = "88100000:200000:107900000"; double deviation = 75000; double message_bandwidth = 15000; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fm_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["stations"] = stations; j["center_frequency"] = center_frequency; j["deviation"] = deviation; j["message_bandwidth"] = message_bandwidth; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxFsk { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; int modulation_order = 4; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 1000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fsk"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; return j; } }; struct EnvTxGfsk { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; double baud = 4800; int samples_per_symbol = 8; double BT = 0.5; double modulation_index = 0.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gfsk"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["modulation_index"] = modulation_index; return j; } }; struct EnvTxGmsk { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; double baud = 9600; int samples_per_symbol = 8; double BT = 0.3; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gmsk"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; return j; } }; struct EnvTxGps { double snr = 10; double center_frequency = 1575420000; double transmitter_start_time = 0; int count = 1; std::string prn = "1-32"; std::string doppler = "-5000-5000"; double duration = 0.02; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gps"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["prn"] = prn; j["doppler"] = doppler; j["duration"] = duration; return j; } }; struct EnvTxGps_group { double transmitter_start_time = 0; int count = 1; int satellites = 8; std::string prn = "1:1:32"; std::string center_frequency = "1575420000"; std::string doppler = "-5000-5000"; std::string snr = "5-30"; double length = 0.02; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gps_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["satellites"] = satellites; j["prn"] = prn; j["center_frequency"] = center_frequency; j["doppler"] = doppler; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxGsm { double snr = 10; double center_frequency = 0; double baud = 270833.3333333333; int samples_per_symbol = 4; double BT = 0.3; double transmitter_start_time = 0; int count = 1; BurstType burst_type = BurstType::normal; int tsc = 0; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gsm"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["BT"] = BT; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["burst_type"] = to_string(burst_type); j["tsc"] = tsc; return j; } }; struct EnvTxGsm_group { double transmitter_start_time = 0; int count = 1; int cells = 6; std::string center_frequency = "935200000:200000:959800000"; int ncc = 0; std::string busy_timeslots = "0,1,2,3,4,5,6,7"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gsm_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["cells"] = cells; j["center_frequency"] = center_frequency; j["ncc"] = ncc; j["busy_timeslots"] = busy_timeslots; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxGsm_transmitter { std::string center_frequency = "935200000:200000:959800000"; double transmitter_start_time = 0; int count = 1; int ncc = 0; std::string bcc = "0,1,2,3,4,5,6,7"; std::string frame_number = "0-2715647"; std::string busy_timeslots = "0,1,2,3,4,5,6,7"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gsm_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["ncc"] = ncc; j["bcc"] = bcc; j["frame_number"] = frame_number; j["busy_timeslots"] = busy_timeslots; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxIridium { int slot_index = 0; double snr = 10; int samples_per_symbol = 10; std::string pulse_shape = "root_raised_cosine"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.4; double baud = 25000; double transmitter_start_time = 0; int count = 1; Channel channel = Channel::simplex; double center_frequency = 1621000000; DuplexDirection duplex_direction = DuplexDirection::downlink; DuplexDlType duplex_dl_type = DuplexDlType::vo; DaSource da_source = DaSource::text; std::string da_file = ""; int da_chars = 10; std::string da_text = "SBD MSG"; DaSource ip_source = DaSource::text; std::string ip_file = ""; int ip_chars = 10; std::string ip_text = "ip payload"; DuplexUlType duplex_ul_type = DuplexUlType::aq; int rid = 42; SimplexType simplex_type = SimplexType::ms; int satellite = 42; int beam = 12; int iridium_time = 1073741824; DaSource ms_source = DaSource::text; std::string ms_file = ""; int ms_chars = 10; std::string ms_text = "HI"; int sat_x = 1000; int sat_y = 1200; int sat_z = 800; std::string tmsi = "0x12345678"; int plane = 1; int message = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium"; j["slot_index"] = slot_index; j["snr"] = snr; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["baud"] = baud; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["channel"] = to_string(channel); j["center_frequency"] = center_frequency; j["duplex_direction"] = to_string(duplex_direction); j["duplex_dl_type"] = to_string(duplex_dl_type); j["da_source"] = to_string(da_source); j["da_file"] = da_file; j["da_chars"] = da_chars; j["da_text"] = da_text; j["ip_source"] = to_string(ip_source); j["ip_file"] = ip_file; j["ip_chars"] = ip_chars; j["ip_text"] = ip_text; j["duplex_ul_type"] = to_string(duplex_ul_type); j["rid"] = rid; j["simplex_type"] = to_string(simplex_type); j["satellite"] = satellite; j["beam"] = beam; j["iridium_time"] = iridium_time; j["ms_source"] = to_string(ms_source); j["ms_file"] = ms_file; j["ms_chars"] = ms_chars; j["ms_text"] = ms_text; j["sat_x"] = sat_x; j["sat_y"] = sat_y; j["sat_z"] = sat_z; j["tmsi"] = tmsi; j["plane"] = plane; j["message"] = message; return j; } }; struct EnvTxIridium_group { double transmitter_start_time = 0; int count = 1; int satellites = 6; int handsets = 2; std::string satellite = "1:1:66"; double center_lat = 37.5; double center_lon = -122.4; double radius = 2500.0; std::string beam = "1-48"; std::string beacon_interval = "1-4"; double broadcast_interval = 4.32; int iridium_time = 1073741824; std::string session_interval = "3-8"; std::string snr = "5-30"; std::string center_frequency = "1626270833"; std::string uplink_frequency = "1616020833:41667:1626437500"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["satellites"] = satellites; j["handsets"] = handsets; j["satellite"] = satellite; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["beam"] = beam; j["beacon_interval"] = beacon_interval; j["broadcast_interval"] = broadcast_interval; j["iridium_time"] = iridium_time; j["session_interval"] = session_interval; j["snr"] = snr; j["center_frequency"] = center_frequency; j["uplink_frequency"] = uplink_frequency; j["length"] = length; return j; } }; struct EnvTxIridium_handset { std::string center_frequency = "1616020833:41667:1626437500"; double transmitter_start_time = 0; int count = 1; std::string tmsi = "0x00000001-0xFFFFFFFE"; std::string uplink_slot = "2,3,4,5"; std::string session_interval = "3-8"; std::string session_offset = "0-2"; std::string snr = "5-30"; double length = 10; Activity activity = Activity::sbd; std::string sbd_text = "SBD MSG"; std::string call_length = "1-3"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium_handset"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["tmsi"] = tmsi; j["uplink_slot"] = uplink_slot; j["session_interval"] = session_interval; j["session_offset"] = session_offset; j["snr"] = snr; j["length"] = length; j["activity"] = to_string(activity); j["sbd_text"] = sbd_text; j["call_length"] = call_length; return j; } }; struct EnvTxIridium_satellite { double center_frequency = 1626270833; double transmitter_start_time = 0; int count = 1; std::string satellite = "1-66"; std::string beam = "1-48"; std::string plane = "1,2,3,4,5,6"; std::string orbit_slot = "1,2,3,4,5,6,7,8,9,10,11"; std::string latitude = "-60-60"; std::string longitude = "-180-180"; std::string direction = "ascending,descending"; double altitude = 780; double inclination = 86.4; std::string tmsi = "0x12345678"; int iridium_time = 1073741824; double beacon_interval = 1.0; double broadcast_interval = 4.32; double time_location_interval = 0; double beacon_offset = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium_satellite"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["satellite"] = satellite; j["beam"] = beam; j["plane"] = plane; j["orbit_slot"] = orbit_slot; j["latitude"] = latitude; j["longitude"] = longitude; j["direction"] = direction; j["altitude"] = altitude; j["inclination"] = inclination; j["tmsi"] = tmsi; j["iridium_time"] = iridium_time; j["beacon_interval"] = beacon_interval; j["broadcast_interval"] = broadcast_interval; j["time_location_interval"] = time_location_interval; j["beacon_offset"] = beacon_offset; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxLora { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; Protocol protocol = Protocol::raw; std::string devaddr = "26011BDA"; int fcnt = 1; int fport = 1; std::string app_payload = "48656C6C6F"; std::string nwkskey = "2B7E151628AED2A6ABF7158809CF4F3C"; std::string appskey = "2B7E151628AED2A6ABF7158809CF4F3C"; int route_type = 0; int payload_type = 1; std::string mc_payload = "48656C6C6F"; std::string dest = "FFFFFFFF"; std::string sender = "336A1B2C"; std::string packet_id = "12345678"; int channel_hash = 8; int portnum = 1; std::string text = "Hello Mesh"; std::string mt_payload = ""; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lora"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; j["protocol"] = to_string(protocol); j["devaddr"] = devaddr; j["fcnt"] = fcnt; j["fport"] = fport; j["app_payload"] = app_payload; j["nwkskey"] = nwkskey; j["appskey"] = appskey; j["route_type"] = route_type; j["payload_type"] = payload_type; j["mc_payload"] = mc_payload; j["dest"] = dest; j["sender"] = sender; j["packet_id"] = packet_id; j["channel_hash"] = channel_hash; j["portnum"] = portnum; j["text"] = text; j["mt_payload"] = mt_payload; return j; } }; struct EnvTxLorawan { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lorawan"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; return j; } }; struct EnvTxLorawan_group { double transmitter_start_time = 0; int count = 1; int devices = 6; std::string tx_interval = "5-60"; std::string spreading_factor = "7,8,9,10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lorawan_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["devices"] = devices; j["tx_interval"] = tx_interval; j["spreading_factor"] = spreading_factor; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxLorawan_transmitter { double transmitter_start_time = 0; int count = 1; std::string devaddr = "0x26000001-0x27FFFFFE"; std::string nwkskey = "2B7E151628AED2A6ABF7158809CF4F3C"; std::string appskey = "2B7E151628AED2A6ABF7158809CF4F3C"; std::string fcnt = "0-1000"; int fport = 1; std::string app_payload = "48656C6C6F"; std::string spreading_factor = "7,8,9,10"; std::string tx_interval = "5-60"; double tx_phase = 0; std::string snr = "5-30"; double length = 10; Region region = Region::us915; double center_frequency = 868100000; int sub_band = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lorawan_transmitter"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["devaddr"] = devaddr; j["nwkskey"] = nwkskey; j["appskey"] = appskey; j["fcnt"] = fcnt; j["fport"] = fport; j["app_payload"] = app_payload; j["spreading_factor"] = spreading_factor; j["tx_interval"] = tx_interval; j["tx_phase"] = tx_phase; j["snr"] = snr; j["length"] = length; j["region"] = to_string(region); j["center_frequency"] = center_frequency; j["sub_band"] = sub_band; return j; } }; struct EnvTxMeshcore { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshcore"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; return j; } }; struct EnvTxMeshcore_group { double transmitter_start_time = 0; int count = 1; int devices = 6; int repeaters = 1; double center_lat = 37.5; double center_lon = -122.4; double radius = 20.0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshcore_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["devices"] = devices; j["repeaters"] = repeaters; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxMeshcore_transmitter { double center_frequency = 910525000; double transmitter_start_time = 0; int count = 1; std::string node_id = "0x00000001-0xFFFFFFFE"; std::string node_name = "Sigtera"; std::string node_type = "chat"; std::string latitude = "37.0-38.0"; std::string longitude = "-123.0--122.0"; double advert_interval = 3600; int timestamp = 1790000000; double tx_phase = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshcore_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["node_id"] = node_id; j["node_name"] = node_name; j["node_type"] = node_type; j["latitude"] = latitude; j["longitude"] = longitude; j["advert_interval"] = advert_interval; j["timestamp"] = timestamp; j["tx_phase"] = tx_phase; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxMeshtastic { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; int spreading_factor = 7; double bandwidth = 125000; int coding_rate = 1; SelfInterferenceCancelation has_crc = SelfInterferenceCancelation::True; SelfInterferenceCancelation implicit_header = SelfInterferenceCancelation::False; LowDataRateOptimize low_data_rate_optimize = LowDataRateOptimize::auto_; std::string sync_word = "0x12"; int preamble_length = 8; int oversampling = 2; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshtastic"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["spreading_factor"] = spreading_factor; j["bandwidth"] = bandwidth; j["coding_rate"] = coding_rate; j["has_crc"] = to_string(has_crc); j["implicit_header"] = to_string(implicit_header); j["low_data_rate_optimize"] = to_string(low_data_rate_optimize); j["sync_word"] = sync_word; j["preamble_length"] = preamble_length; j["oversampling"] = oversampling; return j; } }; struct EnvTxMeshtastic_group { double transmitter_start_time = 0; int count = 1; int devices = 6; std::string modem_preset = "long_fast"; double center_lat = 37.5; double center_lon = -122.4; double radius = 20.0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshtastic_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["devices"] = devices; j["modem_preset"] = modem_preset; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxMeshtastic_transmitter { double center_frequency = 906875000; double transmitter_start_time = 0; int count = 1; std::string sender = "0x00000001-0xFFFFFFFE"; std::string long_name = "Sigtera Node"; std::string short_name = "SIG"; std::string modem_preset = "long_fast"; std::string latitude = "37.0-38.0"; std::string longitude = "-123.0--122.0"; std::string altitude = "0-500"; double position_interval = 900; double nodeinfo_interval = 10800; std::string text = ""; std::string packet_id = "0x00000001-0x7FFFFFFF"; double tx_phase = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshtastic_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["sender"] = sender; j["long_name"] = long_name; j["short_name"] = short_name; j["modem_preset"] = modem_preset; j["latitude"] = latitude; j["longitude"] = longitude; j["altitude"] = altitude; j["position_interval"] = position_interval; j["nodeinfo_interval"] = nodeinfo_interval; j["text"] = text; j["packet_id"] = packet_id; j["tx_phase"] = tx_phase; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxMsk { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; double baud = 4800; int samples_per_symbol = 8; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "msk"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; return j; } }; struct EnvTxOfdm { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; int modulation_order = 2; int num_subcarriers = 64; int fft_size = 64; int cyclic_prefix_length = 16; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ofdm"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["modulation_order"] = modulation_order; j["num_subcarriers"] = num_subcarriers; j["fft_size"] = fft_size; j["cyclic_prefix_length"] = cyclic_prefix_length; j["baud"] = baud; return j; } }; struct EnvTxOok { double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ook"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["baud"] = baud; return j; } }; struct EnvTxP25 { double snr = 10; double center_frequency = 0; int modulation_order = 4; double baud = 4800; int samples_per_symbol = 8; double freq_sep = 1200; double transmitter_start_time = 0; int count = 1; Duid duid = Duid::voice_ldu1; int nac = 659; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "p25"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["modulation_order"] = modulation_order; j["baud"] = baud; j["samples_per_symbol"] = samples_per_symbol; j["freq_sep"] = freq_sep; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["duid"] = to_string(duid); j["nac"] = nac; return j; } }; struct EnvTxP25_group { double transmitter_start_time = 0; int count = 1; int channels = 4; std::string center_frequency = "769000000:12500:774987500"; int nac = 659; std::string call_duration = "2-8"; std::string idle = "1-10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "p25_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["channels"] = channels; j["center_frequency"] = center_frequency; j["nac"] = nac; j["call_duration"] = call_duration; j["idle"] = idle; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxP25_transmitter { std::string center_frequency = "769000000:12500:774987500"; double transmitter_start_time = 0; int count = 1; std::string role = "traffic"; int nac = 659; std::string talkgroup = "1-65535"; std::string call_duration = "2-8"; std::string idle = "1-10"; double first_call = 0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "p25_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["role"] = role; j["nac"] = nac; j["talkgroup"] = talkgroup; j["call_duration"] = call_duration; j["idle"] = idle; j["first_call"] = first_call; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxPam { double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; int modulation_order = 4; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "pam"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct EnvTxPsk { double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; int modulation_order = 4; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "psk"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct EnvTxQam { double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "rectangle"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; int modulation_order = 16; double baud = 4800; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "qam"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["modulation_order"] = modulation_order; j["baud"] = baud; return j; } }; struct EnvTxTetra { double snr = 10; double center_frequency = 0; int samples_per_symbol = 8; std::string pulse_shape = "root_raised_cosine"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; double baud = 18000; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tetra"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["baud"] = baud; return j; } }; struct EnvTxTetra_group { double transmitter_start_time = 0; int count = 1; int carriers = 3; std::string center_frequency = "390000000:25000:391975000"; int mcc = 901; int mnc = 1; std::string colour_code = "1-63"; std::string call_duration = "2-8"; std::string idle = "1-10"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tetra_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["carriers"] = carriers; j["center_frequency"] = center_frequency; j["mcc"] = mcc; j["mnc"] = mnc; j["colour_code"] = colour_code; j["call_duration"] = call_duration; j["idle"] = idle; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxTetra_transmitter { std::string center_frequency = "390000000:25000:399975000"; int samples_per_symbol = 8; std::string pulse_shape = "root_raised_cosine"; int pulse_shape_span = 6; double pulse_shape_rolloff = 0.35; double transmitter_start_time = 0; int count = 1; int mcc = 901; int mnc = 1; std::string colour_code = "1-63"; std::string carrier_number = "0-4095"; std::string carrier_role = "main"; std::string call_duration = "2-8"; std::string idle = "1-10"; double baud = 18000; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tetra_transmitter"; j["center_frequency"] = center_frequency; j["samples_per_symbol"] = samples_per_symbol; j["pulse_shape"] = pulse_shape; j["pulse_shape_span"] = pulse_shape_span; j["pulse_shape_rolloff"] = pulse_shape_rolloff; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["mcc"] = mcc; j["mnc"] = mnc; j["colour_code"] = colour_code; j["carrier_number"] = carrier_number; j["carrier_role"] = carrier_role; j["call_duration"] = call_duration; j["idle"] = idle; j["baud"] = baud; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxTone { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; double duration = 0.1; double phase = 0; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tone"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["duration"] = duration; j["phase"] = phase; return j; } }; struct EnvTxWifi { double snr = 10; double center_frequency = 0; double transmitter_start_time = 0; int count = 1; std::string data_rate = "36"; std::string psdu = "0402002E006008CD37A60020D6013CF1006008AD3BAF00004A6F792C2062726967687420"; int scrambler_init = 93; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "wifi"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["data_rate"] = data_rate; j["psdu"] = psdu; j["scrambler_init"] = scrambler_init; return j; } }; struct EnvTxWifi_group { double transmitter_start_time = 0; int count = 1; int access_points = 4; std::string center_frequency = "5180000000:20000000:5825000000"; double beacon_interval = 0.1024; std::string traffic = "0-20"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "wifi_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["access_points"] = access_points; j["center_frequency"] = center_frequency; j["beacon_interval"] = beacon_interval; j["traffic"] = traffic; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxWifi_transmitter { std::string center_frequency = "5180000000:20000000:5825000000"; double transmitter_start_time = 0; int count = 1; std::string ssid = "SIGTERA"; std::string bssid = "1-16777214"; double beacon_interval = 0.1024; std::string traffic = "0-20"; std::string uptime = "0-86400"; std::string sequence_start = "0-4095"; std::string data_rate = "36"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "wifi_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["ssid"] = ssid; j["bssid"] = bssid; j["beacon_interval"] = beacon_interval; j["traffic"] = traffic; j["uptime"] = uptime; j["sequence_start"] = sequence_start; j["data_rate"] = data_rate; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxZigbee { double snr = 10; std::string center_frequency = "2405000000:5000000:2480000000"; double transmitter_start_time = 0; int count = 1; int channel = 11; std::string psdu = "6188A1FFFF0000010203040506078F62"; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "zigbee"; j["snr"] = snr; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["channel"] = channel; j["psdu"] = psdu; return j; } }; struct EnvTxZigbee_group { double transmitter_start_time = 0; int count = 1; int end_devices = 5; int routers = 1; int channel = 11; std::string pan_id = "0x1A62"; std::string center_frequency = "2405000000"; std::string report_interval = "0.5-10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "zigbee_group"; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["end_devices"] = end_devices; j["routers"] = routers; j["channel"] = channel; j["pan_id"] = pan_id; j["center_frequency"] = center_frequency; j["report_interval"] = report_interval; j["snr"] = snr; j["length"] = length; return j; } }; struct EnvTxZigbee_transmitter { std::string center_frequency = "2405000000:5000000:2480000000"; double transmitter_start_time = 0; int count = 1; int channel = 11; std::string pan_id = "0x1A62"; std::string short_address = "1-65534"; int parent_address = 0; std::string sequence_start = "0-255"; std::string payload = "0102030405060708"; std::string report_interval = "0.5-10"; double first_report = 0; std::string snr = "5-30"; double length = 10; DeviceRole device_role = DeviceRole::end_device; double poll_interval = 7.5; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "zigbee_transmitter"; j["center_frequency"] = center_frequency; j["transmitter_start_time"] = transmitter_start_time; j["count"] = count; j["channel"] = channel; j["pan_id"] = pan_id; j["short_address"] = short_address; j["parent_address"] = parent_address; j["sequence_start"] = sequence_start; j["payload"] = payload; j["report_interval"] = report_interval; j["first_report"] = first_report; j["snr"] = snr; j["length"] = length; j["device_role"] = to_string(device_role); j["poll_interval"] = poll_interval; return j; } }; struct _EnvReceiver { DataType data_type = DataType::iq; Format format = Format::raw; Precision precision = Precision::float32; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; double sample_rate = 100000; double acquisition_frequency = 0; nlohmann::json to_json() const { nlohmann::json j; j["element"] = "receiver"; j["data_type"] = to_string(data_type); j["format"] = to_string(format); j["precision"] = to_string(precision); j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["sample_rate"] = sample_rate; j["acquisition_frequency"] = acquisition_frequency; return j; } }; class _EnvTransmitter { public: _EnvTransmitter& Acars(EnvTxAcars p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Acars_group(EnvTxAcars_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Acars_transmitter(EnvTxAcars_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Adsb(EnvTxAdsb p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Adsb_group(EnvTxAdsb_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Adsb_transmitter(EnvTxAdsb_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Ais_group(EnvTxAis_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Ais_message(EnvTxAis_message p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Ais_transmitter(EnvTxAis_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Am(EnvTxAm p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Am_group(EnvTxAm_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Aprs(EnvTxAprs p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Aprs_group(EnvTxAprs_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Aprs_transmitter(EnvTxAprs_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Apsk(EnvTxApsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Ask(EnvTxAsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Ble(EnvTxBle p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Ble_group(EnvTxBle_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Ble_transmitter(EnvTxBle_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Chirp(EnvTxChirp p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Cpfsk(EnvTxCpfsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Dmr(EnvTxDmr p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Dmr_group(EnvTxDmr_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Dmr_transmitter(EnvTxDmr_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Dpsk(EnvTxDpsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Dqpsk(EnvTxDqpsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Dsss(EnvTxDsss p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Fhss(EnvTxFhss p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Fm(EnvTxFm p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Fm_group(EnvTxFm_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Fsk(EnvTxFsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Gfsk(EnvTxGfsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Gmsk(EnvTxGmsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Gps(EnvTxGps p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Gps_group(EnvTxGps_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Gsm(EnvTxGsm p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Gsm_group(EnvTxGsm_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Gsm_transmitter(EnvTxGsm_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Iridium(EnvTxIridium p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Iridium_group(EnvTxIridium_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Iridium_handset(EnvTxIridium_handset p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Iridium_satellite(EnvTxIridium_satellite p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Lora(EnvTxLora p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Lorawan(EnvTxLorawan p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Lorawan_group(EnvTxLorawan_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Lorawan_transmitter(EnvTxLorawan_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Meshcore(EnvTxMeshcore p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Meshcore_group(EnvTxMeshcore_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Meshcore_transmitter(EnvTxMeshcore_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Meshtastic(EnvTxMeshtastic p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Meshtastic_group(EnvTxMeshtastic_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Meshtastic_transmitter(EnvTxMeshtastic_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Msk(EnvTxMsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Ofdm(EnvTxOfdm p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Ook(EnvTxOok p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& P25(EnvTxP25 p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& P25_group(EnvTxP25_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& P25_transmitter(EnvTxP25_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Pam(EnvTxPam p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Psk(EnvTxPsk p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Qam(EnvTxQam p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Tetra(EnvTxTetra p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Tetra_group(EnvTxTetra_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Tetra_transmitter(EnvTxTetra_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Tone(EnvTxTone p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Wifi(EnvTxWifi p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Wifi_group(EnvTxWifi_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Wifi_transmitter(EnvTxWifi_transmitter p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Zigbee(EnvTxZigbee p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Zigbee_group(EnvTxZigbee_group p = {}) { sig_ = p.to_json(); return *this; } _EnvTransmitter& Zigbee_transmitter(EnvTxZigbee_transmitter p = {}) { sig_ = p.to_json(); return *this; } nlohmann::json to_json() const { nlohmann::json j; j["element"] = "transmitter"; if (!sig_.is_null()) { for (auto& [k, v] : sig_.items()) j[k] = v; } return j; } private: nlohmann::json sig_; }; class _EnvPlatform { public: double latitude = 0; double longitude = 0; double altitude = 0; double velocity_east = 0; double velocity_north = 0; double velocity_up = 0; SelfInterferenceCancelation self_interference_cancelation = SelfInterferenceCancelation::True; _EnvPlatform& Receiver(_EnvReceiver p = {}) { elements_.push_back(p.to_json()); return *this; } _EnvPlatform& Transmitter(_EnvTransmitter p = {}) { elements_.push_back(p.to_json()); return *this; } nlohmann::json to_json() const { nlohmann::json j, elems = nlohmann::json::array(); j["platform"] = "platform"; j["latitude"] = latitude; j["longitude"] = longitude; j["altitude"] = altitude; j["velocity_east"] = velocity_east; j["velocity_north"] = velocity_north; j["velocity_up"] = velocity_up; j["self_interference_cancelation"] = to_string(self_interference_cancelation); for (auto& e : elements_) elems.push_back(e); j["element"] = elems; return j; } private: std::vector elements_; }; class _Environment : public _ReceiverBase { public: std::string seed = "0-4294967295"; double length = 10; double speed_of_propagation = 300000000.0; double path_loss_exponent = 2; _Environment& Platform(_EnvPlatform p = {}) { platforms_.push_back(p.to_json()); return *this; } nlohmann::json to_json() const override { nlohmann::json j, plats = nlohmann::json::array(); j["mode"] = "environment_simulation"; j["seed"] = seed; j["length"] = length; j["speed_of_propagation"] = speed_of_propagation; j["path_loss_exponent"] = path_loss_exponent; for (auto& p : platforms_) plats.push_back(p); j["platform"] = plats; return j; } private: std::vector platforms_; }; struct SdrAcars_group { double signal_start_time = 0; int aircraft = 6; std::string center_frequency = "131550000"; double center_lat = 37.5; double center_lon = -122.4; double radius = 200.0; std::string altitude = "1000-40000"; std::string ground_speed = "150-500"; std::string report_interval = "10-120"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "acars_group"; j["signal_start_time"] = signal_start_time; j["aircraft"] = aircraft; j["center_frequency"] = center_frequency; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["altitude"] = altitude; j["ground_speed"] = ground_speed; j["report_interval"] = report_interval; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrAdsb_group { double signal_start_time = 0; int aircraft = 8; int ground_aircraft = 0; double center_lat = 37.5; double center_lon = -122.4; double radius = 100.0; std::string altitude = "1000-40000"; std::string ground_speed = "150-500"; std::string vertical_rate = "-1000-1000"; std::string taxi_speed = "0-30"; std::string snr = "5-30"; std::string center_frequency = "1090000000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "adsb_group"; j["signal_start_time"] = signal_start_time; j["aircraft"] = aircraft; j["ground_aircraft"] = ground_aircraft; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["altitude"] = altitude; j["ground_speed"] = ground_speed; j["vertical_rate"] = vertical_rate; j["taxi_speed"] = taxi_speed; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct SdrAis_group { double signal_start_time = 0; int vessels = 8; int class_b_vessels = 0; int base_stations = 0; int atons = 0; int sar_aircraft = 0; double center_lat = 37.75; double center_lon = -122.45; double radius = 10.0; std::string speed = "0-20"; std::string snr = "5-30"; std::string center_frequency = "161975000,162025000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ais_group"; j["signal_start_time"] = signal_start_time; j["vessels"] = vessels; j["class_b_vessels"] = class_b_vessels; j["base_stations"] = base_stations; j["atons"] = atons; j["sar_aircraft"] = sar_aircraft; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["speed"] = speed; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct SdrAm_group { double signal_start_time = 0; int stations = 8; std::string center_frequency = "540000:10000:1700000"; double modulation_index = 0.8; double message_bandwidth = 5000; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "am_group"; j["signal_start_time"] = signal_start_time; j["stations"] = stations; j["center_frequency"] = center_frequency; j["modulation_index"] = modulation_index; j["message_bandwidth"] = message_bandwidth; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrAprs_group { double signal_start_time = 0; int mobiles = 6; int home_stations = 1; int digipeaters = 1; int igates = 0; double center_lat = 37.75; double center_lon = -122.45; double radius = 30.0; std::string speed = "0-60"; std::string beacon_interval = "600-1800"; std::string snr = "5-30"; std::string center_frequency = "144390000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "aprs_group"; j["signal_start_time"] = signal_start_time; j["mobiles"] = mobiles; j["home_stations"] = home_stations; j["digipeaters"] = digipeaters; j["igates"] = igates; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["speed"] = speed; j["beacon_interval"] = beacon_interval; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct SdrBle_group { double signal_start_time = 0; int devices = 8; int beacons = 4; int directed = 0; std::string advertising_interval = "0.05-1.0"; std::string beacon_uuid = "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0"; int major = 1; std::string snr = "5-30"; std::string center_frequency = "2402000000"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "ble_group"; j["signal_start_time"] = signal_start_time; j["devices"] = devices; j["beacons"] = beacons; j["directed"] = directed; j["advertising_interval"] = advertising_interval; j["beacon_uuid"] = beacon_uuid; j["major"] = major; j["snr"] = snr; j["center_frequency"] = center_frequency; j["length"] = length; return j; } }; struct SdrDmr_group { double signal_start_time = 0; int repeaters = 4; std::string center_frequency = "451000000:12500:452987500"; std::string call_duration = "2-8"; std::string idle = "1-10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "dmr_group"; j["signal_start_time"] = signal_start_time; j["repeaters"] = repeaters; j["center_frequency"] = center_frequency; j["call_duration"] = call_duration; j["idle"] = idle; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrFm_group { double signal_start_time = 0; int stations = 8; std::string center_frequency = "88100000:200000:107900000"; double deviation = 75000; double message_bandwidth = 15000; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "fm_group"; j["signal_start_time"] = signal_start_time; j["stations"] = stations; j["center_frequency"] = center_frequency; j["deviation"] = deviation; j["message_bandwidth"] = message_bandwidth; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrGps_group { double signal_start_time = 0; int satellites = 8; std::string prn = "1:1:32"; std::string center_frequency = "1575420000"; std::string doppler = "-5000-5000"; std::string snr = "5-30"; double length = 0.02; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gps_group"; j["signal_start_time"] = signal_start_time; j["satellites"] = satellites; j["prn"] = prn; j["center_frequency"] = center_frequency; j["doppler"] = doppler; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrGsm_group { double signal_start_time = 0; int cells = 6; std::string center_frequency = "935200000:200000:959800000"; int ncc = 0; std::string busy_timeslots = "0,1,2,3,4,5,6,7"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "gsm_group"; j["signal_start_time"] = signal_start_time; j["cells"] = cells; j["center_frequency"] = center_frequency; j["ncc"] = ncc; j["busy_timeslots"] = busy_timeslots; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrIridium_group { double signal_start_time = 0; int satellites = 6; int handsets = 2; std::string satellite = "1:1:66"; double center_lat = 37.5; double center_lon = -122.4; double radius = 2500.0; std::string beam = "1-48"; std::string beacon_interval = "1-4"; double broadcast_interval = 4.32; int iridium_time = 1073741824; std::string session_interval = "3-8"; std::string snr = "5-30"; std::string center_frequency = "1626270833"; std::string uplink_frequency = "1616020833:41667:1626437500"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "iridium_group"; j["signal_start_time"] = signal_start_time; j["satellites"] = satellites; j["handsets"] = handsets; j["satellite"] = satellite; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["beam"] = beam; j["beacon_interval"] = beacon_interval; j["broadcast_interval"] = broadcast_interval; j["iridium_time"] = iridium_time; j["session_interval"] = session_interval; j["snr"] = snr; j["center_frequency"] = center_frequency; j["uplink_frequency"] = uplink_frequency; j["length"] = length; return j; } }; struct SdrLorawan_group { std::string center_frequency = "902300000:200000:914900000"; double signal_start_time = 0; int devices = 6; std::string tx_interval = "5-60"; std::string spreading_factor = "7,8,9,10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "lorawan_group"; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["devices"] = devices; j["tx_interval"] = tx_interval; j["spreading_factor"] = spreading_factor; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrMeshcore_group { double center_frequency = 910525000; double signal_start_time = 0; int devices = 6; int repeaters = 1; double center_lat = 37.5; double center_lon = -122.4; double radius = 20.0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshcore_group"; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["devices"] = devices; j["repeaters"] = repeaters; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrMeshtastic_group { std::string center_frequency = "902000000:250000:927750000"; double signal_start_time = 0; int devices = 6; std::string modem_preset = "long_fast"; double center_lat = 37.5; double center_lon = -122.4; double radius = 20.0; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "meshtastic_group"; j["center_frequency"] = center_frequency; j["signal_start_time"] = signal_start_time; j["devices"] = devices; j["modem_preset"] = modem_preset; j["center_lat"] = center_lat; j["center_lon"] = center_lon; j["radius"] = radius; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrP25_group { double signal_start_time = 0; int channels = 4; std::string center_frequency = "769000000:12500:774987500"; int nac = 659; std::string call_duration = "2-8"; std::string idle = "1-10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "p25_group"; j["signal_start_time"] = signal_start_time; j["channels"] = channels; j["center_frequency"] = center_frequency; j["nac"] = nac; j["call_duration"] = call_duration; j["idle"] = idle; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrTetra_group { double signal_start_time = 0; int carriers = 3; std::string center_frequency = "390000000:25000:391975000"; int mcc = 901; int mnc = 1; std::string colour_code = "1-63"; std::string call_duration = "2-8"; std::string idle = "1-10"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "tetra_group"; j["signal_start_time"] = signal_start_time; j["carriers"] = carriers; j["center_frequency"] = center_frequency; j["mcc"] = mcc; j["mnc"] = mnc; j["colour_code"] = colour_code; j["call_duration"] = call_duration; j["idle"] = idle; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrWifi_group { double signal_start_time = 0; int access_points = 4; std::string center_frequency = "5180000000:20000000:5825000000"; double beacon_interval = 0.1024; std::string traffic = "0-20"; std::string snr = "5-30"; double length = 1; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "wifi_group"; j["signal_start_time"] = signal_start_time; j["access_points"] = access_points; j["center_frequency"] = center_frequency; j["beacon_interval"] = beacon_interval; j["traffic"] = traffic; j["snr"] = snr; j["length"] = length; return j; } }; struct SdrZigbee_group { double signal_start_time = 0; int end_devices = 5; int routers = 1; int channel = 11; std::string pan_id = "0x1A62"; std::string center_frequency = "2405000000"; std::string report_interval = "0.5-10"; std::string snr = "5-30"; double length = 10; nlohmann::json to_json() const { nlohmann::json j; j["signal"] = "zigbee_group"; j["signal_start_time"] = signal_start_time; j["end_devices"] = end_devices; j["routers"] = routers; j["channel"] = channel; j["pan_id"] = pan_id; j["center_frequency"] = center_frequency; j["report_interval"] = report_interval; j["snr"] = snr; j["length"] = length; return j; } }; class _VirtualSDR : public _ReceiverBase { public: std::string seed = "0-4294967295"; DataType data_type = DataType::iq; Format format = Format::raw; Precision precision = Precision::float32; FrontEnd front_end = FrontEnd::front_end; double clock_offset = 0; double dc_offset_i = 0; double dc_offset_q = 0; double iq_gain_imbalance = 0; double iq_phase_imbalance = 0; double phase_noise = 0; double cfo = 0; int noise = -10; double acquisition_frequency = 162000000; double length = 1; double sample_rate = 2000000; _VirtualSDR& Acars_group(SdrAcars_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Adsb_group(SdrAdsb_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Ais_group(SdrAis_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Am_group(SdrAm_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Aprs_group(SdrAprs_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Ble_group(SdrBle_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Dmr_group(SdrDmr_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Fm_group(SdrFm_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Gps_group(SdrGps_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Gsm_group(SdrGsm_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Iridium_group(SdrIridium_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Lorawan_group(SdrLorawan_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Meshcore_group(SdrMeshcore_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Meshtastic_group(SdrMeshtastic_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& P25_group(SdrP25_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Tetra_group(SdrTetra_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Wifi_group(SdrWifi_group p = {}) { signals_.push_back(p.to_json()); return *this; } _VirtualSDR& Zigbee_group(SdrZigbee_group p = {}) { signals_.push_back(p.to_json()); return *this; } nlohmann::json to_json() const override { nlohmann::json j, sigs = nlohmann::json::array(); j["mode"] = "virtual_sdr"; j["seed"] = seed; j["data_type"] = to_string(data_type); j["format"] = to_string(format); j["precision"] = to_string(precision); j["front_end"] = to_string(front_end); j["clock_offset"] = clock_offset; j["dc_offset_i"] = dc_offset_i; j["dc_offset_q"] = dc_offset_q; j["iq_gain_imbalance"] = iq_gain_imbalance; j["iq_phase_imbalance"] = iq_phase_imbalance; j["phase_noise"] = phase_noise; j["cfo"] = cfo; j["noise"] = noise; j["acquisition_frequency"] = acquisition_frequency; j["length"] = length; j["sample_rate"] = sample_rate; for (auto& s : signals_) sigs.push_back(s); j["signal"] = sigs; return j; } private: std::vector signals_; }; struct Frame { nlohmann::json params; std::vector data; }; class Client { public: explicit Client(std::string url = "https://api.sigtera.com") : url_(std::move(url)) {} _BasebandCuts& narrowband() { auto p = std::make_unique<_BasebandCuts>(); auto& ref = *p; requests_.push_back(std::move(p)); return ref; } _Wideband& wideband() { auto p = std::make_unique<_Wideband>(); auto& ref = *p; requests_.push_back(std::move(p)); return ref; } _Environment& environment() { auto p = std::make_unique<_Environment>(); auto& ref = *p; requests_.push_back(std::move(p)); return ref; } _VirtualSDR& virtual_sdr() { auto p = std::make_unique<_VirtualSDR>(); auto& ref = *p; requests_.push_back(std::move(p)); return ref; } std::vector simulate() { std::vector out; for (auto& req : requests_) { auto frames = _send(req->to_json()); out.insert(out.end(), frames.begin(), frames.end()); } return out; } private: std::string url_; std::vector> requests_; static size_t _write_cb(char* ptr, size_t size, size_t n, void* ud) { auto* buf = static_cast*>(ud); buf->insert(buf->end(), ptr, ptr + size * n); return size * n; } std::vector _send(const nlohmann::json& body) { std::string payload = body.dump(); std::vector raw; CURL* curl = curl_easy_init(); if (!curl) throw std::runtime_error("curl_easy_init failed"); std::string endpoint = url_ + "/api"; struct curl_slist* hdrs = curl_slist_append(nullptr, "Content-Type: application/json"); curl_easy_setopt(curl, CURLOPT_URL, endpoint.c_str()); curl_easy_setopt(curl, CURLOPT_POST, 1L); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, payload.c_str()); curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)payload.size()); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, hdrs); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _write_cb); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &raw); CURLcode res = curl_easy_perform(curl); curl_slist_free_all(hdrs); curl_easy_cleanup(curl); if (res != CURLE_OK) throw std::runtime_error(curl_easy_strerror(res)); return _parse(raw); } std::vector _parse(const std::vector& raw) { std::vector frames; size_t pos = 0; auto read_u32 = [&]() -> uint32_t { if (pos + 4 > raw.size()) return 0; uint32_t n = (uint32_t(raw[pos]) << 24) | (uint32_t(raw[pos+1]) << 16) | (uint32_t(raw[pos+2]) << 8) | uint32_t(raw[pos+3]); pos += 4; return n; }; while (pos < raw.size()) { uint32_t jlen = read_u32(); if (pos + jlen > raw.size()) break; auto params = nlohmann::json::parse(raw.begin() + pos, raw.begin() + pos + jlen); pos += jlen; std::vector data; for (;;) { uint32_t blen = read_u32(); if (blen == 0) break; if (pos + blen > raw.size()) break; data.insert(data.end(), raw.begin() + pos, raw.begin() + pos + blen); pos += blen; } frames.push_back({std::move(params), std::move(data)}); } return frames; } }; } // namespace sigtera