AutoPilot test v1.0(Twin Prop)
Activate3 open AutoHeading
Activate5 Auto Trim(On by default)
Activate6 Auto Throttle and Speed brakes
Activate7 Auto Pitch
Activate4 ALT hold/Vy select(Vy doesn't work well at the moment)
Activate8 Engine
With this AutoPilot, flying routes and exploration is simple
Operate from the rear seat
In the code section, ALT represents the objective altitude, SPD represents the objective airspeed, and HAD represents the objective direction
https://www.bilibili.com/read/cv25759379
<Variables>
<Setter variable="ALT" function="ALT22500+2500" priority="0" />
<Setter variable="ALT2" function="" priority="0" />
<Setter variable="SPD" function="(SPD260+200)(1-Brake)" priority="0" />
<Setter variable="HAD" function="(HAD2+1)180" priority="0" />
<Setter variable="P1" function="-((clamp(ALT-Altitude,-150,200)/(15/MP)-PitchAngle)/301-(Activate4+1)/2" priority="0" />
<Setter variable="R" function="clamp(RollAngle+clamp(A,-30,30)MR,-60,60)/60" priority="0" />
<Setter variable="Y" function="-RollAngle.015" priority="0" />
<Setter variable="T" function="clamp01(SPD>IAS3.6)clamp01(Activate6)" priority="0" />
<Setter variable="HAD2" function="" priority="0" />
<Setter variable="A" function="deltaangle(Heading,HAD)" priority="0" />
<Setter variable="SPD2" function="" priority="0" />
<Setter variable="MR" function="clamp((MR2+1).8,.4,1.7)" priority="0" />
<Setter variable="MP" function="(MP2+1)1.125" priority="0" />
<Setter variable="MR2" function="" priority="0" />
<Setter variable="MP2" function="" priority="0" />
<Setter variable="VY" function="VY2600" priority="0" />
<Setter variable="VY2" function="" priority="0" />
<Setter variable="TVY" function="rate(Altitude)60" priority="0" />
<Setter variable="P2" function="clamp01(Activate4)clamp(TVY-VY,-300,300)/400" priority="0" />
<Setter variable="P" function="clamp01(Activate7)(P1+P2)" priority="0" />
<Setter variable="APT" function="(-27000/pow(IAS,3)-.08)clamp01(AltitudeAgl>7)" priority="0" />
</Variables>
Specifications
Spotlights
- Canadaball 1.3 years ago
General Characteristics
- Predecessor AutoPilot Test(Twin Prop)
- Created On Windows
- Wingspan 38.0ft (11.6m)
- Length 30.1ft (9.2m)
- Height 12.8ft (3.9m)
- Empty Weight 3,762lbs (1,706kg)
- Loaded Weight 4,360lbs (1,977kg)
Performance
- Horse Power/Weight Ratio 0.114
- Wing Loading 14.2lbs/ft2 (69.3kg/m2)
- Wing Area 307.4ft2 (28.6m2)
- Drag Points 2192
Parts
- Number of Parts 216
- Control Surfaces 7
- Performance Cost 1,106
@linxiaofeng2339 clamp01(SPD>IAS3.6)clamp01(Activate6)-rate(TAS)clamp01(abs(IAS3.6-SPD)<5)
This code is newly written by me to maintain a speed error below 2km/h on TwinProp
The input of the spoiler can be changed to IAS*3.6>(SPD+5)
I'm making a new version of autopilot, but I didn't finish the VY control
这个自动驾驶系统很巧妙,利用加速度特性,推算阻力,进而控制推力和阻力,速度偏差甚至不会超过1kts
我认为你的自动驾驶速度系统可以改进(我帖子里面有一个Fighter,你可以下载最新版,看看我的速度控制系统是如何工作的)