Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Mode-S/ADS-B (1090Mhz) for Java

License

NotificationsYou must be signed in to change notification settings

terminal2/java-mode-s

Repository files navigation

This library decodes ADS-B Messages and creates an easy to work with track object.

Message support status

Downlink FormatHuman ReadableSupportedNote
DF0Short Air-Air Surveillance
DF4Surveillance, Altitude requestUpdates Altitude information + SPI (Ident)
DF5Surveillance, Identity requestUpdates Callsign + SPI (Ident)
DF11MODE S only all-callBroadcasts ICAO Mode-S address
DF16Long Air-Air SurveillanceLogs warning when ACAS RA is active
DF17Extended Squitter (Most ADS-B Data)⚠️Partially supported, see DF17/18 status below
DF18Extended Squitter/Supplementary (Ground)⚠️Partially supported, see DF17/18 status below
DF19Extended Squitter MilitaryNot supported at this stage
DF20Comm-B Altitude⚠️Partially supported, see DF20/21 status below
DF21Comm-B Identity⚠️Partially supported, see DF20/21 status below
DF24Comm-B ELM⚠️Implemented basic sequence no decoding.

DF17/DF18 - Extended Squitter

DF17 is used for aircraft, while DF18 is used for other vessels (ground vehicles, static objects, ...)

Most features of the DF17/18 protocol have been implemented, some message lack support for specific fields.

Type CodeHuman ReadableSupportedNote
0Airborne/Surface No altitude
1Aircraft Identification
2Aircraft Identification
3Aircraft Identification
4Aircraft Identification
5Surface Position
6Surface Position
7Surface Position
8Surface Position
9Airborne Position
10Airborne Position
11Airborne Position
12Airborne Position
13Airborne Position
14Airborne Position
15Airborne Position
16Airborne Position
17Airborne Position
18Airborne Position
19Airborne Velocity
20Airborne Position
21Airborne Position
22Airborne Position
23Test Message
24Surface System StatusNot implemented yet
25Reserved Message
26Reserved Message
27Reserved (Trajectory Change)
28Aircraft Status MessagePriority mode A code (emergency) + TCAS/ACAS RA Broadcast
29Target Status MessagePartial support
30Reserved Message
31Aircraft Operational StatusPartial support

DF20/21 Comm-B

DF20/21 messages are replies to data requests from a radar station, you'll only receive these messages if Mode-S radaris actively requesting this information. You will only receive messages requested by the radar.

Message is structured as follows:

LSB |1----|6--|9----|14----|20-----------|33------------------------------------------------------|89-----------------------|    | DF  |FS | DR  |  UM  |     AC      |                         MB                             |            AP           |MSB |----5|--8|---13|----19|-----------32|------------------------------------------------------88|----------------------112|LSB: Least Significant Bit (First bit) (inclusive)MSB: Most Significant bit (Last bit) (Inclusive)DF: Downlink FormatFS: Flight StatusDR: Downlink RequestUM: Utitlity MessageAC: Altitude Code (DF20: Altitude | DF21: Mode-A Code)MB: Comm-B MessageAP: Address / Parity (Mode-S Address + Parity check)

The system uses BDS (comm-B Data Selected) code to determine the requested information. The radar station willsend a request (UF20 / UF21) containing a reply ID. The reply ID is a used by the aircraft in the response.This means the reply by the aircraft does not contain the original BDS, without this info you have to guess which BDS is used.

You run through each BDS and pass the message to the decoder, if the message does not fit you assume it's not correct.Repeat this process until you have a match.

At this moment the coded logic has too many incorrect matches and thus decided to disable BDS guessing.We are actively looking for a fix, or at least the ability to enable this with an experimental flag.We hope with more BDS implemented the guessing accuracy will improve.

BDSHuman ReadableSupportedNote
1,0Data link capability reportDetection implemented, decoding missing
1,7Common usage GICB capability report
1,8Mode S services GICB capability report
1,9Mode S services GICB capability report
1,AMode S services GICB capability report
1,BMode S services GICB capability report
1,CMode S services GICB capability report
1,DMode S services GICB capability report
1,EMode S services GICB capability report
1,FMode S services GICB capability report
2,0Aircraft Identification
2,1Aircraft and Airline registration marking✅️Experimental
2,2Antenna positions
2,5Antenna type
3,0ACAS Active resolution advisoryDetection implemented, decoding missing
4,0Selected vertical intention✅️
4,1Next waypoint details9 Characters
4,2Next waypoint detailsWaypoint lat/lon + crossing altitude
4,3Next waypoint detailsBearing, time and distance to waypoint
4,4Meteorological routine air report
4,5Meteorological hazard report
4,8VHF Channel reportInfo on VHF 1/2/3 (frequency + status) & Guard status
5,0Track and turn report
5,1Position report coarse
5,2Position report fine
5,3Air-reference state vector
5,4Waypoint 15 Chars, ETA, Estimated level, time to go
5,5Waypoint 25 Chars, ETA, Estimated level, time to go
5,5Waypoint 35 Chars, ETA, Estimated level, time to go
5,FQuasi-static parameter monitoring
6,0Heading and speed report
6,1Priority/emergency status
6,5Aircraft operational status
E,3Transponder type/part number
E,4Transponder software revision number
E,5ACAS type/part number
E,6ACAS software revision number
E,7Transponder status and diagnostics
E,AVendor specific status and diagnostics
F,1Military application
F,2Military application

Installation

This package is available through Maven Central

Pom

<dependency>  <groupId>aero.t2s</groupId>  <artifactId>mode-s</artifactId>  <version>0.2.0</version></dependency>

Gradle

 compile('aero.t2s:mode-s:0.2.0-SNAPSHOT')

Usage

classMain{publicstaticvoidmain(String[]args){ModeSmodes =newModeS("127.0.0.1",30002,52.0,0.0);modes.onTrackCreated(track ->System.out.println("CREATED " +track.toString()));modes.onTrackUpdated(track ->System.out.println("UPDATED " +track.toString()));modes.onTrackDeleted(track ->System.out.println("DELETED " +track.toString()));// Get decoded Downlink messagesmodes.onMessage(message ->System.out.println("MESSAGE " +message.getClass().getSimpleName()));// Starts listening threadmodes.start();// Get all tracks Map<String, Track>modes.getTracks();// Stop listeningmodes.stop();    }}

Using Aircraft Database

This library is compatible withOpenSky dataset.

In order to use the database version you can start ModeS plugin as follows:

classMain{publicstaticvoidmain(String[]args){ModeSDatabasedatabase =newModeSDatabase(Path.of("./doc8643AircraftTypes.csv"),Path.of("./aircraftDatabase.csv"))ModeSmodes =newModeS("127.0.0.1",30002,52.0,0.0);    }}

DF Messages only

If you don't need or want to use the track management feature you can also use this library without it.

classMain{publicstaticvoidmain(String[]args){ModeSMessageHandlerhandler =newModeSMessageHandler(52.0,0.0);handler.onMessage((df) ->System.out.println(message.getClass().getSimpleName()));ModeSmodes =newModeS("127.0.0.1",30002,handler);    }}

Contributing

You can contribute to this project by reporting/fixing bugs or implement a new packet.
We are always looking for help on this project.

License

This library is Apache 2.0 licensed. You can read the full licensehere.


[8]ページ先頭

©2009-2025 Movatter.jp