Using a global .dir-locals.el file is a better alternative than reincluding the same emacs header in every file of the project.
this allows for external modules to be called at defined hook locations in ArduPilot. The initial example is a module that consumes the AHRS state, but this can be generalised to a wide variety of hooks