i have chosen Ardupilot SITL to analyse how the copter autopilot would react to GPS spoofing attacks. I would like to simulate such GPS spoofing attack by providing a fake GPS position to the autopilot.
After reading thought the SITL wiki i still not understand, how GPS data is provided to the autopilot. If i take the standard setup (on linux), i assume that GPS is provided by the vehicle sim?
What would i have to do, to inject a faked GPS stream (NMEA ?) to the autopilot?
How can i get acces to the true simulated copter position?
Any help would be highly appreciated.
The true simulated copter position is given by the SIMSTATE mavlink message (#164). You can retrieve it by streaming SRX_EXTRA1.
As a newbie i still have to learn a few things, so the info does not help much.
from the Wiki about the SITL architecture i understand that when i follow the instructions in the Wiki the sim_vehicle.py script will start mavproxy and arducopter.
is it correct, that arducopter includes both, the ardupilot code (autopilot) and also the vehicle simulation?
I assume that the the vehicle simulation would produce the true position and also the simulated GPS position?
If this is correct i would like to intercept the simulated GPS position sent from vehicle simulation part to the autopilot. Could this be achieved without code modification in the SITL environment?
Or could i try to disable the GPS but connect the sim to another GPS source?
And I was thinking about it， I was flying with two gps, and there was a big difference between the two gps positions, which caused the crash, so I was looking for a feature that might be able to emulate the ability to enter two gps virtual data.