(good-natured) GPS spoofing — Parallax Forums

# (good-natured) GPS spoofing

Posts: 2,131

A friend of mine has built a flight simulator with a motion-rig. As a geocacher I had the idea to build a "simulation-geocache": You have to use the flight simulator to fly to a virtual location. For this to work while using your own mobile phone for navigation the GPS receiver must be fooled to display the simulated location of the plane instead of the static coordinates where the motion-rig is located.

This is purely theoretical. I don't have the time to start a(nother) new project, right now. I'm just curious if it would be possible. Fooling the compass is easy. We just need 3 big orthogonally oriented Helmholtz coils around the simulator and drive currents through them according to the X, Y and Z components of the magnetic field.

But what does it take to generate GPS signals as if they would come from the real satellites? Time resolution and accuracy should not be a problem. We don't need an atomic clock because everything is located closely together and is perfectly synchronized. We also don't need big antennas. It only has to work inside the simulator cabin, so milli or even microwatts of transmitter power should be enough. 5ns timing resolution is equal to ~5ft of positional resolution. Super good enough for geocaching. We need to simulate at least 4 satellites to define a 3D position. Does anybody know how the GPS signals are encoded? The trajectories of the satellites ahould be available somewhere as every GPS receiver has to know them. So all we need to know are the frequencies and the encoding. Calculating the time shift according to the distances should be easy.

• Posts: 1,161

Hi,
Some other direction of thought:
For me it would be way more easy to make a fake GPS receiver, which sends fake Nemea position codes to a PC.
Christof

• Posts: 457
• Posts: 496

Another one https://github.com/osqzss/gps-sdr-sim

This GPS Connector program is supposed to receive GPS coordinates from USB, BT, or TCP.
https://play.google.com/store/apps/details?id=de.pilablu.gpsconnector&hl=en_US The data probably doesn't need to be from an actual GPS.

• Posts: 2,131

Ok, thanks. So it seems to be possible but would take a lot of work. And of course we'd need actual RF hardware to up-mix the baseband signal to the actual RF frequency. It would be a nice gimmick but to not get bogged down in details it's much easier to use the navigation already built into the flight simulator.

• Posts: 1,646

Android lets you designate an app that's allowed to spoof GPS for everything else on the phone: "Select mock location app" near the bottom of the developer settings. So you'd just need an app that gets the location from the simulator and tells the phone to use that instead of what the GPS hardware reports. No special hardware is required.

• Posts: 496

As a further complication, modern phones have multi-frequency and multi-constellation GNSS receivers.