This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import numpy as np | |
from numba import guvectorize | |
from scipy.signal import filtfilt, butter | |
from quaternion import \ | |
quaternion, from_rotation_vector, as_float_array, as_quat_array | |
# --- Some utility functions --- # | |
def multiply(q, r): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Launch PyCharm from within conda environment | |
:: This will ensure that all necessary environment variables are set. | |
:: Modify the paths and environment name for your installation, if necessary. | |
:: This configuration is for PyCharm x64 installed with JetBrains Toolbox and | |
:: will launch the latest installed version. | |
@set condaroot="%userprofile%\Anaconda3" | |
@set pycharmroot="%localappdata%\JetBrains\Toolbox\apps\PyCharm-P\ch-0" | |
@set env=base |