For various measurements on the flying aircraft, I wrote a script that creates a mission that makes the aircraft fly along an elongated rectangle:
The length of the rectangle is calculated from the desired flight time in downwind leg (Lua variable DOWNWIND_TIME) and the AP parameter ARSPD_TRIM_CM. The width of the rectangle is calculated in such a way that the aircraft can turn from the downwind leg into the upwind (and vice versa) in a half circle. The desired bank angel is specified in the variable of the same name at the beginning of the script. The parameters WP_LOITER_RAD and WP_RAD are adjusted accordingly.
This makes it easy to fly any desired distance in stable flight. Example flight:
After launch, in any mode except Auto, the creating of a new mission consisting of 4 waypoints (and a fifth DO_JUMP to the starting point of course) can be triggered by a switch on the remote control (RCn_OPTION = 300) . Waypoint one is then at the location of the trigger. The flight mode is automatically switched to Auto. By switching to another flight mode, the mission can be terminated and re-triggered as often as desired by switch again.
Even if it is scripted completely unprofessionally, it still does its job for me, for example, when measuring efficiency. Maybe someone can use something like that. The script evaluates a second switch, with which an Arduplane parameter can be changed in flight. In the example it is TECS_SYNAIRSPEED.
Rolf
WindMis.lua (5.3 KB)