Skip to content

Commit

Permalink
change to new name: The 1090MHz Riddle
Browse files Browse the repository at this point in the history
  • Loading branch information
junzis committed Jan 20, 2018
1 parent 74cdf03 commit 266d66e
Show file tree
Hide file tree
Showing 25 changed files with 740 additions and 956 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -1,2 +1,6 @@
.DS_Store
_build

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
12 changes: 0 additions & 12 deletions README.md

This file was deleted.

17 changes: 17 additions & 0 deletions README.rst
@@ -0,0 +1,17 @@
============================================================
The 1090MHz Riddle
============================================================
------------------------------------------------------------
The book about decoding Mode-S and ADS-B data
------------------------------------------------------------

Access the online book at: `mode-s.org <https://mode-s.org>`_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Begun with a frustration on the lack of technical public information on ADS-B and Mode-S in the year of 2015, I created an live online document to recorded my understanding of ADS-B data. Previously, this was known as `"ADS-B Decoding Guide" <http://adsb-decode-guide.readthedocs.org/>`_ project. Together with the tutorial, we also developed its related python library, the `pyModeS <https://github.com/junzis/pyModeS>`_. With time, I received many feedbacks, compliments, and contributions from open-source community users.

From beginning of 2017, the interests of tapping into Enhanced Mode-S (EHS) data brought us a whole new chapter of Mode-S inference and decoding into the pyModeS. This also enriches the "ADS-B" guide. With the advance in this area, I am planning to compile a more comprehensive online book to cover both ADS-B and Mode-S decoding and related topic.

That's the starting of this new repository. I am also starting host the online book on my own server to allow more flexibility of editing and publishing. You can read the most up-to-date book on `mode-s.org <https://mode-s.org>`_.

Oh, it is still GNU GPL. It was great to see the pull request from different contributors previously. I am looking forward to seeing more comments and pulls from the community. Enjoy!
47 changes: 47 additions & 0 deletions _ext/edit_on_github.py
@@ -0,0 +1,47 @@
"""
Sphinx extension to add ReadTheDocs-style "Edit on GitHub" links to the
sidebar.
Loosely based on https://github.com/astropy/astropy/pull/347
"""

import os
import warnings


__licence__ = 'BSD (3 clause)'


def get_github_url(app, view, path):
return (
'https://github.com/{project}/{view}/{branch}/{src_path}{path}'.format(
project=app.config.edit_on_github_project,
view=view,
branch=app.config.edit_on_github_branch,
src_path=app.config.edit_on_github_src_path,
path=path))


def html_page_context(app, pagename, templatename, context, doctree):
if templatename != 'page.html':
return

if not app.config.edit_on_github_project:
warnings.warn("edit_on_github_project not specified")
return
if not doctree:
warnings.warn("doctree is None")
return
path = os.path.relpath(doctree.get('source'), app.builder.srcdir)
show_url = get_github_url(app, 'blob', path)
edit_url = get_github_url(app, 'edit', path)

context['show_on_github_url'] = show_url
context['edit_on_github_url'] = edit_url


def setup(app):
app.add_config_value('edit_on_github_project', '', True)
app.add_config_value('edit_on_github_branch', 'master', True)
app.add_config_value('edit_on_github_src_path', '', True) # 'eg' "docs/"
app.connect('html-page-context', html_page_context)
27 changes: 27 additions & 0 deletions _static/custom.css
@@ -0,0 +1,27 @@
pre {
padding: 10px 15px;
}

div.sphinxsidebar ul li.toctree-l1 > a {
font-size: 14px;
}

div.sphinxsidebar ul li.toctree-l2 > a {
font-size: 13px;
}

div.sphinxsidebar ul li.toctree-l3 > a {
font-size: 12px;
}

div.section {
margin-bottom: 30px
}

div.section h2 {
border-bottom: 1px solid;
}

div.sphinxsidebar {
border-right: 1px dashed #cccccc;
}
16 changes: 16 additions & 0 deletions _templates/sourcelink.html
@@ -0,0 +1,16 @@
{%- if show_source and has_source and sourcename %}
<br/>
<h3>{{ _('Page Source') }}</h3>
<ul class="this-page-menu">
<!-- <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
rel="nofollow">{{ _('Show Source') }}</a></li> -->
{%- if show_on_github_url %}
<li><a href="{{ show_on_github_url }}"
rel="nofollow">{{ _('Show on GitHub') }}</a></li>
{%- endif %}
{%- if edit_on_github_url %}
<li><a href="{{ edit_on_github_url }}"
rel="nofollow">{{ _('Edit on GitHub') }}</a></li>
{%- endif %}
</ul>
{%- endif %}
5 changes: 5 additions & 0 deletions _templates/title.html
@@ -0,0 +1,5 @@
<h3><a href="{{ pathto(master_doc) }}">The 1090MHz Riddle</a></h3>

An Open access book on Mode-S/ADS-B decoding and related topics

<br/><br/>
48 changes: 30 additions & 18 deletions content/introduction.rst → adsb.rst
@@ -1,17 +1,12 @@
Introduction
============

.. Hardware
.. --------
.. TODO: add an introduction of the hardware used for the project here
ADS-B (Automatic Dependent Surveillance – Broadcast)
====================================================

ADS-B
-----
Introduction
------------

ADS-B is short for Automatic Dependent Surveillance–Broadcast. it is a satellite based surveillance system. Aircraft position, velocity, together with identification are transmitted through Mode-S Extended Squitter (1090 MHz).

Majority of the aircraft nowadays are broadcasting ADS-B messages constantly. There are many ways you can set up you own receiver and antenna to start tapping into those signals (DVB-T usb stick, ModeSBeast, Raspberry Pi, RadarScape, etc).
Majority of the aircraft nowadays are broadcasting ADS-B messages constantly. There are many ways you can set up you own receiver and antenna to start tapping into those signals (DVB-T usb stick, ModeSBeast, Raspberry Pi, RadarScape, etc).


An ADS-B message is 112 bits long, and consist of 5 parts:
Expand All @@ -32,7 +27,7 @@ This table lists the key bits of a message:
+----------+------------+----------+----------------------------------------+
| 3 | 6 - 8 | CA | Capability (additional identifier) |
+----------+------------+----------+----------------------------------------+
| 24 | 9- 32 | ICAO | ICAO aircraft address |
| 24 | 9 - 32 | ICAO | ICAO aircraft address |
+----------+------------+----------+----------------------------------------+
| 56 | 33 - 88 | DATA | Data |
+ +------------+----------+----------------------------------------+
Expand All @@ -46,7 +41,7 @@ Example:
::

Raw message in hexadecimal:
8D4840D6202CC371C32CE0576098
8D4840D6202CC371C32CE0576098


-----+------------+--------------+-------------------------------+--------------
Expand All @@ -58,14 +53,23 @@ Example:
DEC | 17 5 | | [4] ....................... |
-----+------------+--------------+-------------------------------+--------------
DF CA ICAO [TC] ------ DATA ---------- PI


Any ADS-B must start with the Downlink Format 17 or 18 (10001 or 10010 in binary code) for the first 5 bits. Bits 6-8 are used as additional identifier, which has different meanings within different types of ADS-B message.


ICAO address
~~~~~~~~~~~~

In each ADS-B message, the sender (originated aircraft) can be identified using the icao address. It is located from 9 to 32 bits in binary (or 3 to 8 in hexadecimal). In above example, it is ``4840D6`` or ``010010000100``.

An unique ICAO address is assigned to each Mode-S transponder of an aircraft. Thus this is a unique identifier for aircraft. You can use the query tool (`World Aircraft Database <https://junzis.com/adb/>`_) from mode-s.org to find out more about the aircraft wiht the ICAO address. For instance, using previous ICAO ``4840D6`` example will return the result of a ``Fokker 70`` (wow, it must be one of last in its kind in operation) with registration of ``PH-KZD``.

In addition, you can down the datebase from aforementioned website in CSV format.


ADS-B message types
-------------------
~~~~~~~~~~~~~~~~~~~

To identify what information is contained in a ADS-B message. We need to take a look at the ``Type Code`` of the message, indicated at bits 33 - 37 of the ADS-B message (or first 5 bits of the ``DATA`` segment)

Expand All @@ -91,12 +95,12 @@ Following are the relationship between each ``Type Code`` and its information co


ADS-B Checksum
--------------
~~~~~~~~~~~~~~~

ADS-B uses cyclic redundancy check to validate the correctness of received message, where the last 24 bits are the parity bits. Following pseudo-code describes the CRC process:

::

GENERATOR = 1111111111111010000001001

MSG = binary(8D4840D6202CC371C32CE0576098) # 112 bits
Expand All @@ -118,5 +122,13 @@ A comprehensive documentation on Mode-S parity coding can be found:

::

Gertz, Jeffrey L. Fundamentals of mode s parity coding. No. ATC-117.
MASSACHUSETTS INST OF TECH LEXINGTON LINCOLN LAB, 1984. APA
Gertz, Jeffrey L. Fundamentals of mode s parity coding. No. ATC-117.
MASSACHUSETTS INST OF TECH LEXINGTON LINCOLN LAB, 1984. APA


.. include:: sections/adsb-identification.rst
.. include:: sections/compact-position-report.rst
.. include:: sections/adsb-airborne-position.rst
.. include:: sections/adsb-airborne-velocity.rst
.. include:: sections/adsb-surface-movment.rst
.. include:: sections/adsb-integrity-accuracy.rst

0 comments on commit 266d66e

Please sign in to comment.