Hi George,
> In the premises of realistic and predictable simulation, I would also like
> to propose this as an end-goal. Instead of having the SITL code fake all
> those aforementioned readings, by using only a *very limited* set from the
> old FDM packet information, we could move this task to last_letter.
> Let the simulation calculate ALL sensor messages (for example all the
> sensors of the PXF cape) and model the errors as well and communicate them
> to SITL. From there, the HAL can do its work.
I'd be very happy for last_letter to do more of that sensor emulation,
although I don't think we will be able to emulate the full Pixhawk
sensor suite. We now sample the lsm303d accelerometers at 1600Hz for
example, and I don't think it will really help to do that sort of sample
rate from last_letter.
Another thing I'd like to keep is an easy way to control the simulation
environment. Right now you can do:
param set SIM_ACC_RND 3
to add 3m/s/s of accel noise. That sort of interface is very useful.
You can see all of the simulation parameters here:
https://github.com/diydrones/ardupilot/blob/master/libraries/SITL/SITL.cpp#L31
I definately do like the idea of better temperature modelling in the
FDM. Quite a few people are doing high altitude flights (above 20km) now
with ArduPilot, and it is nice to be able to simulate that before
flying. We do that now in JSBSIm, but I think it could be improved.
> What isn't trivial, and it's what I have my eyes set on currently, is come
> up with a model to simulate the rise in temperature *inside* the APM
> case, which I suspect affects the altitude estimation just as badly.
We actually use the temperature from a digital airspeed sensor if
available, as that sensor is usually close to ambient air temperature
(out on a wing).
There are 5 temperature sensors in a typical Pixhawk plane, and will be
even more on the next board. We only use 2 of them for now (baro and
airspeed sensor), but we are considering doing temperature calibration
of the IMUs using their temperature sensors.
> Temperature drifts of up to 10degs at boot have been recorded and users
> need to reboot their systems before flight to combat this.
it is often a lot more than 10 degrees
> 3. Examine fault conditions easily. Albeit the aerodynamics model for a
> plane is not trivial at all and all we have (even for JSBSim) is an
> approximated polynomial function of the predicted behaviour, we can do some
> pretty handy things with it: Fake servo lock-ups, weight shifting, loss of
> mass etc.
yes! One of the things that I hope to get out of the collaboration is
some of this special case handling. For example, I hacked up support for
balloon launches in SITL using JSBSIm, but it was an awful hack. There
are all sorts of special considerations with balloon launched planes,
and having proper support for it in a simulator would be really nice.
same with catapult launches, parachute landings, dropping objects,
losing a servo, blocked pitot tubes (from rain) etc etc.
> All the above, and many more, are topics that would make a great simulator
> for UAV development. The task to orchestrate all these under a single
> software solution seems complicated, but I look forward to the challenge.
me too!
Cheers, Tridge