This question is an exact duplicate of:
Is it possible to disable the internal GPS of a device? I need to disable the hardware itself without disabling location services.
Currently I've only been able to achieve this by wrapping my phone in aluminum foil. I'd much prefer a more convenient software method.
I'm running rooted Android 6.01 (Marshmallow) on a OnePlus Two device.