This is where I experiment, take notes, and show off the tools I work with. A peek inside the engineering mind — oscilloscopes, build logs, and everything in between.
What's on my bench right now
import numpy as np class KalmanFilter1D: """1D Kalman filter for IMU sensor fusion.""" def __init__(self, process_noise=0.01, measurement_noise=0.1): self.Q = process_noise # Process noise covariance self.R = measurement_noise # Measurement noise covariance self.P = 1.0 # Estimation error covariance self.x = 0.0 # Initial state estimate def update(self, measurement: float) -> float: # --- Predict --- self.P += self.Q # --- Kalman gain --- K = self.P / (self.P + self.R) # --- Update state --- self.x += K * (measurement - self.x) self.P *= (1 - K) return self.x # Usage: fusing gyroscope + accelerometer angle kf = KalmanFilter1D(process_noise=0.001, measurement_noise=0.05) filtered_angle = kf.update(raw_imu_reading)