Control modes and Flight modes

Here is the place for all your dsPic or autopilot questions.

Moderator: lukasz

Control modes and Flight modes

Postby Jippieee » Mon Sep 13, 2010 8:30 pm

While peeking around in the firmware I was wondering if a clear separation between control modes in combination with flight modes would make sense. The idea is that the control mode defines the type of application (plane, quadrocoper, ...) and the flight mode defines e.g Manual control, Take off, Stabilized flight, Pattern navigation, Return home, Landing, Hover, High-alpha flight, ...
I realize that is it may not be convenient to have all flight modes on one channel, but a selection of 3-5 modes could be controlled from the tx switch(es).

The reason for my suggestion is that the current code contains some #ifdef's and this kind of witholds me of hacking the code "main loop".
Jippieee
 
Posts: 24
Joined: Mon Jul 19, 2010 1:50 pm

Re: Control modes and Flight modes

Postby Tom » Tue Sep 14, 2010 6:14 pm

There are 3 modes in control.c: manual, stabilized and navigation
Things like takeoff, return home, patterns, ... are defined in navigation.c

Yes, the more switches and flight modes the better. Unfortunately most people only have 1 switch with 2 or 3 states, so that is what's implemented. If you need other options, you'll need to make some small changes in the code. I'm thinking to include navigation commands such as "IF (CHANNEL_7 > 1800) ...". Would this solve your problem?
The idea is that in-flight changes about the navigation flight pattern should be done using a modem such as an XBee.

The #ifdef's were introduced when doing experiments with quadrocopters. At first there were only 2 lines, but after a while it became more lines :-) I plan to put them in separate function on a next revision.

Release v0.5 will be released soon and will focus on UAV airplane improvements. The next release will probably focus again on quadrocopters and implements those changes.

Don't let those #ifdef's stop you from hacking the code! Only 2 functions in control.c are really affected by this :-)
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium


Return to Firmware

Who is online

Users browsing this forum: No registered users and 6 guests

cron