forked from jontio/JAERO
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'jontio/master'
- Loading branch information
Showing
552 changed files
with
60,998 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*.o | ||
*.a | ||
*.so | ||
*.so.? | ||
build | ||
build-* | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
language: c | ||
|
||
env: | ||
global: | ||
- MAKEFLAGS="-j2" | ||
- DECODE_ARINC=./src/examples/decode_arinc | ||
- SAMPLE_ADSC="d /BOMASAI.ADS.VT-ANB072501A070A988CA73248F0E5DC10200000F5EE1ABC000102B885E0A19F5" | ||
- SAMPLE_CPDLC="d /AKLCDYA.AT1.B-2727A0D5470C3D803BA464FAE2A15530DA2448312641AB425383320C74009CE009090A2CCA506AA61941DCA5005763" | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
compiler: gcc | ||
- os: osx | ||
compiler: clang | ||
|
||
script: | ||
- mkdir build | ||
- cd build | ||
- cmake ../ | ||
- make VERBOSE=1 | ||
- sudo make install | ||
- ${DECODE_ARINC} ${SAMPLE_ADSC} | ||
- '${DECODE_ARINC} ${SAMPLE_ADSC} | grep -q "Temperature: -62.75 C"' | ||
- ${DECODE_ARINC} ${SAMPLE_CPDLC} | ||
- '${DECODE_ARINC} ${SAMPLE_CPDLC} | grep -q "Flight level: 360"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# ChangeLog | ||
|
||
## Version 1.0.0 (2018-12-10): | ||
* First stable release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
cmake_minimum_required (VERSION 3.1) | ||
project (libacars C) | ||
|
||
set (LA_VERSION_MAJOR 1) | ||
set (LA_VERSION_MINOR 0) | ||
set (LA_VERSION_PATCH 0) | ||
set (LA_VERSION "${LA_VERSION_MAJOR}.${LA_VERSION_MINOR}.${LA_VERSION_PATCH}" | ||
) | ||
set (CMAKE_C_STANDARD 11) | ||
set (C_STANDARD_REQUIRED ON) | ||
set (CMAKE_C_EXTENSIONS OFF) | ||
|
||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Release) | ||
message(STATUS "Build type not specified: defaulting to Release") | ||
endif(NOT CMAKE_BUILD_TYPE) | ||
|
||
option(EMIT_ASN_DEBUG, "Enable debugging of ASN.1 decoder (requires | ||
CMAKE_BUILD_TYPE=Debug" OFF) | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") | ||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") | ||
|
||
include_directories ( | ||
${PROJECT_SOURCE_DIR}/src | ||
) | ||
|
||
add_subdirectory (src) | ||
|
||
configure_file( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" | ||
@ONLY | ||
) | ||
|
||
#only add uninstall target if this is the top project | ||
if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME}) | ||
add_custom_target(uninstall | ||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) | ||
endif() | ||
|
||
# build a CPack driven installer package | ||
include (InstallRequiredSystemLibraries) | ||
set (CPACK_RESOURCE_FILE_LICENSE | ||
"${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | ||
set (CPACK_RESOURCE_FILE_README | ||
"${CMAKE_CURRENT_SOURCE_DIR}/README.md") | ||
set (CPACK_PACKAGE_VERSION_MAJOR "${LA_VERSION_MAJOR}") | ||
set (CPACK_PACKAGE_VERSION_MINOR "${LA_VERSION_MINOR}") | ||
set (CPACK_PACKAGE_VERSION_PATCH "${LA_VERSION_PATCH}") | ||
set (CPACK_PACKAGE_CHECKSUM "SHA256") | ||
set (CPACK_STRIP_FILES TRUE) | ||
if (UNIX) | ||
set (CPACK_GENERATOR "TGZ") | ||
elseif (WIN32) | ||
set (CPACK_GENERATOR "ZIP") | ||
endif () | ||
include (CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Tomasz Lemiech <szpajder@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
# libacars | ||
|
||
libacars is a library for decoding various ACARS message payloads. | ||
|
||
Current stable version: **1.0.0** (released Dec 10, 2018) | ||
|
||
## Supported message types | ||
|
||
- [X] FANS-1/A ADS-C (Automatic Dependent Surveillance - Contract) | ||
- [X] FANS-1/A CPDLC (Controller-Pilot Data Link Communications) | ||
|
||
## Installation | ||
|
||
### Binary packages | ||
|
||
64-bit Windows binary packages of stable releases are provided in the | ||
[Releases](https://github.com/szpajder/libacars/releases) section. | ||
|
||
Unzip the archive into any directory. You should be able to run example programs | ||
directly from `bin` subdirectory. | ||
|
||
### Building from source | ||
|
||
Requirements: | ||
|
||
- c11-capable C compiler | ||
- cmake 3.1 or later | ||
|
||
The project should build and run correctly on the following platforms: | ||
|
||
- Linux i686 and x86_64 (gcc) | ||
- MacOS (clang) | ||
- Windows (mingw) | ||
|
||
Build steps; | ||
|
||
- To run a stable and tested version, download a release tarball from | ||
[Releases](https://github.com/szpajder/libacars/releases) section and unpack it: | ||
|
||
``` | ||
unzip libacars-x.y.z.zip | ||
cd libacars-x.y.z | ||
``` | ||
|
||
- To run the latest code which has not yet made it into a stable release, clone | ||
the source repository instead: | ||
|
||
``` | ||
git clone https://github.com/szpajder/libacars | ||
cd libacars | ||
``` | ||
|
||
`master` branch is always in sync with the latest stable release. `unstable` | ||
branch is where the latest cutting-edge code goes first. Select your branch of | ||
choice with `git checkout <branch_name>`. | ||
|
||
- Compile and install: | ||
|
||
``` | ||
mkdir build | ||
cd build | ||
cmake ../ | ||
make | ||
sudo make install | ||
sudo ldconfig | ||
``` | ||
|
||
On Unix the library will be installed to `/usr/local/lib` by default. | ||
Header files will land in `/usr/local/include/libacars`. | ||
|
||
## Example programs | ||
|
||
Example programs are provided in `src/examples` subdirectory: | ||
|
||
- `decode_arinc.c` - decodes ARINC-622 messages supplied at the | ||
command line or from a file. | ||
|
||
- `adsc_get_position` - illustrates how to extract position-related | ||
fields from decoded ADS-C message. | ||
|
||
- `cpdlc_get_position` - illustrates how to extract position-related | ||
fields from CPDLC position reports. | ||
|
||
These programs will be compiled together with the library. `make install` | ||
installs them to `/usr/local/bin`. Run each program with `-h` option for | ||
usage instructions. | ||
|
||
## API documentation | ||
|
||
Refer to the following documents: | ||
|
||
- `doc/PROG_GUIDE.md` - libacars Programmer's Guide | ||
- `doc/API_REFERENCE.md` - libacars API Reference | ||
|
||
## Applications using libacars | ||
|
||
- [dumpvdl2](https://github.com/szpajder/dumpvdl2), a VDL-2 decoder | ||
- [acarsdec](https://github.com/TLeconte/acarsdec/), an ACARS decoder | ||
- [vdlm2dec](https://github.com/TLeconte/vdlm2dec), a VDL-2 decoder | ||
- [JAERO](https://github.com/jontio/JAERO/), a Satcom ACARS decoder | ||
|
||
## Licenses | ||
|
||
libacars, Copyright (c) 2018 Tomasz Lemiech <szpajder@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
|
||
Contains code from the following software projects: | ||
|
||
- Rocksoft^tm Model CRC Algorithm Table Generation Program V1.0 | ||
by Ross Williams | ||
|
||
- asn1c, Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info> | ||
and contributors. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
SUCH DAMAGE. | ||
|
||
// vim: textwidth=80 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") | ||
|
||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) | ||
string(REGEX REPLACE "\n" ";" files "${files}") | ||
foreach(file ${files}) | ||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}") | ||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") | ||
exec_program( | ||
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" | ||
OUTPUT_VARIABLE rm_out | ||
RETURN_VALUE rm_retval | ||
) | ||
if(NOT "${rm_retval}" STREQUAL 0) | ||
message(STATUS "Problem when removing $ENV{DESTDIR}${file}") | ||
endif(NOT "${rm_retval}" STREQUAL 0) | ||
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") | ||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.") | ||
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") | ||
endforeach(file) |
Oops, something went wrong.