On Mon, Jan 21, 2013 at 11:02 AM, Jorn Anke
<address@hidden> wrote:
Christophe,
I have performed several flights using a slightly different verson of the sample flie you was referncing, with my zamboni flight-pattern. This has worked very well. The attached image shows a screendump from two actual successive zamboni flights.
I was then using a simple set of <command laws> similar to quoted under. I don't understand much of the newer set of command laws, and I wonder if you can clearify how they might affect flight performance.
Cheers,
Jørn
Old settings:
<command_laws>
<set servo="AILEVON_LEFT" value="@ROLL"/>
<set servo="AILEVON_RIGHT" value="address@hidden"/>
<set servo="THROTTLE" value="@THROTTLE"/>
<set servo="ELEVATOR" value="@PITCH"/>
</command_laws>
"New" settings:
<command_laws>
<!-- Brake Rate Limiter -->
<let var="brake_value_nofilt" value="Chop(address@hidden, 0, MAX_PPRZ)"/>
= read the command from the radio in manual/auto1 or flightplan in auto2
<ratelimit var="brake_value" value="$brake_value_nofilt" rate_min="-MAX_BRAKE_RATE" rate_max="MAX_BRAKE_RATE" />
= make it smooth: (1.5 second time to go from normal to brake or back = less aggressive = less deviation from flightplan)
<!-- Differential Aileron Depending on Brake Value -->
<let var="aileron_up_rate" value="(AILERON_RATE_UP * (MAX_PPRZ - $brake_value)) + (AILERON_RATE_UP_BRAKE * $brake_value)"/>
normal mode: $brake_value = 0
use AILERON_RATE_UP/DOWN when normal
use AILERON_RATE_UPDOWN_BRAKE when braking
<let var="aileron_down_rate" value="(AILERON_RATE_DOWN * (MAX_PPRZ - $brake_value)) + (AILERON_RATE_DOWN_BRAKE * $brake_value)"/>
<let var="aileron_up" value="((address@hidden) * (((float)$aileron_up_rate) / ((float)MAX_PPRZ)))"/>
<let var="aileron_down" value="((address@hidden) * (((float)$aileron_down_rate) / ((float)MAX_PPRZ)))"/>
<let var="leftturn" value="(@ROLL >= 0? 0 : 1)"/>
<let var="rightturn" value="(1 - $leftturn)"/>
check if aileron needs to go up or down
<set servo="AILERON_LEFT" value="($aileron_up * $leftturn) + ($aileron_down * $rightturn) - $brake_value*(BRAKE_AILEVON) - (MAX_PPRZ * AILERON_NEUTRAL)"/>
<set servo="AILERON_RIGHT" value="($aileron_up * $rightturn) + ($aileron_down * $leftturn) + $brake_value*(BRAKE_AILEVON) + (MAX_PPRZ *AILERON_NEUTRAL)"/>
use either the UP-rate or the DOWN-rate of either the BRAKE mode or the NORMAL mode
<set servo="RUDDER" value="-(@YAW + @ROLL * RUDDER_OF_AILERON)"/>
<set servo="THROTTLE" value="@THROTTLE"/>
<!-- Pitch with Brake-Trim Function -->
<set servo="ELEVATOR" value="@PITCH * PITCH_GAIN - BRAKE_PITCH * $brake_value"/>
compensate the elevator for BRAKE deflection (with same rate limit)
</command_laws>
Our Skywalker airframe (yapa2 + xsens) is our UAV with most flight-hours but the airframe.xml file did not change (functionally) for at the very least over a year. But there seem to be several versions arround in several branches/folders. So I do not know which version you refer to as of Sep2012.
PS: there is absolutely no guarantee that it will work like this for other SkyWalkers. It depends on your total weight, choice of engine, actual servo setup and deflections, wing-stiffness-reenforcements, ...
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel