diff --git a/.gitignore b/.gitignore index 55516db49..9aa9d4f54 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ obj-x86_64-linux-gnu/* /rescuesdriq/vendor/ /rescuesdriq/Godeps/ +/.vs diff --git a/CMakePresets.json b/CMakePresets.json index e6eefbfae..47d1bc4c4 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -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" + } + ] } diff --git a/plugins/channeltx/modrtty/readme.md b/plugins/channeltx/modrtty/readme.md index bdde25242..70deddbcf 100644 --- a/plugins/channeltx/modrtty/readme.md +++ b/plugins/channeltx/modrtty/readme.md @@ -2,7 +2,10 @@

Introduction

-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.

Interface

@@ -64,7 +67,14 @@ UDP port number to receive text to be transmitted on.

13: Baudot Character Set

-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

14: Bit Ordering

@@ -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). +

20: TX

-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.

API

diff --git a/plugins/channeltx/modrtty/rttymodsource.cpp b/plugins/channeltx/modrtty/rttymodsource.cpp index 8080ddb90..a42ce7a87 100644 --- a/plugins/channeltx/modrtty/rttymodsource.cpp +++ b/plugins/channeltx/modrtty/rttymodsource.cpp @@ -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::max(); + // Send to demod analyser + m_demodBuffer[m_demodBufferFill] = mod * std::numeric_limits::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) diff --git a/plugins/feature/demodanalyzer/demodanalyzersettings.cpp b/plugins/feature/demodanalyzer/demodanalyzersettings.cpp index 249128732..f7a21d503 100644 --- a/plugins/feature/demodanalyzer/demodanalyzersettings.cpp +++ b/plugins/feature/demodanalyzer/demodanalyzersettings.cpp @@ -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"),