Skip to content

Instantly share code, notes, and snippets.

View edxmorgan's full-sized avatar
🚀
burdened with glorious purpose

edward.ix edxmorgan

🚀
burdened with glorious purpose
View GitHub Profile
@edxmorgan
edxmorgan / t200.csv
Created February 3, 2025 17:30 — forked from patrickelectric/t200.csv
t200.csv
thrust 16V rpm 16V power 16V current 16V voltage 16V pwm 16V thrust (kgf) 16V efficiency (g/w) 16V thrust 12V rpm 12V power 12V current 12V voltage 12V pwm 12V thrust (kgf) 12V efficiency (g/w) 12V
-9 3200 344.48 21.53 14.98 1100 -4.082336185 11.85072046 -6.62 2960 182.2 15.4 11.83 1100 -3.00278506 16.48070835
-8.9 2767 341.92 21.37 15.25 1110 -4.082336185 11.93944836 -6.58 2870 181.03 15.19 11.92 1110 -2.984641344 16.48699853
-8.7 3245 328.96 20.56 15.33 1120 -4.086872114 12.42361416 -6.34 2837 169.05 14.25 11.86 1120 -2.875779046 17.0114111
-8.44 3269 305.12 19.07 15.35 1130 -3.828324156 12.54694597 -6.09 2784 160.31 13.48 11.89 1130 -2.762380818 17.2314941
-8.23 3269 289.12 18.07 15.35 1140 -3.733069645 12.91183469 -5.8 2750 146.97 12.38 11.87 1140 -2.630838875 17.90051626
-7.98 3186 272.16 17.01 15.35 1150 -3.619671417 13.2997921 -5.59 2693 138.13 11.66 11.85 1150 -2.535584364 18.35650738
-7.59 3141 254.56 15.91 15.35 1160 -3.442770183 13.52439575 -5.23 2655 129.74 10.95 11.85 1160 -2.372290916 18.2849615
@edxmorgan
edxmorgan / mavlogparse.py
Created October 30, 2024 17:02 — forked from ES-Alexander/mavlogparse.py
A MAVLink telemetry (.tlog) file parser - similarish to mavlogdump, but (I think) nicer to use and process afterwards
#!/usr/bin/env python3
''' Mavlink telemetry (.tlog) file parser.
Operates as a generator. Allows csv output or listing useful types/fields.
'''
import json
from pathlib import Path
from fnmatch import fnmatch
from pymavlink import mavutil
@edxmorgan
edxmorgan / target_depth.py
Created October 16, 2024 04:56 — forked from Williangalvani/target_depth.py
set target depth ardusub
#!/usr/bin/env python
# Script to set target depth in Ardusub 3.6 beta
# requires this commit: https://github.com/williangalvani/ardupilot/commit/85a41d5771ba9d64e594dcc0856b6a3906767c3f
from pymavlink import mavutil
# There is very likely a builtin in pymavlink for this, but I didn't find it
ALT_HOLD_MODE = 2
@edxmorgan
edxmorgan / attitudeControl.py
Created October 16, 2024 04:56 — forked from Williangalvani/attitudeControl.py
Sets attitude for bluerov2 using pymavlink
# Import mavutil
from pymavlink import mavutil
from pymavlink.quaternion import QuaternionBase
import math
import time
import sys
ALT_HOLD_MODE = 2
def is_armed():
try:
@edxmorgan
edxmorgan / speed_control.py
Created October 16, 2024 04:56 — forked from Williangalvani/speed_control.py
pymavlink speed ardusub
"""
Example of how to set target speed in guided mode with pymavlink
"""
import time
import math
# Import mavutil
from pymavlink import mavutil
# Imports for attitude
from pymavlink.quaternion import QuaternionBase

I believe the article was originally written by fede.tft.

It appears they have copied source code to github and updated it for C++11: https://github.com/fedetft/serial-port

Introduction

The serial port protocol is one of the most long lived protocols currently in use. According to wikipedia, it has been standadized in 1969. First, a note: here we're talking about the RS232 serial protocol. This note is necessary because there are many other serial protocols, like SPI, I2C, CAN, and even USB and SATA.

Some time ago, when the Internet connections were done using a 56k modem, the serial port was the most common way of connecting a modem to a computer. Now that we have ADSL modems, the serial ports have disappeared from newer computers, but the protocol is still widely used.

In fact, most microcontrollers, even the newer ones have one or more peripherals capable of communicating using this protocol, and from the PC side, all operating system