Is GPS not available in PX4 SITL?

I successfully ran SITL with “make px4_sitl gazebo-classic”, but when I tried to check the gps status, PX4 just tells me that gps is not running. I checked with “uorb top”, the sensor_gps topic does exist, and “listener sensor_gps” does return gps data. My goal is to find out what the “gps stop” command actually does in the source code with a IDE debugger(vscode), but seems like gps is not available in SITL? A lot of older posts are trying to turn gps off, so it’s pretty strange that I can’t manage to turn it on.

You’re right, gps status doesn’t return anything in SITL. If you simply want to disable the GPS in simulation I would use the failure injection, aka failure gps off.