How to Fly a Quadcopter Using Optical Flow Without GPS in the Gazebo Garden Simulation Environment

I am flying with PX4 and need to perform GPS-free flights for indoor systems. However, there is no model in the simulation without GPS. My goal is to test optical flow in a simulation environment without GPS. How can I achieve this?