Skip to content

Instantly share code, notes, and snippets.

View chbardel's full-sized avatar

Christopher Wansing chbardel

  • Smart Residence
  • Osnabrück
View GitHub Profile
@phausamann
phausamann / complementary_filter.py
Created November 19, 2018 09:41
IMU orientation estimation with complementary filter
import numpy as np
from scipy.signal import filtfilt, butter
from quaternion import quaternion, from_rotation_vector, rotate_vectors
def estimate_orientation(a, w, t, alpha=0.9, g_ref=(0., 0., 1.),
theta_min=1e-6, highpass=.01, lowpass=.05):
""" Estimate orientation with a complementary filter.
Fuse linear acceleration and angular velocity measurements to obtain an
@jarrodbell
jarrodbell / ipSymcon.js
Created July 25, 2017 23:34
Integrate IP-Symcon with CommandFusion iViewer
// Change these variables to suit your setup
var username = "admin";
var password = "password";
var ipAddress = "192.168.0.100";
// Call this function from your button press like this:
// sendToIPSymcon("SetValue", [12345, 42]);
// sendToIPSymcon("SetValue", [12346, false]);
function sendToIPSymcon(method, params) {
CF.request("http://" + username + ":" + password + "@" + ipAddress + ":3777/api/", "POST", {"Content-Type": "application/json"}, {"jsonrpc": "2.0", "id": "0", "method": method, "params": params}, function (status, headers, body) {
@corny
corny / dynv6.sh
Last active April 10, 2024 07:42
Update script for dynv6.com to set your IPv4 address and IPv6 prefix
#!/bin/sh -e
hostname=$1
device=$2
file=$HOME/.dynv6.addr6
[ -e $file ] && old=`cat $file`
if [ -z "$hostname" -o -z "$token" ]; then
echo "Usage: token=<your-authentication-token> [netmask=64] $0 your-name.dynv6.net [device]"
exit 1
fi