diff --git a/content/drone-stuff/_index.md b/content/drone-stuff/_index.md index 628593d..de6a8e8 100644 --- a/content/drone-stuff/_index.md +++ b/content/drone-stuff/_index.md @@ -18,5 +18,6 @@ Click on a link in the list below to go to that page: 1. [Miscellaneous](../../drone-stuff/miscellaneous) 1. [Omnibus F4 V3 pinout](../../drone-stuff/omnibus-f4-v3-pinout) 1. [Omnibus F4 pro servo diode](../../drone-stuff/omnibus-f4-pro-servo-diode) +1. [QGroundControl to Mission Planner conversion script](../../drone-stuff/qgroundcontrol-to-mission-planner-conversion-script) 1. [Transmitter external module pinout](../../drone-stuff/transmitter-external-module-pinout) 1. [Transportable C1 Chaser](../../drone-stuff/transportable-c1-chaser) diff --git a/content/drone-stuff/ardupilot-setup-checklist.md b/content/drone-stuff/ardupilot-setup-checklist.md index ce415ac..c25a445 100644 --- a/content/drone-stuff/ardupilot-setup-checklist.md +++ b/content/drone-stuff/ardupilot-setup-checklist.md @@ -13,7 +13,7 @@ You should keep the [full list of ArduPilot parameters](https://ardupilot.org/pl Because building ArduPilot is a bit complicated, I've written a short script that uses Docker to build AP in a controlled environment. -Copy it from here, save it to a file called `docker_build.sh` in the root of the ArduPilot repo, and run it with `docker_build.sh `. Output files will be stored in `build//bin/`, and you can flash them with the [INAV configurator](https://github.com/iNavFlight/inav-configurator/releases) by putting your board in DFU mode and uploading the `.hex` file: +Copy it from here, save it to a file called `docker_build.sh` in the root of the ArduPilot repo, and run it with `docker_build.sh `. Output files will be stored in `build//bin/`, and you can flash them with the [INAV configurator](https://github.com/iNavFlight/inav-configurator/releases) by putting your board in DFU mode and uploading the `arduplane_with_bl.hex` file: ```bash #!/usr/bin/env bash @@ -28,18 +28,20 @@ fi BOARD=$1 +cd "$(git rev-parse --show-toplevel)" + git submodule update --init --recursive git checkout Dockerfile echo "RUN pip install intelhex" >> Dockerfile -echo "RUN sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi" >> Dockerfile -echo "RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" >> Dockerfile +echo 'ENV PATH="/home/ardupilot/.local/bin:/usr/lib/ccache:/ardupilot/Tools/autotest:/opt/gcc-arm-none-eabi-6-2017-q2-update/bin:${PATH}"' >> Dockerfile docker build . -t ardupilot git checkout Dockerfile docker run --rm -it -v "$(pwd)":/ardupilot ardupilot:latest ./waf configure --board="$BOARD" docker run --rm -it -v "$(pwd)":/ardupilot ardupilot:latest ./waf build + ``` @@ -140,6 +142,6 @@ _(Many thanks to Michel Pastor for his help with everything in this note.)_ * * *

-Last updated on February 24, 2021. For any questions/feedback, +Last updated on February 27, 2021. For any questions/feedback, email me at hi@stavros.io.

diff --git a/content/drone-stuff/qgroundcontrol-to-mission-planner-conversion-script.md b/content/drone-stuff/qgroundcontrol-to-mission-planner-conversion-script.md new file mode 100644 index 0000000..64e7937 --- /dev/null +++ b/content/drone-stuff/qgroundcontrol-to-mission-planner-conversion-script.md @@ -0,0 +1,48 @@ ++++ +title = "QGroundControl to Mission Planner conversion script" +weight = 11 +sort_by = "weight" +insert_anchor_links = "right" ++++ +If you have a parameter dump from QGroundControl, I wrote a small script that will convert it to a Mission Planner compatible file. + +Just save this script somewhere as `convert_qgc_params` and run it as `./convert_qgc_params `: + +```py +#!/usr/bin/env python3 +import sys +from decimal import Decimal + + +def format_float(f): + return "{0:f}".format(Decimal(f).quantize(Decimal("1.0000000")).normalize()) + + +def main(infile, outfile): + with open(infile) as ins: + inputs = ins.read() + + lines = [] + for line in inputs.split("\n"): + if not line or line.startswith("#"): + continue + vehicle_id, component_id, name, value, type = line.split("\t") + v = value + if type == "9": + v = format_float(float(value)) + lines.append(f"{name},{v}\n") + + with open(outfile, "wt") as outs: + outs.writelines(lines) + + +if __name__ == "__main__": + main(sys.argv[1], sys.argv[2]) +``` + +* * * + +

+Last updated on February 27, 2021. For any questions/feedback, +email me at hi@stavros.io. +

diff --git a/content/drone-stuff/transmitter-external-module-pinout.md b/content/drone-stuff/transmitter-external-module-pinout.md index 0097429..c7c1b8d 100644 --- a/content/drone-stuff/transmitter-external-module-pinout.md +++ b/content/drone-stuff/transmitter-external-module-pinout.md @@ -1,6 +1,6 @@ +++ title = "Transmitter external module pinout" -weight = 11 +weight = 12 sort_by = "weight" insert_anchor_links = "right" +++ diff --git a/content/drone-stuff/transportable-c1-chaser.md b/content/drone-stuff/transportable-c1-chaser.md index 46aa3db..7484eaa 100644 --- a/content/drone-stuff/transportable-c1-chaser.md +++ b/content/drone-stuff/transportable-c1-chaser.md @@ -1,6 +1,6 @@ +++ title = "Transportable C1 Chaser" -weight = 12 +weight = 13 sort_by = "weight" insert_anchor_links = "right" +++