The purpose of the repo is to generate high fidelity hybrid datasets that can be used to simulate GPS spoofing.
I have conducted two parallel experimental tracks using ArduPilot SITL (Software-In-The-Loop) to investigate GPS spoofing detection and wind-induced UAV behavior in fixed-wing aircraft.
-
Work in this section focused on establishing a proof-of-concept for gradual GPS drift attacks on stationary UAVs. I successfully overcame previous technical barriers by implementing a dual GPS setup: maintaining
GPS1as the SITL's native GPS while configuringGPS2as a MAVLink-controlled GPS (both set toTYPE = 14), then switching theprimary GPSto the controllable MAVLink source. This approach eliminated the pre-arm failure errors that plagued earlier attempts. -
In my ground validation experiment, I demonstrated a slow drift attack where spoofed GPS coordinates drifted northward at
$0.5$ m/s over$25$ seconds, achieving a total displacement of 12.5 meters. A critical discovery emerged: ArduPilot's Extended Kalman Filter (EKF) blindly trusts the MAVLink GPS upon switching. When the system toggled between GPS sources (due to your 1 Hz transmission frequency falling below ArduPilot's$400$ ms timeout threshold), the EKF'sResetPositionNEfunction forced the position estimate to match the measurement exactly, zeroing out the innovation term that would normally trigger spoofing alarms. This revealed a significant vulnerability—even when the GPS jumped between 0m and 12.5m offsets, no alarm was raised because the innovation gate check ($P_{EKF} - P_{GPS} > 5\sigma$ ) was bypassed during switchovers. -
My spoofing strategy employed static anchor points synchronized to the original GPS position, with drift calculated as a monotonically increasing function of elapsed time. I also identified the need to increase transmission frequency to 5 Hz in future iterations to maintain continuous GPS lock.
-
My wind experiments systematically isolated the physical aerodynamic response of fixed-wing UAVs from flight controller compensation strategies. By forcing the UAV into heading hold mode (rather than the default ground course hold), I separated weathervaning—the passive aerodynamic tendency of the vertical stabilizer to align with relative wind—from crabbing, the active flight controller strategy of pointing the nose into the wind to maintain ground track.
-
In this experiment, given 15 m/s eastward wind gusts (10-second intervals), I observed distinct yaw oscillations as the UAV's rudder fought to maintain heading against weathervaning forces. Roll angle patterns revealed controller overshoot: initial positive roll (right wing down) when wind hit, forced leveling during the gust, then negative roll (left wing down) as the controller overcompensated when wind ceased.
-
My theoretical analysis distinguished three flight conditions: crabbing (coordinated flight with nose into wind, zero sideslip, on-track), drifting (heading hold with downwind ground track displacement), and sideslipping (cross-controlled descent maneuver). In the research summary, I discuss why course-hold mode requires banking: fixed-wing aircraft must perform coordinated turns to change heading, as rudder-only yaw creates inefficient sideslip.
These experiments establish foundational knowledge for developing GPS spoofing detection algorithms that can distinguish between legitimate wind-induced drift and malicious GPS manipulation by analyzing the correlation between attitude changes, ground track deviations, and EKF wind estimates.
It is interesting to study the set of parameters of the GPS-receiver pipeline that an adversary can control. A full study of adversary capacity and a corresponding cost-benefit analysis for counter strategies is fundamental to strengthening strategies to monitor, detect, and counteract spoofing attacks. To that end, our current aim is to develop a general adversary class and integrate the adversary into our flight simulation.
We first assume (naively) that an adversary is fully capable of controlling the GPS receiver of the UAV. That is, the adversary can:
- Assign GPS position estimates to the UAV, replacing true GPS signals,
- Alter true GPS frequency,
- Change GPS velocity estimates, and
- Control GPS horizontal and vertical dilutions.
To begin our experimentation, we also assume that the adversary has full knowledge of the true flight path. Here is a non-exhaustive list of characteristics of the class:
- Given the flight path (a sequence of waypoints), a (malicious) target destination, and a duration, our adversary class will be able to output malicious trajectory, corrupt GPS trajectory, frequency, velocities, and horizontal + vertical dilutions that attain the malicious trajectory (post pose correction) within the given duration.
- To avoid integrating autopilot pose correction algorithm, we will (naively) assume that corrected pose, up to a rotation and a scale factor, is equal to the false course fused by spoofed GPS and IMU. Meaning, it's be sufficient for the adversary class to back-calculate the outputs relative only to the estimated false flight course (pre pose correction). For now, we'll just assume that pose correction is equal in magnitude and opposite in direction.
- It's clear that the goal of the adversary is to induce slow lateral translation by manipulating the position vector. But the adversary can only manipulate the position vector by manipulating the GPS update step on the extended Kalman filter. Naturally, this involves reasoning with uncertainty. Therefore, a smart adversary must maintain its own extended Kalman filter.
- This leads to the most advanced implementation of a spoofer: one that improve the spoofing signals by observing and recording changes on the target UAV.
- On the predict step, the adversary uses a purely physical model of propagation to predict the next set of GPS position and velocity inputs on the UAV.
- In our simplistic case, this means feeding false velocity consistent with the UAV's,
The goal is to see the effect on pose following the introduction of corrupted GPS data. Advanced spoofing techniques like spoof and drift is meant to give the autopilot false impressions of drift. The autopilot then makes corrections to remain on course. This results in false correction and instills false beliefs: autopilot thinks it's on course, in reality the drone drifts off course. We have the following steps ahead of us:
- Create a dataset from Kalman filter (w/o air drag) fusing (true) GPS, Accelerometer, Gyro, Barometer, Magnetometer (IMU) together: call it
true_course - Corrupt GPS Data to simulate spoofing in a dataset, call it
spoofed_gps - Fuse
spoofed_gpsand IMU together using the same Kalman filter, call it:false_course - Compare the (x,y) coordinates of
true_courseandfalse_course.
Given the limitations of working with Zurich Urban MAV Dataset, I have moved on to using Canadian Longterm Outdoor UAV Dataset (CLOUD).
- As of Tuesday/23 Afternoon, I have created an extended Kalman filter, and fused the IMU and GPS from the CLOUD dataset. In the analysis notebook I have described the reason I had chosen the winter UTIAS trial 1 dataset. Before I go on to describe my learning from the implementation and possible consequences for future analysis, I want to briefly discuss the plan forward.
- To simulate spoof and drift attack on a UAV, we must create three scenarios.
- First, we need a true flight course:
Pure INS + Pure (unspoofed) GPS- In the deployment, this will be a pre-flight input to the UAV. The UAV's autopilot, guided by GPS (and other navigation systems), uses flight control to follow this path to target.
- In testing stage, given a dataset, we must generate the true flight course ourselves. This is because, in most cases, we are only given a dataset and are not provided the filtering algorithm used to fuse the onboard sensors. We accomplish this by creating our own filtering algorithm
Custom, and performing fusion of onboard sensor data ourselves.- To create a robust flight path during testing, we must be given (1) raw (bias calibrated) acceleration + gyroscope + magnetometer data for the entire duration of the flight, (2) GPS position coordinates in GCS coordinate system, (3) GPS velocity estimates, (4) noise covariance estimates for the acceleration + gyroscope + magnetometer, (5) Horizontal dilution of precision (HDOP) and Vertical dilution of precision (VDOP) of GPS, and (6) noise covariance estimates for GPS velocity estimates.
- While the error estimates can be derived using inferential or statistical techniques, there's no alternative to (1), (2), (3), and (4).
- In the case of CLOUD, we were given (1)
attitudeestimates in quaternion coordinates, (2) rawIMU(accelerometer+gyroscope), (3)gpscoordinates in GCS, and (4) onboard velocity estimates from flight control. Note that even though we were not given magnetometer data, having the attitude estimates from the flight controller fulfilled our requirement for absolute reference for gyroscope.
- Second, we need a false course:
Pure INS + Spoofed GPS- In deployment, this requirement will be fulfilled by the real time (fused) pose estimates (position, velocity, attitude) of the UAV undergoing suspected spoofing attack.
- In testing stage, given a dataset, we will use
Customto perform fusion of IMU (accelerometer+gyroscope+magnetometer) and spoofed GPS estimates.- It's still not decided if we use the same GPS precision estimates as before, or change the estimates to reflect spoofing. In the ideal scenario, GPS precision estimates are real-time, and vary depending on the terrain, atmospheric noise and availability of satellites.
- This stage is to simulate the belief function of the UAV: reflects what the UAV believes to be true. A successful spoof and drift attack instills false belief in the UAV's system, such as drifting/losing altitude. The resulting false course is evidence that the UAV's navigation system has been deceived.
- Third, we need a (maliciously) planned course:
Spoofed GPS + corrected INS- To remain on
true_coursesaved within UAV system, the autopilot is expected to make real-time pose corrections. These corrections are guided by the global reference provided by the GPS. In a spoof and drift attack, the adversary tries to skew the pose corrections, giving the autopilot a false impression of drift. Once deceived, we call the skewed pathfalse_course. - Guided by false beliefs, the autopilot now makes unverified pose corrections through
corrected_INS, leading tomalicious_course. - In testing stage, we accomplish this by adjusting
attitudeof the dataset.
- To remain on
- First, we need a true flight course:
- To simulate spoof and drift attack on a UAV, we must create three scenarios.
- I realized that accelerations had to be used as control input. This was crucial. We used the attitude measurements to transform the acceleration measurements from the IMU. In that sense, attitude was also a control input, even though we assumed that the attitude was in-built and as a result, we took no step to account of the non-linearity introduced by the transformation by the rotation matrix. We also did not take the precision of the attitude into account for the sake of simplicity.
- I avoided coming across non-linearity whenever possible. For the GPS measurement model, I assumed that GPS was reported in the ENU ground system. As a result, I did not have to use the Jacobian of the measurement function.
- Earlier in the analysis, I reported standard deviations in the covariance matrices (instead of variance). This lead to inaccurate route planning.
