Quad HIL Simulation with XPlane

Hello all,

I'm trying to get the waypoint navigation in HIL simulation using XPlane, but not successful yet.....with the default HIL firmware and the config file "AC211r6_Xplane.param" available in the starter_pack, i observe the following:

- The quad rotor in xplane get a max throttle of 0.169, and does not take-off.....

- If i change the throttle gain (from default 10000 to smthng like 3000), quad rotor takes off, but does not switch mode to AUTO even after reaching very high altitudes...

The mission script that i run from Mission Planner is this:

----------------------------------------------------------------------------------------------------

print 'Start Script' # auto-lauch the AUTO mode for HIL test in Xplane v9.70 (JLN January 6, 2012)
Script.SendRC(1,1500,True) # roll
Script.SendRC(2,1500,True) # pitch
Script.SendRC(3,1000,True) # throttle
Script.SendRC(4,1500,True) # yaw
Script.SendRC(5,1933,True) # mode Stabilize - Mode 6

Script.Sleep(1000)

Script.Sleep(1000)

Script.SendRC(4,2000,True) # yaw right to arm the motors
cs.messages.Clear()
Script.WaitFor('ARMING MOTORS',30000)
print 'Motors Armed!'
Script.SendRC(4,1500,True)

Script.Sleep(1000)

print 'Takeoff'
Script.SendRC(4,1500,True)
Script.SendRC(1,1500,True)
Script.SendRC(2,1500,True)
Script.SendRC(3,1700,True) # throttle up


Script.SendRC(5,1515,True) # set mode to AUTO- Mode 3

------------------------------------------------------------------------------------------------

Any suggestions on how do i get the mode change to AUTO and waypoint navigation working in HIL...??

APM Sim Tab.jpg

XPlanejpg.jpg

APM Commnad Line.jpg

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Was a silly mistake......i was doing it without a GPS lock.....now i can change mode to AUTO....

    But the throttle problem remains....max throttle tht i get with RC channel 3 (max,min = 1885,1100) and sim throttle gain of 10000 are 0.180, which makes sense.....so i change throttle gain to 3000, and quad takes off fine with mission script (new throttle in XPlane = 1885/3000 = 0.628)....

    However, whenever it encounters mode change command to AUTO in mission script, it just keeps coming down, until it crashes.....throttle value show the same (no reduction) in mission planner and XPlane....i've tried them with different home altitudes with only one command in AUTO mission: takeoff to certain altitude....but same thing happens always....the usual waypoint nav too responds the same...

    Any suggestions or ideas on what am I doing wrong here....??

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…