{"id":16525606,"url":"https://github.com/jvde-github/ais2adsb","last_synced_at":"2025-03-21T09:30:51.081Z","repository":{"id":108755357,"uuid":"603404527","full_name":"jvde-github/ais2adsb","owner":"jvde-github","description":"Simple script to convert AIS NMEA to ADSB basestation format. Main purpose is to plot SAR helicopters in ADSB plotting software like VRS.","archived":false,"fork":false,"pushed_at":"2024-10-04T18:13:07.000Z","size":177,"stargazers_count":12,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-18T19:52:17.158Z","etag":null,"topics":["adsb","ais","basestation-messages","conversion","nmea","sar","virtualradar"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jvde-github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-18T12:08:27.000Z","updated_at":"2024-10-04T18:13:11.000Z","dependencies_parsed_at":"2024-10-11T17:04:23.679Z","dependency_job_id":"ce5757f5-c936-4b19-83e9-9216565201a0","html_url":"https://github.com/jvde-github/ais2adsb","commit_stats":{"total_commits":137,"total_committers":7,"mean_commits":"19.571428571428573","dds":"0.18248175182481752","last_synced_commit":"854e00461d3eac533bc618bd1eac79d816554e70"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvde-github%2Fais2adsb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvde-github%2Fais2adsb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvde-github%2Fais2adsb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jvde-github%2Fais2adsb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jvde-github","download_url":"https://codeload.github.com/jvde-github/ais2adsb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221813455,"owners_count":16884828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adsb","ais","basestation-messages","conversion","nmea","sar","virtualradar"],"created_at":"2024-10-11T17:04:16.678Z","updated_at":"2024-10-28T09:42:25.059Z","avatar_url":"https://github.com/jvde-github.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ais2adsb\n\nThis  Python script converts AIS NMEA lines received over UDP to BaseStation [format](http://woodair.net/sbs/article/barebones42_socket_data.htm) and sends it to a specified server e.g. Virtual Radar Server (VRS). Main purpose is to plot data on SAR aircraft picked up by AIS receivers in ADS-B plotting software.  The following is an example of a SAR helicopter broadcasting AIS messages plotted in VRS using AIS messages converted by ais2adsb (courtesy of jonboy1081):\n\n\u003cimg width=\"251\" alt=\"image\" src=\"https://user-images.githubusercontent.com/52420030/220178667-2196cc3d-be5d-4194-a9c3-8d37ac08f672.png\"\u003e\n\nAnd plotted using the ADS-B data:\n\n\u003cimg width=\"251\" alt=\"image\" src=\"https://user-images.githubusercontent.com/52420030/220178717-199a5d36-ae7e-4d50-9ef8-931759c1085a.png\"\u003e\n\nThis is a nice example where sometimes AIS has better reception than ADS-B. The idea for this tool came from [flygfantast](https://github.com/jvde-github/AIS-catcher/discussions/73) and jonboy1081.\n\n## Usage\n```\nAIS2ADSB v0.14- see https://github.com/jvde-github/ais2adsb\nUsage: (python) ais2adsb.py \u003cAIS UDP address\u003e \u003cAIS UDP IP\u003e \u003cAIS UDP port\u003e \u003cSBS TCP IP\u003e \u003cSBS TCP port\u003e \u003coptions\u003e\nOptions:\n\tFILE xxxx        : read mmsi \u003c-\u003e ICAO mapping from file xxxx\n\tSAR on/off       : include SAR aircraft in sendout\n\tSHIPS on/off     : include ships in sendout\n\tCALLSIGN on/off  : include generated callsigns in sendout\n\tPRINT on/off     : print mmsi/ICAO dictionary\n\tSAVE xxxx        : save mmsi/ICAO dictionary to file xxxx\n```\nThis is the minimal command line:\n```\npython3 ./ais2adsb.py 192.168.1.235 4002 192.168.1.239 30003\n```\nwhich reads AIS messages coming in on a computer with IP address `192.168.1.235` and port 4002 and sends it to VRS running at `192.168.1.239` port 30003. Below some more instructions to set up.\n\nAs a side note, if your receiver is AIS-catcher, you can send it to ais2adsb using the `-u` option:\n```\nAIS-catcher -u 192.168.1.235 4002 .....\n```\n\nThere are only a few options. The `FILE` setting will read in a file with a Python Dictionary that maps MMSI numbers to 24-bit ICAO numbers. The Dictionary functionality allows the user to let the program use a pre-defined mapping.  If not provided ais2adsb will auto generate ICAO numbers of the form `FXXXXX`  based on the MMSI number or from a default dictionary embedded in the program. The `PRINT on` option will trigger dumping the Dictionary to stderr periodically (so it can be put back in via the FILE option if desired)\n\nThe SAR setting (on/off, default is on) will instruct the program to also include SAR aircraft in the sendout. By default only SAR Aircraft broadcasting AIS message type 9 are included. The SHIPS setting (on/off, default is off) will instruct the program to also include vessels in the sendout. A callsign based on MMSI will be included by default, unless the option `CALLSIGN off` is given. A full example is:\n```\npython3 ./ais2adsb.py 192.168.1.235 4002 192.168.1.239 30003 SHIPS on FILE mapping.dict PRINT on CALLSIGN off\n```\n\n## Installation\n\nFor Windows users who do not have Python installed there is a package available in the Release sections created via [pyinstaller](https://pyinstaller.org/en/stable/). \nUsually it is simplest though to install Python3 and pyais (if not already installed):\n```\nsudo apt install python3 pip\npip3 install pyais\n```\nThen download the current package and enter the directory:\n```\ngit clone https://github.com/jvde-github/ais2adsb.git\ncd ais2adsb\n```\n\nSet up for example VRS so that it can receive BaseStation messages as a TCP server:\n\u003cimg width=\"659\" alt=\"image\" src=\"https://user-images.githubusercontent.com/52420030/219872223-2d199476-94e4-467c-9943-3cab66e48c4a.png\"\u003e\n\nThe NMEA input should be send over UDP. Most AIS software including AIS-catcher can easily be set up to achieve this, see above. For now we will assume you will have a stream of messages send to the local computer (say `192.168.1.235` at port `4002`). To create BaseStation messages and send to the server use the following command:\n```\npython3 ./ais2adsb.py 192.168.1.235 4002 192.168.1.239 30003\n```\nwhere `192.168.1.239` is the PC running VRS.\n\nThis will only pass on SAR aircraft messages. For testing it could be interesting to pass on ship positions as well:\n```\npython3 ./ais2adsb.py 192.168.1.235 4002 192.168.1.239 30003 SHIPS on\n```\nYou will see in the VRS main window that the client has connected and hopefully some messages have been sent as well:\n\u003cimg width=\"552\" alt=\"image\" src=\"https://user-images.githubusercontent.com/52420030/219874149-dd0458dd-d804-4fde-9f2e-cf7812f58d3c.png\"\u003e\n\nThe final output in the webinterface of VRS will look something like:\n\u003cimg width=\"1232\" alt=\"image\" src=\"https://user-images.githubusercontent.com/52420030/219868349-5b1dc1e5-33b1-48a0-96a4-9ad4bb49134f.png\"\u003e\n\n## Default dictionary\n\nThe default MMSI to ICAO mapping is shown below which is kindly provided by jonboy1081 and flygfantast. This is also the input format when reading in a dictionary from file: \n```\n{ 111232512:0x406C79, 111232511:0x406C82, 111232513:0x406C8E, 111232516:0x406D2C, 111232517:0x406D2D, 111232523:0x406DDB, 111232524:0x406DDC, 111232529:0x406F8B, 111232526:0x406EE7,\n            111232528:0x406F2D, 111232518:0x406D21, 111232533:0x406DE5, 111232522:0x406DE6, 111232527:0x406DE7, 111232525:0x406DE8, 111232534:0x406DE9, 111232535:0x406DEA,111232537:0x406DEB,\n            111232539:0x406DED, 111232531:0x43ECF4, 250002898:0x4CA98D, 250002897:0x4CA98F, 250002902:0x4CA98B, 250004879:0x4CACA4, 250002901:0x4CA98C, 111232519:0x48644B,111232538:0x485F8F,\n            111503003:0x4860B1, 111232509:0x47BFE4, 111265103:0x4AB423, 111224519:0x346105, 111503031:0x7C7590, 111257008:0x47812B, 111257014:0x478131, 111247506:0x32001B,\n            111211507:0x3DF1AD, 111224518:0x34220E, 11120554:0x44B918, 111224504:0x343318, 831582013:0x33FD3F, 111224522:0x346401 }\n```\n## To do\n- Fine tuning\n- Integrate into other software\n- ....\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvde-github%2Fais2adsb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjvde-github%2Fais2adsb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjvde-github%2Fais2adsb/lists"}