uThere
Home Products Videos Support
 

Interfacing with Ground Control via UDP / TCP :

Fly command demo


) load latest firmware (attached to this email) into your sim ruby SDFlash

) get latest GC from svn

) power up Ruby, THEN plug in USB cable (sorry, this is because USB code is very rough - requires this exact sequence for now)

) Run GC, select configuration "mit_sai_sim.xml", connect to Ruby, download configuration to Ruby

) quit GC, unplug USB, power cycle Ruby, plug USB back in, restart GC (sorry, again - rough USB code)

) menu: Developer: Run / Restart Simulator. The plane should come to life (see position display).

) click on "Laptop" to assume control. Click on "Throttle" to enable Ruby to apply throttle as necessary to maintain altitude.

) select "Waypoint" mode from popup menu. ("Waypoint" could be called "Slave") This is the only mode from which incoming "slave" activity is allowed.
..
At this point, the plane should be seen to be loitering at home (waypoint 0)

) Run the separate utility / demo console application:
uthereSolution\Telepresence\GroundControl\AppInterface\Tools\UDP_Terminal\udp

) paste in the following to get a stream of metrics that your application will typically monitor for status:
data_request(plane=205,variable=ap_target_from_packet_enabled,interval = 1.0)
data_request(plane=205,variable=control_operate_mode,interval = 1.0)
data_request(plane=205,variable=ap_target_from_packet_cage_triggered_last,interval = 1.0)
data_resume

) you should see control_operate_mode should == 3 = "waypoint" mode. This is the only mode which will allow fly or waypoint commands to be issued.

) type "fly_enable" (or just type "9" - it's on the menu). This will reset the "ap_target_from_packet_enabled" latch to 1, allowing fly commands to execute
(ap_target_from_packet_enabled will be set to "0" if cage is violated)

) type one of the following:
fly(plane=205,roll=-10,pitch=15,throttle=60) (or just type "11" - it's on the menu)
fly(plane=205,heading=180,airspeed=19,climb=1.23) (or just type "12")

you'll have to continually enter "11" or "12", at least once every 3 seconds to stay in "fly" mode

you can alternate "11" or "12", or start issuing waypoint commands instead

try different parameters. for instance, set throttle = 0, then see the cage engage when 200 ft agl floor is hit


if a limit specific to "fly" mode such as altitude or roll angle is hit, you can get back into "fly" mode by waiting for autopilot to restore plane to within cage parameters, then issue "fly_enable" again.

if a "hard" cage limit applicable to waypoint mode is hit, such as long range, packet timeout, or battery, it will be necessary to re-select "Laptop" and "Waypoint" in GC. Your application will see control_operate_mode = something other than "3".

ap_target_from_packet_cage_triggered_last is a bitmap indicating which cage parameter(s) were triggered to cause "fly" mode to be disabled

usa flag RubyTM and other uThere products are manufactured in the USA Mission  | About  | Testimony | Mailing List | Satisfaction | Policies | Contact Copyright © 2011-2020 uThere, LLC