The Ardupilot allows you to have multiple flight modes of which I would actually only need 2 and downsizing has already been discussed but downsizing irrelevant code is not what I want/need.
Could I have two sets of autopilot code one setup for fast servo control, the other setup for slow servo control? (Space permitting or if not remove another mode for space)
Could I add altitude based servo variables? the higher she goes the slower the servos react
I will be using a glider first off (because I dont care if it breaks) so motor control is not needed. Is there a variable for this or do I delete/adjust a section of code
Replies
Thanks for all your help
void read_control_switch(){
byte switchPosition = readSwitch();
if (oldSwitchPosition != switchPosition){
switch(switchPosition)
{
case 1: //
set_mode(POSITION_1);
break;
case 2: //
set_mode(POSITION_2);
// set a variable here such as a PID value
break;
case 3: //
set_mode(POSITION_3);
// set a variable here such as a PID value
break;
}
oldSwitchPosition = switchPosition;
// reset navigation integrators
// -------------------------
reset_I();
}
}
If you are not using a motor then use the airspeed sensor. Elevator will be based on airspeed hold. You can just ignore the throttle parameters.