Archived: HIL Quad Simulator¶
Warning
ARCHIVED ARTICLE
HIL does not work since inertial navigation was introduced with Copter 2.9. The closest alternative we have is SITL.
This article explains how to setup Quad HIL in the mission planner.
What you need¶
In the Mission Planner > ‘Configuration tab | Adv Parameter List’ save your current parameters so you can reload them after the simulation.
How to make it work¶
Safety First: Remove your quad’s props, the motors will be live during the simulation!¶
Upload the quad hil firmware
2. Copy quadhil.xml (included with planner) to your FlightGear directory eg
C:Program Files (x86)FlightGeardataProtocol
Copy the whole ‘arducopter’ folder from
C:Program Files (x86)Mission Planneraircraft
to your FlightGear Aircraft directory eg
C:Program Files (x86)FlightGearAircraft
Start the Mission Planner
Connect as usual
Setup the radio/modes as required. Setup frame to +.
Goto simulation.
Check Quad, and FlightGear.
Click start fg quad and wait for FlightGear to start.
Click start sim link.
For those that want to start FlightGear themselves¶
This is the bat file used to start FlightGear
"C:Program Files (x86)FlightGear v20110705binWin32fgfs" ^
"--fg-root=C:Program Files (x86)FlightGear v20110705data" ^
"--geometry=400x300" ^
"--aircraft=arducopter" ^
"--native-fdm=socket,out,50,127.0.0.1,49005,udp" ^
"--generic=socket,in,50,127.0.0.1,49000,udp,quadhil" ^
"--fdm=external" ^
"--prop:/logging/log/filename=fg_record.csv" ^
"--log-level=info" ^
"--roll=0" ^
"--pitch=0" ^
"--wind=0@0" ^
"--turbulence=0.0" ^
"--prop:/sim/frame-rate-throttle-hz=30" ^
"--timeofday=noon" ^
"--shading-flat" ^
"--fog-disable" ^
"--disable-specular-highlight" ^
"--disable-skyblend" ^
"--disable-random-objects" ^
"--disable-panel" ^
"--disable-horizon-effect" ^
"--disable-clouds" ^
"--disable-anti-alias-hud"