EKF GPS and Optical Flow sensor Fusion

Has anybody tested the behaviour of a copter with Opitical Flow and GPS when said copter is flying into a GPS denied environment? For example some building where GPS health is bad for example or few satellites (less than 5) are seen by the copter.

I began looking into the code of the EKF but since it is quite complex i wondered if someone can tell me about the theoretical behaviour or tested it at least practically.
My impressions when testing this on current stable was, that when I flew in Loiter into a hangar the gps was obviously bad and when it should remain in position it drifted strongly. With Optical Flow only it remained stable (obviously). With both OF and GPS and EKF3 enabled the drift was still there while (subjectively) not as bad as without OF.
Intuitivley I would say this is not the behaviour one should expect. I expect it to recognize that GPS is not useable and trust only OF and thus remain stable in position.
So my question is, how is this implemented? Are there maybe some parameters I can tweak to make this happen?
Or does the EKF fuse the GPS into the prediction anyway but with lesser weight?
BTW I use mro GPS&Mag and the HDOP value was below 2 or more around 1 when in bad GPS environment and I wondered if that ist maybe too “good”, when outside it was just below 1. Some GPS glitches happened also with EKF2 in the same situation. Again i assume this should not happen, as the copter will emergency land automatically after the glitches.

Any suggestion will help :slight_smile: