Launch a program on a Rasberry pi during an auto mission

Hello,

The objective of our project is to take measurements at various locations on a wall.
The idea is to use an automatic mission with Waypoints to position the drone facing the wall, then launch the program on the Raspberry Pi which makes contact with the drone on the wall. Once finished, it resumes the automatic mission to move to the next Waypoint.

We might consider using the “lua time script,” which could possibly allow us to launch the program, but we are not familiar with this function and we’re not sure if it’s the solution.

Do you have any advice or options to achieve this?

Thank you.