We've been working hard to make MatrixPilot ever more modular, and to test this modularization, I thought it would be fun to build a LOGO-like mission planning language as a plug-in replacement for the existing waypoints module.

After a few evenings of playing, I ended up with something that actually feels pretty useful. All the logo basics are there: HOME, RT, LT, FD, BK, REPEAT, etc. You can also set specific locations (like traditional waypoints), set altitude, and set and toggle flags like whether to fly inverted. You can also toggle between controlling the plane, and controlling the camera target. More info on the language here.

The above image is from a simulation of the following UDB LOGO program running in XPlane using MatrixPilot's HIL Simulation.

// 10-pointed star with an external loop at each point
REPEAT(10)
// One leg of the star
FD(2000)
// Turn 180 + 72 degrees over the course of 18 small segments
REPEAT(18)
RT(14) // RT( (180+72)/18 )
FD(50)
END
END

Views: 26

Comment by Curt Olson on September 1, 2010 at 5:43am
Something along this lines could make a neat T3 contest ... create artwork or interesting designs with your flight track.
Comment by Brian Wolfe on September 1, 2010 at 9:24am
I've been adding similar commands to my scripting language but didn't think to use a standard like Logo.

I like it. Nice work and very useful.

I've found the repeat command in particular to be a big timesaver.

Thanks,
Brian

Moderator
Comment by Krzysztof Bosak on September 2, 2010 at 6:28am
There is a serious danger. No way to determine the distance, number of waypoints etc before executing.
Therefore I have opted for allowing only a single loop in flexipilot.
Comment by Ben Levitt on September 2, 2010 at 9:39am
Thanks Brian, I'm having fun playing with LOGO again, and I agree the real power comes from the repeats.
Comment by Ben Levitt on September 2, 2010 at 9:43am
Hi Krzysztof, I agree that it becomes non-trivial to determine exactly what's going to happen before flying.

But I'm not willing to give up on nested repeats. They allow too much cool stuff. :) I'm thinking of making a quick and dirty tool to let you run a UDB Logo program on the desktop before a flight, to make sure it's planning to do what you think it is...
Comment by Ben Levitt on September 2, 2010 at 10:35am
Oh right, I should also point out that you can already use HIL Simulation to test a UDB Logo program before a real flight. :)

Moderator
Comment by Krzysztof Bosak on September 2, 2010 at 10:40am
"Oh right, I should also point out that you can already use HIL Simulation to test a UDB Logo program before a real flight. :) "
Same as everywhere, but with nested loops, you are practically OBLIGATED to do so in order to avoid surprises. You will see, once a number of parameters grows, you will be bound again to the laptop under the sun.
Comment by Ben Levitt on September 2, 2010 at 10:57am
I understand the concern, and it's a good point to keep in mind when planning a mission. But I'm happy to test out more complex plans before flying. If some are not, then they can always choose not to use nested loops. :)

Developer
Comment by William Premerlani on September 2, 2010 at 11:39am
There is a simple thing that could be done to improve flight security:

Trigger an automatic return to launch if the plane got farther away from the origin than a specified limit.

Best regards,
Bill
Comment by Ben Levitt on September 2, 2010 at 2:17pm
That's an interesting idea Bill. Almost like a watchdog timer but for distance instead of time. Although I guess we sort of have this already with an emergent hardcoded distance of "how far your transmitter reaches", since on signal loss, the separate RTL UDB Logo program will engage. The default rtl program commands the plane to come home and circle.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The third round was a reliablilty/aerial photography round for both planes and copters, which is now closed. Stay tuned for the next round, beginning soon.

A list of all T3 contests is here

 

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service