SITL autotest - automated testing

I would like to run the SITL in an automated fashion where I pipe in a time based set of flight commands from a file. I am familiar with running the SITL through, and have started looking into but am not quite sure what it is doing (I’m going off the wiki help page for autotest: I think autotest is what I need, but would be great if anyone could tell me if I’m going in the right direction, and provide some guidance. Meanwhile, I’ll start trying to understand the py script. Thanks!

More specifically, I would like to pipe in commands recorded in the logs of an actual flight (the modes and rc inputs) and confirm the vehicle response.

So I’ve been able to get in to the autotest routines and start to do what I want. One thing I am trying to understand is the use of get_sim_time() and how that dictates the rate at which I can send new messages to/through mavlink. That function is blocking and gives me back a time every 0.2s. Does that mean that is fastest speed at which I will be able to send a new command? Is that settable? Thanks!

get_sim_time() waits for a current simulation time from the vehicle -
which we stream out at 5Hz by default (it’s the SYSTEM_TIME message).

You could increase the rate of that message if you felt like it - if you
need a finer-grained concept of the vehicle’s current simulation time,
that would be appropriate.

I can only think you need this for simulated sensor input - if it’s
control dynamics you’re looking at you’d also be wanting to increase
streamrates for things like ATTTIUDE and whatnot - and in that case you
don’t need to know the system time, you just go off whatever ATTITUDE is
saying. Most places in the code work like this.

Thanks for the explanation!