Best approach to correct position with a companion computer

I’d be grateful for thought on the best approach for a companion computer to make periodic position correction maneuvers. During manual and automated flight, these maneuvers would most likely be done while in the loiter flight or similar appropriate mode.

The companion computer has specialized sensors. The GPS position readings will not be accurate enough to just feed NAV lat/long commands. At least I’m pretty sure from observing the aircraft try to hold a position this would not work well enough. Alt readings from the barometer/gps/rangefinder will likely be sufficient for the maneuvers.

During the maneuver, I likely need 10-50hz resolution.

My basic thought is just to check the sticks are neutral and send mavlink messages to override the RC values. Will this work? Will the autopilot accept mavlink messages at these rates? I’m not super excited about this method because the companion computer is going to have to map stick values into directional velocity, which the autopilot can do already. So maybe there is a better way. Maybe an I2C interface somehow?

As for firmware customization, I’m still learning and only at the build and make small tweaks stage of expertise. I’d prefer not to require a special firmware, but if that’s the right way, I’d appreciate that feedback.

Thank you!

I have not received any responses, however, for those that might be interested, it seems from my continued research that perhaps the best way to proceed would be to create a custom flight mode that communicates with the specialized guidance computer over one of the high-speed buses.

I would prefer a mavlink solution, but I’m skeptical without evidence it can handle the performance requirements.

the way manoeuvres like this are normally done is by switching to guided mode so the companion computer can send position requests to the flight controller over mavlink then switch back to auto mode to continue with the flight once its done. the flight controller is always flying the vehicle your just telling it where you want to go.