Synthetic time-series data often fails in production for one simple reason: it looks statistically plausible per column, but breaks physics across columns.
If a drone's altitude climbs while its battery current drops to zero, or its position jumps without matching velocity, an anomaly detection model trained on that data learns the wrong physical priors.
To solve this, I built 3D Drone Flight Data Generator — an interactive simulator and validation pipeline that exports 28-channel, 20 Hz multi-rotor UAV telemetry in CSV and Apache Parquet.
Architecture Overview
Instead of sampling raw noise, the pipeline enforces physical coupling at every step:
-
Flight Physics Backbone:
- 4 flight regimes:
NORMAL_CRUISE,WIND_TURBULENCE,AGGRESSIVE_MANEUVER, andBATTERY_DEGRADATION. - Discrete MIL-F-8785C Dryden wind turbulence (
wind_x,wind_y,wind_z). - Heading-locked ZYX Euler attitude (
roll,pitch,yaw) and body angular rates (gyro_x,gyro_y,gyro_z). - Rotor RPM (
motor_rpm) and Coulomb-conserving battery dynamics (v_ocv,v_terminal,i_raw,i_true,soc).
- 4 flight regimes:
-
Heteroscedastic Residual Noise:
- Real UAV sensor noise scales with flight dynamics. The noise layer combines AR(1) temporal correlation, state-dependent scaling, and heavy-tailed Student-t impulses (via a trained Conditional Residual VAE with an analytical AR(1) fallback).
-
Fault Injection Modes:
-
1 — GPS_LOCK_LOSS(horizontal drift + elevated GPS noise) -
2 — VOLTAGE_SAG(sudden terminal/OCV voltage drop) -
3 — MOTOR_VIBRATION(7.0 Hz harmonic vibration + elevated gyro noise) -
4 — SENSOR_FREEZE(attitude & gyro lock)
-
-
Independent Black-Box Validator:
Every generated flight is checked by a separate referee before export:- Schema Contract: 28 exact columns, zero internal key leakage
- Rule 1 — Kinematics: Forward-Euler velocity consistency (
< 3.5 m/son nominal steps) - Rule 2 — Battery: SoC monotonicity & Coulomb integral conservation (
< 1e-4) - Rule 3 — Domain Bounds: Physical bounds across all 25 telemetry channels, zero
NaN/Inf - Rule 4b — Climb Power: Electrical climb power balance (
> 164.26 W) - Rule 5 — ESC Saturation: Pre-clip current saturation ratio (
< 2.0%)
Quick Start: Anomaly Detection in Python
Using the ready-made 10,000-row sample dataset (Aggressive Maneuver + 7 Hz Motor Vibration between 200.0 s and 300.0 s), you can build a rolling-window baseline in a few lines of Python:
import pandas as pd from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import classification_report, roc_auc_score # Load from Kaggle or local CSV df = pd.read_csv("uav_seed42_idx0_reg2_anom3.csv") # 1-second (20-sample) rolling vibration features feat_df = pd.DataFrame(index=df.index) for col in ["acc_x", "acc_y", "acc_z", "gyro_x", "gyro_y", "gyro_z"]: feat_df[f"{col}_roll_std"] = df[col].rolling(20, min_periods=1).std().fillna(0.0) feat_df[f"{col}_roll_mean"] = df[col].rolling(20, min_periods=1).mean() y = (df["anomaly_flag"] != 0).astype(int) # Split at 50% (t = 250 s) so both splits contain nominal and fault rows split = int(len(df) * 0.5) clf = RandomForestClassifier(n_estimators=100, random_state=42, n_jobs=-1) clf.fit(feat_df.iloc[:split], y.iloc[:split]) probs = clf.predict_proba(feat_df.iloc[split:])[:, 1] print("Test ROC-AUC:", round(roc_auc_score(y.iloc[split:], probs), 4)) print(classification_report(y.iloc[split:], (probs >= 0.5).astype(int))) Links & Resources
- Generate Custom Flights (Hugging Face Space): https://huggingface.co/spaces/abdurrahman-hakan-acar/3d-drone-flight-data-generator
- 10K Sample Dataset (Hugging Face): https://huggingface.co/datasets/abdurrahman-hakan-acar/3d-drone-flight-telemetry-dataset
- Kaggle Dataset & Starter Notebook: https://www.kaggle.com/datasets/abdurrahmanhakanacar/3d-drone-flight-telemetry-and-anomaly-dataset
What other UAV fault modes or sensor channels would be useful for your benchmarks? Let me know in the comments!
