Skip to content

luk-kop/gold-tracks-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GOLD Tracks Generator

Python 3.8.5 pyproj MIT license

The GOLD Tracks Generator is a script that generate random tracks in OTH-T GOLD format. Data generated by the script simulates the movement of tracks and is sent to clients via TCP or UDP transport protocol.


Features

  • The GOLD Tracks Generator script generates OTH-T GOLD messages of XCTC type (The Enhanced Contact Report message).
  • The body of generated XCTC message contains of segments with CTC set immediately followed by XPOS set.
  • The script allows to send the following tracks:
    • one single track in specified position or random position;
    • multiple tracks randomly located within a designated range from specified position;
    • multiple tracks in random positions around the world.
  • Tracks details are randomly generated at script startup and conform to the OTH-T GOLD specification.
  • Generated tracks are resent to the selected host periodically (every 10 seconds). Each time a message with tracks is sent, the position of tracks is updated based on their speed and course.
  • The script can be run with the following options:
    • choice of TCP or UDP transport protocol;
    • choice of network port;
    • specifying IP address or hostname;
    • specifying single track position or center of tracks area;
    • specifying the max distance of tracks from specified position (nautical miles).

Generated OTH-T GOLD msg example:

ZNR UUUUU
P 091316Z NOV 21
FM GOLDTX
TO ALL
BT
UNCLAS
MSGID/GOLDTX/XCTC/0001/NOV
CTC/T14460/UNEQUATED-TEST1//FFS/MER/4492/UP///TGT/24///16///ORP344240756/LRAJ
XPOS/09131622Z4/NOV21/LL:064513N9-1061124W5/SRN25////036.6T/40KTS////UNK
CTC/T50650/UNEQUATED-TEST2//CLH/AIR/F8614/UK////03///10///ORP554779250/GKIE/10
XPOS/09131622Z4/NOV21/LL:661414N2-0665303W3/PHOTO////163.4T/16KTS////NTDS
CTC/T10447/UNEQUATED-TEST3//MON/AIR/P7393/JA///SUS/15///24///COM855379354/IZBL/08
XPOS/09131622Z4/NOV21/LL:532653N4-0994229E5/SRN25////031.1T/46KTS////NTDS
ENDAT
BT







NNNN

Getting Started

Use the following instructions to run the script on your local machine.

Requirements

Python third party packages:

Installation with venv

The script can be build and run locally with virtualenv tool. Run following commands in order to create virtual environment and install the required packages.

$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt

Running the script

Script usage:

(venv) $ python main.py -h
usage: main.py [-h] [-n NUMBER] [-c COORDS] [-r RANGE] [-t {tcp,udp}] [-p PORT] ip_address

The script generates random OTH-T GOLD tracks

positional arguments:
  ip_address            Remote host ip address/hostname

optional arguments:
  -h, --help            show this help message and exit
  -n NUMBER, --number NUMBER
                        GOLD tracks count (default: 1)
  -c COORDS, --coords COORDS
                        GOLD track position or center of tracks area in format 5430N-01920E (default: random)
  -r RANGE, --range RANGE
                        Max track distance in nautical miles from the specified position (default: 0)
  -t {tcp,udp}, --proto {tcp,udp}
                        Choose UDP transport protocol (default: tcp)
  -p PORT, --port PORT  Remote host port (default: 2020)

You can start the script using one of the following examples:

# Run script with default options (1 track, port 2020 TCP, random position) and send msg to 192.168.1.10 host.
(venv) $ python main.py 192.168.1.10
# Send GOLD msg with some default options (1 track, random position) to 192.168.1.10 host on 2021 UDP port .
(venv) $ python main.py -t udp -p 2021 192.168.1.10
# Send GOLD msg with 10 tracks randomly located within a 10 nautical miles from 5430N 01920E position (port 2020 TCP).
(venv) $ python main.py -n 10 -c 5430N-01920E -r 10 192.168.1.10

About

The OTH-T GOLD Tracks Generator is a script that generate random tracks in OTH-T GOLD format. Data generated by the script simulates the movement of tracks and is sent to clients via TCP or UDP transport protocol.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages