├── .clang-format
├── .gitattributes
├── .github
└── FUNDING.yml
├── .gitignore
├── .gitmodules
├── .travis.yml
├── CMakeLists.txt
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── build
└── raspbian
│ ├── Dockerfile
│ └── toolchain-arm-linux.cmake
├── hardware
├── enclosure1
│ ├── Back.stl
│ ├── Base.stl
│ ├── Front.stl
│ └── Top.stl
├── rpi-radioroom.jpg
└── rpi-radioroom.md
├── libs
├── inih
│ ├── include
│ │ ├── INIReader.h
│ │ └── ini.h
│ └── src
│ │ ├── INIReader.cc
│ │ └── ini.c
├── mavio
│ ├── include
│ │ ├── CircularBuffer.h
│ │ ├── IridiumSBD.h
│ │ ├── Logger.h
│ │ ├── MAVLinkAutopilot.h
│ │ ├── MAVLinkChannel.h
│ │ ├── MAVLinkISBD.h
│ │ ├── MAVLinkISBDChannel.h
│ │ ├── MAVLinkLib.h
│ │ ├── MAVLinkLogger.h
│ │ ├── MAVLinkSerial.h
│ │ ├── MAVLinkTCP.h
│ │ ├── MAVLinkTCPChannel.h
│ │ └── Serial.h
│ └── src
│ │ ├── IridiumSBD.cc
│ │ ├── Logger.cc
│ │ ├── MAVLinkAutopilot.cc
│ │ ├── MAVLinkISBD.cc
│ │ ├── MAVLinkISBDChannel.cc
│ │ ├── MAVLinkLogger.cc
│ │ ├── MAVLinkSerial.cc
│ │ ├── MAVLinkTCP.cc
│ │ ├── MAVLinkTCPChannel.cc
│ │ └── Serial.cc
└── timelib
│ └── include
│ └── timelib.h
├── pack
├── common
│ └── etc
│ │ ├── logrotate.d
│ │ └── radioroom_lr.conf
│ │ ├── rsyslog.d
│ │ └── radioroom_log.conf
│ │ └── systemd
│ │ └── system
│ │ └── radioroom.service
├── jetson
│ └── etc
│ │ ├── radioroom.conf
│ │ └── systemd
│ │ └── system
│ │ └── rtmpstream.service
└── raspbian
│ └── etc
│ ├── radioroom.conf
│ └── sytetmd
│ └── system
│ └── rtmpstream.service
├── src
├── CameraHandler.cc
├── CameraHandler.h
├── Config.cc
├── Config.h
├── MAVLinkHandler.cc
├── MAVLinkHandler.h
├── MAVReport.cc
├── MAVReport.h
├── build.h.in
└── radioroom.cc
├── tests
├── CircularBufferTest.cc
├── CustomSerializationTest.cc
├── MAVLinkAutopilotTest.cc
├── MAVLinkISBDChannelTest.cc
├── MAVLinkTCPChannelTest.cc
└── TimeLibTest.cc
├── toolchain-arm-linux.cmake
├── toolchain-arm-windows.cmake
├── toolchain-jetson.cmake
└── toolchain-x64-windows.cmake
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | Language: Cpp
3 | # BasedOnStyle: Google
4 | AccessModifierOffset: -1
5 | AlignAfterOpenBracket: Align
6 | AlignConsecutiveAssignments: false
7 | AlignConsecutiveDeclarations: false
8 | AlignEscapedNewlinesLeft: true
9 | AlignOperands: true
10 | AlignTrailingComments: true
11 | AllowAllParametersOfDeclarationOnNextLine: true
12 | AllowShortBlocksOnASingleLine: false
13 | AllowShortCaseLabelsOnASingleLine: false
14 | AllowShortFunctionsOnASingleLine: All
15 | AllowShortIfStatementsOnASingleLine: true
16 | AllowShortLoopsOnASingleLine: true
17 | AlwaysBreakAfterDefinitionReturnType: None
18 | AlwaysBreakAfterReturnType: None
19 | AlwaysBreakBeforeMultilineStrings: true
20 | AlwaysBreakTemplateDeclarations: true
21 | BinPackArguments: true
22 | BinPackParameters: true
23 | BraceWrapping:
24 | AfterClass: false
25 | AfterControlStatement: false
26 | AfterEnum: false
27 | AfterFunction: false
28 | AfterNamespace: false
29 | AfterObjCDeclaration: false
30 | AfterStruct: false
31 | AfterUnion: false
32 | BeforeCatch: false
33 | BeforeElse: false
34 | IndentBraces: false
35 | BreakBeforeBinaryOperators: None
36 | BreakBeforeBraces: Attach
37 | BreakBeforeTernaryOperators: true
38 | BreakConstructorInitializersBeforeComma: false
39 | BreakAfterJavaFieldAnnotations: false
40 | BreakStringLiterals: true
41 | ColumnLimit: 80
42 | CommentPragmas: '^ IWYU pragma:'
43 | ConstructorInitializerAllOnOneLineOrOnePerLine: true
44 | ConstructorInitializerIndentWidth: 4
45 | ContinuationIndentWidth: 4
46 | Cpp11BracedListStyle: true
47 | DerivePointerAlignment: true
48 | DisableFormat: false
49 | ExperimentalAutoDetectBinPacking: false
50 | ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
51 | IncludeCategories:
52 | - Regex: '^<.*\.h>'
53 | Priority: 1
54 | - Regex: '^<.*'
55 | Priority: 2
56 | - Regex: '.*'
57 | Priority: 3
58 | IncludeIsMainRegex: '([-_](test|unittest))?$'
59 | IndentCaseLabels: true
60 | IndentWidth: 2
61 | IndentWrappedFunctionNames: false
62 | JavaScriptQuotes: Leave
63 | JavaScriptWrapImports: true
64 | KeepEmptyLinesAtTheStartOfBlocks: false
65 | MacroBlockBegin: ''
66 | MacroBlockEnd: ''
67 | MaxEmptyLinesToKeep: 1
68 | NamespaceIndentation: None
69 | ObjCBlockIndentWidth: 2
70 | ObjCSpaceAfterProperty: false
71 | ObjCSpaceBeforeProtocolList: false
72 | PenaltyBreakBeforeFirstCallParameter: 1
73 | PenaltyBreakComment: 300
74 | PenaltyBreakFirstLessLess: 120
75 | PenaltyBreakString: 1000
76 | PenaltyExcessCharacter: 1000000
77 | PenaltyReturnTypeOnItsOwnLine: 200
78 | PointerAlignment: Left
79 | ReflowComments: true
80 | SortIncludes: true
81 | SpaceAfterCStyleCast: false
82 | SpaceAfterTemplateKeyword: true
83 | SpaceBeforeAssignmentOperators: true
84 | SpaceBeforeParens: ControlStatements
85 | SpaceInEmptyParentheses: false
86 | SpacesBeforeTrailingComments: 2
87 | SpacesInAngles: false
88 | SpacesInContainerLiterals: true
89 | SpacesInCStyleCastParentheses: false
90 | SpacesInParentheses: false
91 | SpacesInSquareBrackets: false
92 | Standard: Auto
93 | TabWidth: 8
94 | UseTab: Never
95 | ...
96 |
97 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | pack/* eol=lf
2 | * text=auto
3 | libs/* linguist-vendored
4 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: ['https://paypal.me/radioroom']
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Precompiled Headers
8 | *.gch
9 | *.pch
10 |
11 | # Compiled Dynamic libraries
12 | *.so
13 | *.dylib
14 | *.dll
15 |
16 | # Fortran module files
17 | *.mod
18 | *.smod
19 |
20 | # Compiled Static libraries
21 | *.lai
22 | *.la
23 | *.a
24 | *.lib
25 |
26 | # Executables
27 | *.exe
28 | *.exe.stackdump
29 | *.out
30 | *.app
31 | /.metadata/
32 | /.settings/
33 | /RadioRoom/bin/*
34 | /bin/*
35 | /debug/*
36 | /Default/
37 | /RemoteSystemsTempFiles/
38 | /build/CMakeFiles/
39 | CMakeCache.txt
40 | CMakeSettings.json
41 | .cproject
42 | /.vscode
43 | /.vs
44 | /out
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "libs/mavlink/include"]
2 | path = libs/mavlink/include
3 | url = https://github.com/mavlink/c_library_v2
4 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: cpp
2 | before_script:
3 | # Install Raspbian toolchain
4 | - mkdir -p /home/travis/build/toolchain/raspbian
5 | - cd /home/travis/build/toolchain/raspbian
6 | - wget https://s3.amazonaws.com/RTI/Community/ports/toolchains/raspbian-toolchain-gcc-4.7.2-linux64.tar.gz
7 | - tar xf raspbian-toolchain-gcc-4.7.2-linux64.tar.gz
8 | - export PATH=/home/travis/build/toolchain/raspbian/raspbian-toolchain-gcc-4.7.2-linux64/bin:$PATH
9 | # Install Jetson toolchain
10 | - mkdir -p /home/travis/build/toolchain/jetson
11 | - cd /home/travis/build/toolchain/jetson
12 | - wget https://envirover.s3-us-west-2.amazonaws.com/build/toolchains/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
13 | - tar xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
14 | - export PATH=/home/travis/build/toolchain/jetson/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin:$PATH
15 | # switch to the src directory
16 | - cd /home/travis/build/envirover/SPLRadioRoom
17 | script:
18 | # Build for Raspbian
19 | - mkdir bin
20 | - cd bin
21 | - cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="../toolchain-arm-linux.cmake" -DBUILD_NUM=$TRAVIS_BUILD_NUMBER ..
22 | - make
23 | - cpack -G DEB
24 | - export RASPBIAN_PKG_FILE=$(ls *.deb)
25 | - cp $RASPBIAN_PKG_FILE /home/travis/build/
26 | - cd ..
27 | - rm -r bin
28 | # Build for Jetson
29 | - mkdir bin
30 | - cd bin
31 | - cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="../toolchain-jetson.cmake" -DBUILD_NUM=$TRAVIS_BUILD_NUMBER ..
32 | - make
33 | - cpack -G DEB
34 | - export JETSON_PKG_FILE=$(ls *.deb)
35 | - cp $JETSON_PKG_FILE /home/travis/build/
36 | - cd ..
37 | before_deploy:
38 | - echo "Deploying $RASPBIAN_PKG_FILE and $JETSON_PKG_FILE to GitHub releases"
39 | deploy:
40 | provider: releases
41 | name: "UV Radio Room build $TRAVIS_BUILD_NUMBER"
42 | prerelease: true
43 | api_key:
44 | secure: jkOfxa7qoH3O50aJ12GFk4KBnwLHBAZvKG4Ka5x214ZEq1EV00ywuz1isN0qF+M2S1NJi0d/E58f4ndT1LQLgxcz3mcDcmo9v1EWFYEzfTL4o/BtV0IsrRy/pLg1t04QKHiy20kl8ViET293vBBla1yd72E04zlE6MjZMugifFdUoamHJkgMuY679JxE6o4KcXLxAwS3/lsrpCcdPEVj5DSuGUpyyGxKcoZW+cTTVc3zjBbjnLG9Hnle3zgIhC8hKHiCqy8uXtlgQN9m1E+P/Xn6LGAtO7Fa4Mlon9q1wbRXb+SRqG0sM8LmegORDHrFIvvuod0gCoIy1mbghnScAe9McUFeyVHQZ9ri7Xsb/G7fmpTAlPsf6EaKLm4m2gjXLec+W+thCPrtWUaoAdiq05d/ThP9mlOVbQ4A0O31oDSJJXctkb1OKgYrisBYY9dty4IKbVYkLA/+/QOi1EUAq9bspp77cUdhVx+MbrP3t982k/Ql8r3otmkIx4sbG404fnqxNauu5oe6zFgvratzOesYaL9p2dkkxCmzbY08pC1Uwn79GpTNMjvhNKVp6xi4AKR6+qDoMzXVZckpDrQnK/5yt4Fp4/5PRjGQhaayOx2vOLzZccOyiJLRZPgq3KAnSZRd4DnhzYFVPCuj91DLDo1jTsmgOj6rxjn1PHwguT8=
45 | file_glob: true
46 | file:
47 | - "/home/travis/build/${RASPBIAN_PKG_FILE}"
48 | - "/home/travis/build/${JETSON_PKG_FILE}"
49 | on:
50 | repo: envirover/SPLRadioRoom
51 | skip_cleanup: true
52 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.0.0)
2 |
3 | project(radioroom VERSION 2.5.0)
4 |
5 | set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
6 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
7 | set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
8 |
9 | set(CPACK_GENERATOR "DEB")
10 | # set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf")
11 | set(CPACK_PACKAGE_NAME "radioroom")
12 | set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Pavel Bobov")
13 | set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Telemetry for MAVLink autopilots")
14 | set(CPACK_PACKAGE_VENDOR "Envirover")
15 | set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
16 | set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
17 | set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
18 | set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
19 | set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
20 |
21 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -std=c++11 -lpthread" )
22 |
23 | configure_file("${PROJECT_SOURCE_DIR}/src/build.h.in" "${PROJECT_BINARY_DIR}/build.h")
24 |
25 | include_directories("${PROJECT_SOURCE_DIR}/libs/mavlink/include")
26 | include_directories("${PROJECT_SOURCE_DIR}/libs/mavio/include")
27 | include_directories("${PROJECT_SOURCE_DIR}/libs/inih/include")
28 | include_directories("${PROJECT_SOURCE_DIR}/libs/timelib/include")
29 | include_directories("${PROJECT_BINARY_DIR}")
30 |
31 | file(GLOB mavio_sources libs/mavio/src/*.cc)
32 | file(GLOB inih_sources libs/inih/src/*.cc libs/inih/src/*.c)
33 | file(GLOB sources src/*.c src/*.cc)
34 |
35 | add_library(mavio STATIC ${mavio_sources})
36 | add_library(inih STATIC ${inih_sources})
37 |
38 | add_executable(radioroom ${sources})
39 | target_link_libraries(radioroom mavio)
40 | target_link_libraries(radioroom inih)
41 |
42 | add_executable(aptest tests/MAVLinkAutopilotTest.cc)
43 | add_executable(tltest tests/TimeLibTest.cc)
44 | add_executable(cbtest tests/CircularBufferTest.cc)
45 | add_executable(tcptest tests/MAVLinkTCPChannelTest.cc)
46 | add_executable(isbdtest tests/MAVLinkISBDChannelTest.cc)
47 | add_executable(srtest tests/CustomSerializationTest.cc)
48 |
49 | target_link_libraries(aptest mavio)
50 | target_link_libraries(cbtest mavio)
51 | target_link_libraries(tcptest mavio)
52 | target_link_libraries(isbdtest mavio)
53 | target_link_libraries(srtest mavio)
54 |
55 | install(TARGETS radioroom DESTINATION "/usr/sbin")
56 |
57 | # Install files common for all systems
58 | install(DIRECTORY "${PROJECT_SOURCE_DIR}/pack/common/etc/" DESTINATION "/etc"
59 | FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
60 |
61 | # Install system-specific files
62 | install(DIRECTORY "${PROJECT_SOURCE_DIR}/pack/${CMAKE_SYSTEM_NAME}/etc/" DESTINATION "/etc"
63 | FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
64 |
65 | include(CPack)
66 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing to Envirover Open Source Projects
2 | =========================================
3 |
4 | Envirover welcomes contributions to our [open source projects on Github](https://github.com/envirover).
5 |
6 | Issues
7 | ------
8 |
9 | Feel free to submit issues and enhancement requests.
10 |
11 | Contributing
12 | ------------
13 |
14 | Please refer to each project's style guidelines and guidelines for submitting patches and additions. In general, we follow the "fork-and-pull" Git workflow.
15 |
16 | 1. **Fork** the repo on GitHub
17 | 2. **Clone** the project to your own machine
18 | 3. **Commit** changes to your own branch
19 | 4. **Push** your work back up to your fork
20 | 5. Submit a **Pull request** so that we can review your changes
21 |
22 | NOTE: Be sure to merge the latest from "upstream" before making a pull request!
23 |
24 | Copyright and Licensing
25 | -----------------------
26 |
27 | Envirover does not require you to assign the copyright of your contributions, you retain the copyright. Envirover does require that you make your contributions available under the GNU General Public License in order to be included in the main repo.
28 |
29 | If appropriate, include the GNU General Public License summary at the top of each file along with the copyright info. If you are adding a new file that you wrote, include your name in the copyright notice in the license summary at the top of the file.
30 |
31 | ### License Summary
32 |
33 | You can copy and paste the GNU General Public License summary from below.
34 |
35 | ```
36 | Copyright (C) 2017 Envirover
37 |
38 | SPLGroundControl is free software: you can redistribute it and/or modify
39 | it under the terms of the GNU General Public License as published by
40 | the Free Software Foundation, either version 3 of the License, or
41 | (at your option) any later version.
42 |
43 | SPLGroundControl is distributed in the hope that it will be useful,
44 | but WITHOUT ANY WARRANTY; without even the implied warranty of
45 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 | GNU General Public License for more details.
47 |
48 | You should have received a copy of the GNU General Public License
49 | along with SPLGroundControl. If not, see .
50 | ```
51 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | [](https://travis-ci.com/github/envirover/SPLRadioRoom)
4 | [](https://gitter.im/SPLRadioRoom/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5 |
6 | # UV Radio Room
7 |
8 | UV Radio Room is a firmware for a companion computer of MAVLink-based autopilots such as ArduPilot or PX4 that provides telemetry over Iridium Short Burst Data (ISBD) satellite messaging system or/and an Internet connection. Together with [UV Hub](http://envirover.com/docs/uvhub.html) server it provides a two-way communication solution between unmanned vehicles and ground control stations such as QGroundControl or Mission Planer.
9 |
10 | ## System Requirements
11 |
12 | UV Radio Room system requires the following hardware and software:
13 | * Autopilot such as Pixhawk with [ArduPilot](http://ardupilot.org/) or [PX4](http://px4.io/) firmware;
14 | * Raspberry Pi computer with [Raspbian Stretch](https://www.raspberrypi.org/downloads/raspbian/) Desktop or Light;
15 | * Activated [RockBLOCK Mk2](http://www.rock7mobile.com/products-rockblock) or [RockBLOCK 9603](http://www.rock7mobile.com/products-rockblock-9603) Iridium satellite communication module with FTDI USB to UART cable.
16 | * Cellular or satellite Internet modem.
17 |
18 | See [hardware/rpi-radioroom.md](hardware/rpi-radioroom.md) for UV Radio Room hardware parts and STL files for a 3D-printed enclosure.
19 |
20 | ## Wiring
21 |
22 | UV Radio Room uses serial devices to communicate with autopilot and ISBD transceiver. Cellular or satellite Internet modems cold be connected using USB, Ethernet, or WiFi connections.
23 |
24 | 
25 |
26 | See the instructions on connecting companion computer to Pixhawk running ArduPilot and PX4 autopilots:
27 |
28 | * [ArduPilot Connecting the Pixhawk and RPi](http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html)
29 | * [PX4 Companion Computer for Pixhawk class](https://dev.px4.io/en/companion_computer/pixhawk_companion.html)
30 |
31 | The safest bet is to use USB to TTL UART serial converter to connect both autopilot and transceiver to the Raspberry Pi's USB ports. Another, less straightforward option is to connect autopilot to the Raspberry Pi serial port using GPIO pins.
32 |
33 | It is recommended to connect RockBLOCK module using [FTDI USB to UART cable](https://www.rock7.com/shop-product-detail?productId=16) provided by Rock Seven Mobile. 3.3.V FTDI cables or chips from other vendors can also be used, but MaxPower field in the chip must be set to 500 mA to satisfy the power requirements of RockBLOCK (The default setting for MaxPower field is typically 100 mA). Alternatively, RockBLOCK could be powered by directly, and not through the FTDI chip.
34 |
35 | Connect the cellular or satellite Internet modem to Raspberry Pi as recommended by the modem manufacturer. The modems are not shown on the diagram.
36 |
37 | Though +5V TELEM pin on Pixhawk is rated for up to 2A peak power draw, it is recommended to power Raspberry Pi using a dedicated power source, especially if both RockBLOCK and a cellular modems are powered from the Raspberry Pi USB ports.
38 |
39 | ## Installing
40 |
41 | To install UV Radio Room on Raspberry Pi or NVIDIA Jetson:
42 |
43 | 1. Copy radioroom-2.5.0-raspbian.deb or radioroom-2.5.0-jetson.deb from https://github.com/envirover/SPLRadioRoom/releases to the machine.
44 | 2. Install radioroom-2.5.0-raspbian.deb package or radioroom-2.5.0-jetson.deb.
45 |
46 | ``$ sudo dpkg -i radioroom-2.5.0-raspbian.deb``
47 |
48 | 3. Configure the reporting period and the serial device paths for autopilot in /etc/radioroom.conf.
49 | 4. If ISBD transceiver is used, in [isbd] section set enabled=true and specify the serial device paths of the ISBD transceiver in /etc/radioroom.conf.
50 | 5. If TCP/IP connection is used, in [tcp] section set enabled=true and specify the TCP server's IP address and port in /etc/radioroom.conf.
51 | 6. Start radioroom service.
52 |
53 | ```
54 | $ sudo systemctl enable radioroom.service
55 | $ sudo systemctl start radioroom.service
56 | ```
57 |
58 | By default the serial device paths are set to /dev/ttyACM0 for autopilot and to /dev/ttyUSB0 for ISBD transceiver. If auto_detect_serials property is set to true, UV Radio Room can auto-detect autopilot and ISBD if they are available on other serial and USB devices. To make the UV Radio Room startup faster and more reliable it is recommended to set the device paths correctly.
59 |
60 | USB device paths /dev/ttyUSB0, /dev/ttyUSB1, ... can swap after reboot. For USB devices it is recommended to use symlinks from /dev/serial/by-path or /dev/serial/by-path directories, that do not change with reboots.
61 |
62 | UV Radio Room periodically reports the vehicle's position, attitude, velocity, and other data using HIGH_LATENCY MAVLink message. The message size is 48 bytes. Each report consumes 1 RockBLOCK credit. The reporting period default value is 60 seconds. It can be changed by setting report_period configuration property in /etc/radioroom.conf.
63 |
64 | ### Configuring Camera Handlers
65 |
66 | UV Radio Room camera handlers execute custom Linux shell commands on MAVLink commands such as DO_DIGICAM_CONTROL, IMAGE_START_CAPTURE, IMAGE_STOP_CAPTURE, VIDEO_START_CAPTURE, and VIDEO_STOP_CAPTURE.
67 |
68 | The camera handlers are defined in [camera_handler] section in /etc/radioroom.conf file and executed when correspondent commands are received from one of the UV Radio Room's channel or when the autopilot confirms reaching of a mission item with a correspondent command.
69 |
70 | The Linux shell commands may include {{param1}}, ..., {{param8}} variables that during the command execution will be replaced by values of the correspondent MAVLink command parameters.
71 |
72 | ## Troubleshooting
73 |
74 | Run ``$ sudo systemctl status radioroom.service`` to check the status of radioroom service.
75 |
76 | If radioroom is properly wired and configured, the output should look like this:
77 |
78 | ```bash
79 | pi@raspberrypi:~ $ sudo systemctl status radioroom.service
80 | ● radioroom.service - UV Radio Room Service
81 | Loaded: loaded (/etc/systemd/system/radioroom.service; enabled; vendor preset: enabled)
82 | Active: activating (start) since Tue 2018-11-07 07:27:56 UTC; 6 days ago
83 | Docs: http://github.com/envirover/SPLRadioRoom
84 | Main PID: 254 (radioroom)
85 | CGroup: /system.slice/radioroom.service
86 | └─254 /usr/sbin/radioroom
87 |
88 | Nov 07 07:27:56 raspberrypi systemd[1]: Starting UV Radio Room Service...
89 | Nov 07 07:27:57 raspberrypi radioroom[254]: Starting UV Radio Room 2.5.0...
90 | Nov 07 07:27:57 raspberrypi radioroom[254]: Connecting to autopilot (/dev/ttyUSB0 57600)...
91 | Nov 07 07:27:58 raspberrypi radioroom[254]: Autopilot detected at serial device '/dev/ttyUSB0'.
92 | Nov 07 07:27:58 raspberrypi radioroom[254]: MAV type: 12, system id: 1, autopilot class: 3, firmware version: 3.5.0/255
93 | Nov 07 07:27:58 raspberrypi radioroom[254]: Connecting to ISBD transceiver (/dev/ttyUSB1 19200)...
94 | Nov 07 07:27:58 raspberrypi radioroom[254]: IRIDIUM 9600 Family SBD Transceiver (IMEA 123456789012345) detected at serial device '/dev/ttyUSB1'.
95 | Nov 07 07:27:58 raspberrypi radioroom[254]: UV Radio Room 2.5.0 started.
96 | ```
97 |
98 | Log file of radioroom service is available at /var/log/radioroom.log.
99 |
100 | Add ``-v`` option to the radioroom command line in /etc/systemd/system/radioroom.sevice to enable verbose logging. Verbose logging makes radioroom service log all MAVLink messages sent and received from autopilot and ISBD transceiver.
101 |
102 | ## Building
103 |
104 | To build radioroom on Raspberry Pi.
105 |
106 | ```bash
107 | $ sudo apt-get install git cmake
108 | $ git clone https://github.com/envirover/SPLRadioRoom.git
109 | $ cd SPLRadioRoom
110 | $ mkdir bin
111 | $ cd bin
112 | $ cmake ..
113 | $ make
114 | ```
115 |
116 | To create a debian package run ``$cpack ..`` command after that.
117 |
118 | To cross-compile on Windows.
119 | 1. Install git and clone SPLRadioRoom repo.
120 |
121 | ``$ git clone https://github.com/envirover/SPLRadioRoom.git``
122 |
123 | 2. Install [Windows toolchain for Raspberry Pi](http://gnutoolchains.com/raspberry/).
124 | 3. Create 'bin' subdirectory inside SPLRadioRoom and change the current directory to it.
125 | 4. Run cmake using ../toolchain-arm-windows.cmake toolchain file.
126 |
127 | ``$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING="" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="../toolchain-arm-windows.cmake" ..``
128 | 5. Run make.
129 |
130 | ``$ make``
131 |
132 | For cross-compilation on Linux raspbian toolchain for Linux is required. toolchain-arm-linux.cmake should be specified as CMake toolchain file.
133 |
134 | ## Issues
135 |
136 | Find a bug or want to request a new feature? Please let us know by submitting an [issue](https://github.com/envirover/support/issues).
137 |
138 | ## Contributing
139 |
140 | Envirover welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/envirover/SPLRadioRoom/blob/master/CONTRIBUTING.md).
141 |
142 | ## Licensing
143 |
144 | ```
145 | Copyright (C) 2018 Envirover
146 |
147 | UV Radio Room is free software: you can redistribute it and/or modify
148 | it under the terms of the GNU General Public License as published by
149 | the Free Software Foundation, either version 3 of the License, or
150 | (at your option) any later version.
151 |
152 | UV Radio Room is distributed in the hope that it will be useful,
153 | but WITHOUT ANY WARRANTY; without even the implied warranty of
154 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
155 | GNU General Public License for more details.
156 |
157 | You should have received a copy of the GNU General Public License
158 | along with UV Radio Room. If not, see .
159 | ```
160 |
--------------------------------------------------------------------------------
/build/raspbian/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:18.04
2 |
3 | # Install build essential
4 | RUN apt-get update && apt-get install -y cmake
5 |
6 | # Install Raspbian toolchain
7 | ADD https://s3.amazonaws.com/RTI/Community/ports/toolchains/raspbian-toolchain-gcc-4.7.2-linux64.tar.gz /build/toolchain/
8 | RUN tar -xzf /build/toolchain/raspbian-toolchain-gcc-4.7.2-linux64.tar.gz -C /build/toolchain
9 | ENV PATH="/build/toolchain/raspbian-toolchain-gcc-4.7.2-linux64/bin:${PATH}"
10 |
11 | ADD toolchain-arm-linux.cmake /build/toolchain/
12 |
13 | VOLUME /build/workspace
14 | WORKDIR /build/workspace
15 |
16 | CMD mkdir ./bin; cd ./bin; \
17 | cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="/build/toolchain/toolchain-arm-linux.cmake" -DBUILD_NUM=$TRAVIS_BUILD_NUMBER ..; \
18 | make; \
19 | cpack -G DEB
20 |
--------------------------------------------------------------------------------
/build/raspbian/toolchain-arm-linux.cmake:
--------------------------------------------------------------------------------
1 | set(CMAKE_SYSTEM_NAME raspbian)
2 |
3 | set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
4 | set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
5 |
6 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
7 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
8 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
9 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
10 |
--------------------------------------------------------------------------------
/hardware/enclosure1/Back.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/envirover/SPLRadioRoom/3c7c61a71268af851a264e422bc7cd4eea9226ba/hardware/enclosure1/Back.stl
--------------------------------------------------------------------------------
/hardware/enclosure1/Base.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/envirover/SPLRadioRoom/3c7c61a71268af851a264e422bc7cd4eea9226ba/hardware/enclosure1/Base.stl
--------------------------------------------------------------------------------
/hardware/enclosure1/Front.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/envirover/SPLRadioRoom/3c7c61a71268af851a264e422bc7cd4eea9226ba/hardware/enclosure1/Front.stl
--------------------------------------------------------------------------------
/hardware/enclosure1/Top.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/envirover/SPLRadioRoom/3c7c61a71268af851a264e422bc7cd4eea9226ba/hardware/enclosure1/Top.stl
--------------------------------------------------------------------------------
/hardware/rpi-radioroom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/envirover/SPLRadioRoom/3c7c61a71268af851a264e422bc7cd4eea9226ba/hardware/rpi-radioroom.jpg
--------------------------------------------------------------------------------
/hardware/rpi-radioroom.md:
--------------------------------------------------------------------------------
1 | # UV RadioRoom with Raspberry PI 3 and RockBLOCK 9603
2 |
3 | See [enclosure1](enclosure1) folder for the STL files of the 3D printed enclosure.
4 |
5 | 
6 |
7 | # Bill of Materials
8 |
9 | |Part Name|Quantity|
10 | |---------|--------|
11 | |[Raspberry Pi 3 Model B+](https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/)|1|
12 | |[RockBLOCK 9603](https://www.rock7.com/products/rockblock-9603-compact-plug-play-satellite-transmitter)|1|
13 | |[DROK 5A USB Voltage Regulator DC 9V-36V](https://www.droking.com/Power-Supply-Module-DC-9V-36V-to-5.2V-5A-Double-Output-Buck-Converter-USB-Charger-Voltage-Regulator-Adapter-Driver-Module)|1|
14 | |[Short FTDI USB Serial Cable for RockBLOCK 9603](https://www.amazon.com/Short-FTDI-Serial-Cable-RockBLOCK/dp/B08CXMQ1Y9)|1|
15 | |[TTL-232R-3V3-PCB](https://www.digikey.com/en/products/detail/ftdi-future-technology-devices-international-ltd/TTL-232R-3V3-PCB/1836396)|1|
16 | |[Sixfab Raspberry Pi 4G/LTE Cellular Modem Kit - Quectel EG25-G (Global)](https://sixfab.com/product/raspberry-pi-4g-lte-modem-kit/)|1|
17 | |6 Inches - 90 Degree USB to Micro USB Cable|1|
18 | |Tails cable with 6 pin DF13 series connector|1|
19 | |Self Tapping Screws M2.5 8mm|10|
20 | |Self Tapping Screws M2.5 6mm|2|
21 | |PETG or PLA filament|120g|
22 |
--------------------------------------------------------------------------------
/libs/inih/include/INIReader.h:
--------------------------------------------------------------------------------
1 | // Read an INI file into easy-to-access name/value pairs.
2 |
3 | // inih and INIReader are released under the New BSD license (see LICENSE.txt).
4 | // Go to the project home page for more info:
5 | //
6 | // https://github.com/benhoyt/inih
7 |
8 | #ifndef __INIREADER_H__
9 | #define __INIREADER_H__
10 |
11 | #include