Hello,
I would like to setup my quad to fly outdoors and use the gps + optical flow for loiter mode. |
Is there a way I could setup to fuse the optical flow & gps such that:
- It fuses optical flow & gps for position hold, when closer to the ground optical flow has more weight, when higher than the range finder distance, gps contributes more.
- The rangefinder + baro are used for height estimation, once beyond the rangefinder’s limit, only the baro is used.
This is so that when in loiter, horizontal movements when closer to the ground are minimal.
I am aware of the LUA script, however, my FC does not contain a sd card (only an external flash).
I do not intend on flying indoors.
I believe EK3_SRC_OPTIONS needs to be set to 1?
Could someone guide me with the settings for the EK3_SRC settings itself?
Currently, my quad is set to switch between the optical flow & GPS based on a tx switch as mentioned in the docs
My understanding of the docs is, when EK3_SRC_OPTIONS=1, it fuses all data in the one source i.e. EK3_SRC1_*
EK3_SRC1_* & EK3_SRC_2_* are not fused.
1. Is the above understanding correct?
2.If yes, would the below settings be correct?
EK3_SRC_OPTIONS=1 (Fuse All Velocities)
EK3_SRC1_POSXY=3 (GPS)
EK3_SRC1_VELXY=5 (Optical flow)
EK3_SRC1_POSZ=1 (Baro)
EK3_SRC1_VELZ=3 (GPS)
EK3_SRC1_YAW=1 (Compass)
EK3_RNG_USE_HGT=80%
With this, I assume optical flow will be fused in to reduce the minor horizontal variations that my GPS module lacks precision for.
I’ve used the Baro as the main source for Altitude, however, EK3_RNG_USE_HGT will be used as the primary source, when within range for the sensor, once out of range, the fallback is the primary sensor.
3)Also, if the EK3 source select switch is set & fusing was enabled, would it override to allow me to manually switch sources?
Thank you.