SITL: examples: update JSON readme

This commit is contained in:
Iampete1 2020-07-18 13:55:47 +01:00 committed by Andrew Tridgell
parent bdec15f708
commit 123d7e4683

View File

@ -43,4 +43,30 @@ This is a example input frame, it should be preceded by and terminated with a ca
```
{"timestamp":2500,"imu":{"gyro":[0,0,0],"accel_body":[0,0,0]},"position":[0,0,0],"attitude":[0,0,0],"velocity":[0,0,0]}
```
The order of fields is not important. In the future support for additional optional fields could be added to allow readings to be provided for additional sensors.
The order of fields is not important.
It is possible to send optional fields to provide data for additional sensors, in most cases this will require setting the relevant sensor type param to the SITL driver.
rangefinder distances corresponding to driver instances:
```
rng_1 (m)
rng_2 (m)
rng_3 (m)
rng_4 (m)
rng_5 (m)
rng_6 (m)
```
When first connecting you will see a message reporting what fields were successfully received. If any of the mandatory fields are missing SITL will stop, however it will run without the optional fields. This message can be used to double check SITL is receiving everything being sent by the physics backend.
For example:
```
JSON received:
timestamp
gyro
accel_body
position
attitude
velocity
rng_1
```