PX4 with only intermittent external compass updates


I am designing a quad copter with the goal of flying close to large structures, controlling the yaw to face said structure.

It’s my understanding that by default PX4 requires some kind of absolute compass measurement at all times, presumably to inhibit gyro drift.

Would it be viable to modify the PX4 software (Presumably the EKF) to remove the dependency on a constant absolute compass/ yaw measurement, and have a ‘known’ yaw rate only provided intermittently?

When close to a structure my system is perfectly capable of determining a heading relative to the structure, I believe this would be sufficient to work like a compass, with the caveat being I must be near a structure- in operation the drone will spend all flight time in the air near a structure, only landing and takeoff will be done further away.

I would intend to obtain yaw measurements using a combination of LIDAR and VIO.

Magnetometers and GPS are totally non-viable for my application, it should be considered ‘indoors’, with the caveat that the surroundings are going to be often devoid of visual features.

Thanks for any help