Skip to content

Commit

Permalink
Merge remote-tracking branch 'jontio/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
szpajder committed Dec 25, 2018
2 parents 1c0a4e6 + d8fbff7 commit 96b9a32
Show file tree
Hide file tree
Showing 552 changed files with 60,998 additions and 8 deletions.
15 changes: 12 additions & 3 deletions JAERO/JAERO.pro
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ LIBACARS_PATH =$$PWD/../libacars
INCLUDEPATH += $$VORBIS_PATH/include
DEPENDPATH += $$VORBIS_PATH/include
VPATH += $$VORBIS_PATH/include

INCLUDEPATH += $$OGG_PATH/include
DEPENDPATH += $$OGG_PATH/include
VPATH += $$OGG_PATH/include
Expand Down Expand Up @@ -158,7 +159,6 @@ contains(QT_ARCH, i386) {
LIBS += -L$$PWD/../libcorrect/bin/64
}
}

LIBS += -lcorrect

# remove possible other optimization flags
Expand All @@ -175,8 +175,17 @@ LIBS += -L$$VORBIS_PATH/lib/.libs -lvorbis -lvorbisenc
LIBS += -L$$OGG_PATH/src/.libs -logg

# libacars support
LIBS += -L$$LIBACARS_PATH/build/src/libacars -lacars

LIBS += -L$$LIBACARS_PATH/build/src/libacars
win32 {
contains(QT_ARCH, i386) {
#message("32-bit")
LIBS += -L$$LIBACARS_PATH/bin/32
} else {
#message("64-bit")
LIBS += -L$$LIBACARS_PATH/bin/64
}
}
LIBS += -lacars

#define where we store everything so when using the command line we don't make the main directory messy.
CONFIG(debug, debug|release) {
Expand Down
2 changes: 1 addition & 1 deletion JAERO/audiooutdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void AudioOutDevice::clear()
circ_buffer_tail=circ_buffer.size()/2;
for(int i=0;i<circ_buffer.size();i++)
{
double dval=0.1*sin(2.0*M_PI*500*((double)i)/(((double)(settings.Fs))));
double dval=0.1*sin(2.0*M_PI*500.0*((double)i)/(((double)(settings.Fs))));
dval=0;
circ_buffer[i]=floor(0.75*dval*32767.0+0.5);
}
Expand Down
4 changes: 0 additions & 4 deletions JAERO/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1079,10 +1079,6 @@ void MainWindow::CChannelAssignmentSlot(CChannelAssignmentItem &item)
if(item.receive_spotbeam)rx_beam=" Spot Beam ";
message += "Receive Freq: " + QString::number(item.receive_freq) + rx_beam + "Transmit " + QString::number(item.transmit_freq);
ui->plainTextEdit_cchan_assignment->appendPlainText(message);
beep->play();
beep->play();
beep->play();

}

//--new method of mainwindow getting second channel from aerol
Expand Down
7 changes: 7 additions & 0 deletions libacars/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.o
*.a
*.so
*.so.?
build
build-*
test
26 changes: 26 additions & 0 deletions libacars/.travis.yml
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"'
4 changes: 4 additions & 0 deletions libacars/CHANGELOG.md
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.
58 changes: 58 additions & 0 deletions libacars/CMakeLists.txt
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)
22 changes: 22 additions & 0 deletions libacars/LICENSE
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.
155 changes: 155 additions & 0 deletions libacars/README.md
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 added libacars/bin/64/libacars.a
Binary file not shown.
Binary file added libacars/bin/64/libacars.dll
Binary file not shown.
Binary file added libacars/bin/64/libacars.dll.a
Binary file not shown.
21 changes: 21 additions & 0 deletions libacars/cmake_uninstall.cmake.in
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)
Loading

0 comments on commit 96b9a32

Please sign in to comment.