1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 19:28:47 -05:00
sdrangel/plugins/channeltx/modais
Jon Beniston c966f1cb5a dd maximize button to MainSpectrum and expandible Channels and Features.
Add sizeToContents in ChannelGUI and FeatureGUI, called when widget is
rolled, so we can remove resizing code from all of the individual
channels and features.

In RollupContents, use minimumSizeHint for calculated size, so that
minimumWidth can come from .ui file.

In DeviceGUI::sizeToContents(), call adjustSize(), so Device GUIs start
out at minimum needed size (which should restore appearance prior to
last patch).

In stackSubWindows, use available space for channels if no
spectrum/features present.
In stackSubWindows, fix spectrum from being sized too big, resulting in
scroll bars appearing.
Reset user-defined channel width in stackSubWindows, when channels are
removed.
Don't stack maximized windows.

There's one hack in Channel/FeatureGUI::maximizeWindow(). It seems that
when maximimzing a window, QOpenGLWidgets aren't always paint properly
immediately afterwards, so the code forces an additional update. I can't
see why the first call to paintGL doesn't work.
2022-11-11 12:24:27 +00:00
..
aismod.cpp
aismod.h
aismodbaseband.cpp
aismodbaseband.h
aismodgui.cpp
aismodgui.h
aismodgui.ui
aismodplugin.cpp
aismodplugin.h
aismodrepeatdialog.cpp
aismodrepeatdialog.h
aismodrepeatdialog.ui
aismodsettings.cpp
aismodsettings.h
aismodsource.cpp
aismodsource.h
aismodtxsettingsdialog.cpp
aismodtxsettingsdialog.h
aismodtxsettingsdialog.ui
aismodwebapiadapter.cpp
aismodwebapiadapter.h
CMakeLists.txt
readme.md

AIS modulator plugin

Introduction

This plugin can be used to transmit AIS (Automatic Identification System) messages using GMSK/FM modulation. AIS is used to track ships and other marine vessels at sea.

You need an AIS license to transmit on the AIS VHF frequencies (161.975MHz and 162.025MHz). This plugin should not therefore be used on those frequencies unless the transmitter and receiver are directly connected via coax. If you have an amateur license, you should be able to transmit AIS within amateur bands.

Interface

The top and bottom bars of the channel window are described here

AIS Modulator plugin GUI

1: Frequency shift from center frequency of transmission

Use the wheels to adjust the frequency shift in Hz from the center frequency of transmission. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

2: Channel power

Average total power in dB relative to a +/- 1.0 amplitude signal generated in the pass band.

3: Channel mute

Use this button to toggle mute for this channel.

4: Mode

Allows setting of RF bandwidth, FM deviation and BT values according to the chosen mode, which can be Narrow (BW=12.5kHz, Dev=2.4k, BT=0.3) or Wide (BW=25kHz, Dev=4.8k, BT=0.4). The latest specification for AIS, ITU-R M.1371-5, only specifies Wide operation.

5: RF Bandwidth

This specifies the bandwidth of a LPF that is applied to the output signal to limit the RF bandwidth. Typically this should be 25kHz.

6: FM Deviation

This specifies the maximum frequency deviation. Typically this should be 4.8kHz, giving a modulation index of 0.5 at 9,600 baud.

7: BT Bandwidth

Bandwidth-time product for the Gaussian filter, used for GMSK modulation. This should typically be 0.4.

8: Gain

Adjusts the gain in dB from -60 to 0dB. The gain should be set to ensure the level meter remains below 100%.

9: Level meter in %

  • top bar (beige): average value
  • bottom bar (brown): instantaneous peak value
  • tip vertical bar (bright red): peak hold value

10: UDP

When checked, a UDP port is opened to receive messages from other features or applications that will be transmitted. These messages do not need to contain the CRC, as it is appended automatically.

11: UDP address

IP address of the interface open the UDP port on, to receive messages to be transmitted.

12: UDP port

UDP port number to receive messages to be transmitted on.

13: Encode

When pressed, the message field will be set to a hex encoded string that represents the message determined by the following controls.

14: Message Type

Select a message type:

  • Scheduled position report
  • Assigned position report
  • Special position report
  • Base station report

15: MMSI

Enter a 9 digit Maritime Mobile Service Identity, which uniquely identifies a vessel.

16: Status

For position reports, specify the status of the vessel.

17: Latitude

Specify the latitude of the vessel or station in decimal degrees, North positive.

18: Longitude

Specify the longitude of the vessel or station in decimal degrees, East positive.

19: Insert position

Sets the latitude and longitude fields to the values specified under Preferences > My position.

20: Course

For position reports, specify the vessel's course in degrees. This is the direction in which the vessel is moving.

21: Speed

For position reports, specify the vessel's speed in knots.

22: Heading

For position reports, specify the vessel's heading. This is the direction the vessel is pointing towards.

23: Message

The AIS message send. This should be a hex encoded string.

24: Repeat

Check this button to repeatedly transmit a message. Right click to open the dialog to adjust the delay between retransmission and number of times the message should be repeated.

25: TX

Transmits the message. Right click to open a dialog to adjust transmission details allowing parameters different from standard values.

API

Full details of the API can be found in the Swagger documentation. Below are a few examples.

To transmit the current data just send a "tx" action:

curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "AISMod",  "direction": 1, "AISModActions": { "tx": 1}}'

To transmit a message from the command line:

curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "AISMod",  "direction": 1, "AISModActions": { "tx": 1, "data": "000000000000000000000000000000000" }}'

To set the FM deviation:

curl -X PATCH "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/settings" -d '{"channelType": "AISMod", "direction": 1, "AISModSettings": {"fmDeviation": 4800}}'