Client API
Programmatic Access
Generate signal datasets directly from your code. Connect a client, describe your receiver and signals, and stream the results.
Examples
#include <iostream>
#include "sigtera.h"
int main() {
// baseband cuts — one file per signal
sigtera::Client client;
auto& nb = client.narrowband();
nb.format = sigtera::Format::raw;
nb.Tone({.count=3, .snr=20, .center_frequency=10000, .duration=0.05});
nb.Psk({.count=2, .snr=15, .modulation_order=8, .baud=9600});
for (auto& [params, data] : client.simulate())
std::cout << params["signal"].get<std::string>() << ": " << data.size() << " bytes\n";
// wideband — all signals composited into one recording
sigtera::Client client2;
auto& wb = client2.wideband();
wb.sample_rate = 200000;
wb.length = 12.0;
wb.acquisition_frequency = 162000000; // tuned between the two AIS channels
wb.Tone({.snr=10, .center_frequency=162060000, .signal_start_time=0.0, .duration=0.2});
wb.Ais_group({.vessels=4, .radius=5.0}); // a cell of vessels reporting on AIS 1 / AIS 2
auto results = client2.simulate();
std::cout << "wideband output: " << results[0].data.size() << " bytes\n";
// environment simulation — propagation delay and path loss between platforms
sigtera::Client client3;
auto& env = client3.environment();
env.length = 2.0;
sigtera::_EnvTransmitter t;
t.Tone({.snr=20, .center_frequency=5000, .duration=1.0});
sigtera::_EnvPlatform tx; // at (0, 0)
tx.Transmitter(t);
env.Platform(tx);
sigtera::_EnvPlatform rx;
rx.latitude = 0.001; // ~111 m north of the transmitter
rx.Receiver({.noise=-20, .sample_rate=50000});
env.Platform(rx);
auto env_results = client3.simulate();
std::cout << "env sim output: " << env_results[0].data.size() << " bytes\n";
}
from sigtera import SigteraClient, Format
# baseband cuts — one file per signal
client = SigteraClient()
nb = client.narrowband(format=Format.raw)
nb.Tone(count=3, snr=20, center_frequency=10000, duration=0.05)
nb.PSK(count=2, snr=15, modulation_order=8, baud=9600)
for params, raw in client.simulate():
print(params['signal'], len(raw), 'bytes')
# wideband — all signals composited into one recording
client = SigteraClient()
wb = client.wideband(sample_rate=200000, length=12.0, acquisition_frequency=162000000) # tuned between the AIS channels
wb.Tone(snr=10, center_frequency=162060000, signal_start_time=0.0, duration=0.2)
wb.Ais_group(vessels=4, radius=5.0) # a cell of vessels reporting on AIS 1 / AIS 2
params, raw = next(client.simulate())
print('wideband output:', len(raw), 'bytes')
# environment simulation — propagation delay and path loss between platforms
client = SigteraClient()
env = client.environment(length=2.0)
tx = env.Platform(latitude=0.0, longitude=0.0)
tx.Transmitter().Tone(snr=20, center_frequency=5000, duration=1.0)
rx = env.Platform(latitude=0.001, longitude=0.0) # ~111 m north of the transmitter
rx.Receiver(noise=-20, sample_rate=50000)
params, raw = next(client.simulate())
print('env sim output:', len(raw), 'bytes')