Gps to non gps

Hi,did anyone made a gps to non gps transition midflight for using it in both outdoor and indoor using gps an optical flow only