1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-22 17:45:48 -05:00

Normalise pulse shaping. Enable RTTY Mod in Demod analyser.

This commit is contained in:
srcejon 2023-09-04 09:36:19 +01:00
parent ad2bb38bfc
commit 0f0c1e108b
5 changed files with 123 additions and 62 deletions

1
.gitignore vendored
View File

@ -43,3 +43,4 @@ obj-x86_64-linux-gnu/*
/rescuesdriq/vendor/
/rescuesdriq/Godeps/
/.vs

View File

@ -1,56 +1,94 @@
{
"version": 3,
"configurePresets": [
{
"name": "default",
"binaryDir": "build-default",
"cacheVariables": {
"DEBUG_OUTPUT": "ON",
"AIRSPYHF_DIR": "/opt/install/libairspyhf",
"AIRSPY_DIR": "/opt/install/libairspy",
"APT_DIR": "/opt/install/aptdec",
"BLADERF_DIR": "/opt/install/libbladeRF",
"CM256CC_DIR": "/opt/install/cm256cc",
"CODEC2_DIR": "/opt/install/codec2",
"DAB_DIR": "/opt/install/libdab",
"DSDCC_DIR": "/opt/install/dsdcc",
"HACKRF_DIR": "/opt/install/libhackrf",
"HAMLIB_DIR": "/opt/build/hamlib-prefix",
"IIO_DIR": "/opt/install/libiio",
"LIBSIGMF_DIR": "/opt/install/libsigmf",
"LIMESUITE_DIR": "/opt/install/LimeSuite",
"MBE_DIR": "/opt/install/mbelib",
"MIRISDR_DIR": "/opt/install/libmirisdr",
"PERSEUS_DIR": "/opt/install/libperseus",
"RTLSDR_DIR": "/opt/install/librtlsdr",
"SERIALDV_DIR": "/opt/install/serialdv",
"SGP4_DIR": "/opt/install/sgp4",
"SOAPYSDR_DIR": "/opt/install/SoapySDR",
"UHD_DIR": "/opt/install/uhd",
"XTRX_DIR": "/opt/install/xtrx-images",
"CMAKE_INSTALL_PREFIX": "/opt/install/sdrangel"
},
"warnings": {
"dev": false
}
{
"name": "default",
"binaryDir": "build-default",
"cacheVariables": {
"DEBUG_OUTPUT": "ON",
"AIRSPYHF_DIR": "/opt/install/libairspyhf",
"AIRSPY_DIR": "/opt/install/libairspy",
"APT_DIR": "/opt/install/aptdec",
"BLADERF_DIR": "/opt/install/libbladeRF",
"CM256CC_DIR": "/opt/install/cm256cc",
"CODEC2_DIR": "/opt/install/codec2",
"DAB_DIR": "/opt/install/libdab",
"DSDCC_DIR": "/opt/install/dsdcc",
"HACKRF_DIR": "/opt/install/libhackrf",
"HAMLIB_DIR": "/opt/build/hamlib-prefix",
"IIO_DIR": "/opt/install/libiio",
"LIBSIGMF_DIR": "/opt/install/libsigmf",
"LIMESUITE_DIR": "/opt/install/LimeSuite",
"MBE_DIR": "/opt/install/mbelib",
"MIRISDR_DIR": "/opt/install/libmirisdr",
"PERSEUS_DIR": "/opt/install/libperseus",
"RTLSDR_DIR": "/opt/install/librtlsdr",
"SERIALDV_DIR": "/opt/install/serialdv",
"SGP4_DIR": "/opt/install/sgp4",
"SOAPYSDR_DIR": "/opt/install/SoapySDR",
"UHD_DIR": "/opt/install/uhd",
"XTRX_DIR": "/opt/install/xtrx-images",
"CMAKE_INSTALL_PREFIX": "/opt/install/sdrangel"
},
{
"name": "default-qt6",
"inherits": "default",
"binaryDir": "build-qt6",
"cacheVariables": {
"ENABLE_QT6": "ON"
}
"warnings": {
"dev": false
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"hostOS": [ "Linux" ]
}
}
},
{
// Don't inherit from "default", as we don't want UHD_DIR etc set
"name": "default-windows",
"binaryDir": "c:/users/jon/source/repos/sdrangel/build",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"DEBUG_OUTPUT": "ON",
"RX_SAMPLE_24BIT": "ON",
"DARCH_OPT": "SSE4_1",
"HIDE_CONSOLE": "OFF",
"ENABLE_AIRSPY": "ON",
"ENABLE_BLADERF": "OFF",
"ENABLE_HACKRF": "OFF",
"ENABLE_IIO": "OFF",
"ENABLE_MIRISDR": "OFF",
"ENABLE_PERSEUS": "OFF",
"ENABLE_XTRX": "OFF",
"BUILD_SERVER": "OFF",
"CMAKE_PREFIX_PATH": "C:/Qt/5.15.2/msvc2019_64;C:/Applications/boost_1_81_0"
},
"warnings": {
"dev": false
},
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"hostOS": [ "Windows" ]
}
}
},
{
"name": "default-qt6",
"inherits": "default",
"binaryDir": "build-qt6",
"cacheVariables": {
"ENABLE_QT6": "ON"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default"
},
{
"name": "default-qt6",
"configurePreset": "default-qt6"
}
]
"buildPresets": [
{
"name": "default",
"configurePreset": "default"
},
{
"name": "default-windows",
"configurePreset": "default-windows"
},
{
"name": "default-qt6",
"configurePreset": "default-qt6"
}
]
}

View File

@ -2,7 +2,10 @@
<h2>Introduction</h2>
This plugin can be used to transmit RTTY encoded text.
This plugin can be used to modulate RTTY (Radioteletype) encoded text.
RTTY uses BFSK (Binary Frequency Shift Keying), where transmission of data alternates between two frequencies,
the mark frequency and the space frequency. The RTTY Modulator should be centered in between these frequencies.
The baud rate, frequency shift (difference between mark and space frequencies), filter bandwidth and baudot character set are configurable.
<h2>Interface</h2>
@ -64,7 +67,14 @@ UDP port number to receive text to be transmitted on.
<h3>13: Baudot Character Set</h3>
Specifies the Baudot character set used to encode the text to transmit.
Specifies the Baudot character set used to encode the text to transmit. The following character sets are supported:
* ITA 2
* UK
* European
* US
* Russian
* Murray
<h3>14: Bit Ordering</h3>
@ -90,11 +100,20 @@ Press to clear the transmitted text.
Enter text to transmit. Pressing return will transmit the text and clear this field. Press the arrow to display and select a list of pre-defined text or previously transmitted text to enter in to the field.
The list of pre-defined text can be customised via the Transmit Settings dialog (20).
<h3>20: TX</h3>
Press to transmits the current text. The text field will not be cleared.
Press to transmit the current text. The text field will not be cleared.
Right click to open a dialog to adjust additional transmitter settings.
Right click to open a dialog to adjust additional Transmit Settings, including the list of pre-defined text.
Predefined text supports the following variable substitutions:
* ${callsign} - Gets replaced with the station name from Preferences > My Position
* ${location} = Gets replaced with the Maidenhead locator for the position specified under Preferences > My Position
The substitutions are applied when the Transmit Settings dialog is closed.
<h2>API</h2>

View File

@ -43,7 +43,7 @@ RttyModSource::RttyModSource() :
{
m_bits.append(0);
m_lowpass.create(301, m_channelSampleRate, 400.0 / 2.0);
m_pulseShape.create(0.5, 6, m_channelSampleRate/45.45);
m_pulseShape.create(0.5, 6, m_channelSampleRate / 45.45, true);
m_demodBuffer.resize(1<<12);
m_demodBufferFill = 0;
@ -121,7 +121,7 @@ void RttyModSource::sampleToSpectrum(Complex sample)
void RttyModSource::modulateSample()
{
Real audioMod;
Real mod;
if (m_sampleIdx == 0)
{
@ -154,18 +154,18 @@ void RttyModSource::modulateSample()
if (m_settings.m_pulseShaping)
{
if (m_sampleIdx == 1) {
audioMod = m_pulseShape.filter(m_bit ? 1.0f : -1.0f);
mod = m_pulseShape.filter(m_bit ? 1.0f : -1.0f);
} else {
audioMod = m_pulseShape.filter(0.0f);
mod = m_pulseShape.filter(0.0f);
}
}
else
{
audioMod = m_bit ? 1.0f : -1.0f;
mod = m_bit ? 1.0f : -1.0f;
}
// FM
m_fmPhase += m_phaseSensitivity * audioMod * (m_settings.m_spaceHigh ? -1.0f : 1.0f);
m_fmPhase += m_phaseSensitivity * mod * (m_settings.m_spaceHigh ? -1.0f : 1.0f);
// Keep phase in range -pi,pi
if (m_fmPhase > M_PI) {
m_fmPhase -= 2.0f * M_PI;
@ -194,7 +194,8 @@ void RttyModSource::modulateSample()
Real s = std::real(m_modSample);
calculateLevel(s);
m_demodBuffer[m_demodBufferFill] = audioMod * std::numeric_limits<int16_t>::max();
// Send to demod analyser
m_demodBuffer[m_demodBufferFill] = mod * std::numeric_limits<int16_t>::max();
++m_demodBufferFill;
if (m_demodBufferFill >= m_demodBuffer.size())
@ -258,7 +259,7 @@ void RttyModSource::applySettings(const RttyModSettings& settings, bool force)
<< " symbolSpan: " << settings.m_symbolSpan
<< " channelSampleRate:" << m_channelSampleRate
<< " baud:" << settings.m_baud;
m_pulseShape.create(settings.m_beta, m_settings.m_symbolSpan, m_channelSampleRate/settings.m_baud);
m_pulseShape.create(settings.m_beta, settings.m_symbolSpan, m_channelSampleRate/settings.m_baud, true);
}
if ((settings.m_characterSet != m_settings.m_characterSet) || force) {
@ -302,7 +303,7 @@ void RttyModSource::applyChannelSettings(int channelSampleRate, int channelFrequ
<< " symbolSpan: " << m_settings.m_symbolSpan
<< " channelSampleRate:" << m_channelSampleRate
<< " baud:" << m_settings.m_baud;
m_pulseShape.create(m_settings.m_beta, m_settings.m_symbolSpan, channelSampleRate/m_settings.m_baud);
m_pulseShape.create(m_settings.m_beta, m_settings.m_symbolSpan, channelSampleRate/m_settings.m_baud, true);
}
if ((m_channelSampleRate != channelSampleRate) || force)

View File

@ -38,6 +38,7 @@ const QStringList DemodAnalyzerSettings::m_channelTypes = {
QStringLiteral("PacketDemod"),
QStringLiteral("PacketMod"),
QStringLiteral("RadiosondeDemod"),
QStringLiteral("RTTYMod"),
QStringLiteral("SSBDemod"),
QStringLiteral("SSBMod"),
QStringLiteral("WFMDemod"),
@ -60,6 +61,7 @@ const QStringList DemodAnalyzerSettings::m_channelURIs = {
QStringLiteral("sdrangel.channel.packetdemod"),
QStringLiteral("sdrangel.channeltx.modpacket"),
QStringLiteral("sdrangel.channel.radiosondedemod"),
QStringLiteral("sdrangel.channeltx.modrtty"),
QStringLiteral("sdrangel.channel.ssbdemod"),
QStringLiteral("sdrangel.channeltx.modssb"),
QStringLiteral("sdrangel.channel.wfmdemod"),