mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-25 23:46:04 +08:00
Merge remote-tracking branch 'gautier/overview' into dev
This commit is contained in:
@@ -0,0 +1,188 @@
|
||||
<!DOCTYPE airframe SYSTEM "../../airframe.dtd">
|
||||
|
||||
<!-- Twinstar II, 2x Jeti 18 advance plus, AXI 2212/26
|
||||
Tiny 2.11
|
||||
ArduIMU
|
||||
XBee modem with API Mode
|
||||
LEA 5H GPS
|
||||
-->
|
||||
|
||||
<airframe name="Twinstar">
|
||||
|
||||
<modules>
|
||||
<load name="ins_arduimu_basic.xml">
|
||||
<define name="USE_HIGH_ACCEL_FLAG"/>
|
||||
</load>
|
||||
<load name="cam_point.xml">
|
||||
<define name="POINT_CAM_ROLL"/>
|
||||
</load>
|
||||
<!--load name="cam_segment.xml"/-->
|
||||
</modules>
|
||||
|
||||
<firmware name="fixedwing">
|
||||
<target name="ap" board="tiny_2.11"/>
|
||||
<target name="sim" board="pc"/>
|
||||
|
||||
<define name="LOITER_TRIM"/>
|
||||
<define name="ALT_KALMAN"/>
|
||||
<define name="AGR_CLIMB"/>
|
||||
<define name="USE_I2C0"/>
|
||||
|
||||
<subsystem name="i2c"/>
|
||||
<subsystem name="radio_control" type="ppm"/>
|
||||
<subsystem name="telemetry" type="xbee_api"/>
|
||||
<subsystem name="control"/>
|
||||
<subsystem name="gps" type="ublox_lea5h"/>
|
||||
<subsystem name="navigation"/>
|
||||
</firmware>
|
||||
|
||||
<firmware name="setup">
|
||||
<target name="tunnel" board="tiny_2.11"/>
|
||||
<target name="setup_actuators" board="tiny_2.11"/>
|
||||
</firmware>
|
||||
|
||||
<!-- commands section -->
|
||||
<servos>
|
||||
<servo name="MOTOR" no="2" min="1000" neutral="1000" max="2000"/>
|
||||
<servo name="AILERON_RIGHT" no="7" min="1000" neutral="1500" max="2000"/>
|
||||
<servo name="AILERON_LEFT" no="6" min="1000" neutral="1500" max="2000"/>
|
||||
<servo name="ELEVATOR" no="3" min="2000" neutral="1500" max="1000"/>
|
||||
<servo name="RUDDER" no="4" min="1000" neutral="1500" max="2000"/>
|
||||
<servo name="CAM_TILT" no="1" min="1000" neutral="1500" max="2000"/>
|
||||
</servos>
|
||||
|
||||
<commands>
|
||||
<axis name="THROTTLE" failsafe_value="0"/>
|
||||
<axis name="ROLL" failsafe_value="0"/>
|
||||
<axis name="PITCH" failsafe_value="0"/>
|
||||
<axis name="YAW" failsafe_value="0"/>
|
||||
<axis name="CAM_TILT" failsafe_value="0"/>
|
||||
</commands>
|
||||
|
||||
<rc_commands>
|
||||
<set command="THROTTLE" value="@THROTTLE"/>
|
||||
<set command="ROLL" value="@ROLL"/>
|
||||
<set command="PITCH" value="@PITCH"/>
|
||||
<set command="YAW" value="@YAW"/>
|
||||
<set command="CAM_TILT" value="@GAIN1"/>
|
||||
</rc_commands>
|
||||
|
||||
<section name="MIXER">
|
||||
<define name="AILERON_DIFF" value="0.8"/>
|
||||
</section>
|
||||
|
||||
<command_laws>
|
||||
<set servo="MOTOR" value="@THROTTLE"/>
|
||||
<set servo="ELEVATOR" value="@PITCH"/>
|
||||
<let var="roll" value="@ROLL"/>
|
||||
<set servo="AILERON_LEFT" value="($roll > 0 ? 1 : AILERON_DIFF) * $roll"/>
|
||||
<set servo="AILERON_RIGHT" value="($roll > 0 ? AILERON_DIFF : 1) * $roll"/>
|
||||
<set servo="RUDDER" value="@YAW"/>
|
||||
<set servo="CAM_TILT" value="@CAM_TILT"/>
|
||||
</command_laws>
|
||||
|
||||
<section name="AUTO1" prefix="AUTO1_">
|
||||
<define name="MAX_ROLL" value="0.85"/>
|
||||
<define name="MAX_PITCH" value="0.6"/>
|
||||
</section>
|
||||
|
||||
<section name="INS" prefix="INS_">
|
||||
<define name="ROLL_NEUTRAL_DEFAULT" value="0." unit="rad"/>
|
||||
<define name="PITCH_NEUTRAL_DEFAULT" value="0." unit="rad"/>
|
||||
</section>
|
||||
|
||||
<section name="BAT">
|
||||
<define name="MILLIAMP_AT_FULL_THROTTLE" value="20000"/>
|
||||
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
|
||||
</section>
|
||||
|
||||
<section name="CAM" prefix="CAM_">
|
||||
<define name="TILT_MAX" value="45" unit="deg"/>
|
||||
<define name="TILT_NEUTRAL" value="0" unit="deg"/>
|
||||
<define name="TILT_MIN" value="-45" unit="deg"/>
|
||||
<define name="TILT0" value="0" unit="deg"/>
|
||||
</section>
|
||||
|
||||
<section name="MISC">
|
||||
<define name="MINIMUM_AIRSPEED" value="10." unit="m/s"/>
|
||||
<define name="NOMINAL_AIRSPEED" value="12." unit="m/s"/>
|
||||
<define name="MAXIMUM_AIRSPEED" value="18." unit="m/s"/>
|
||||
<define name="CARROT" value="5." unit="s"/>
|
||||
<define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
|
||||
<define name="CONTROL_RATE" value="60" unit="Hz"/>
|
||||
<define name="ALT_KALMAN_ENABLED" value="FALSE"/>
|
||||
|
||||
<define name="TRIGGER_DELAY" value="1."/>
|
||||
<define name="DEFAULT_CIRCLE_RADIUS" value="80."/>
|
||||
</section>
|
||||
|
||||
|
||||
<section name="VERTICAL CONTROL" prefix="V_CTL_">
|
||||
<define name="POWER_CTL_BAT_NOMINAL" value="11.1" unit="volt"/>
|
||||
<!-- outer loop proportional gain -->
|
||||
<define name="ALTITUDE_PGAIN" value="-0.06"/>
|
||||
<!-- outer loop saturation -->
|
||||
<define name="ALTITUDE_MAX_CLIMB" value="2."/>
|
||||
|
||||
<!-- auto throttle inner loop -->
|
||||
<define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.45"/>
|
||||
<define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.25"/>
|
||||
<define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.85"/>
|
||||
<define name="AUTO_THROTTLE_LOITER_TRIM" value="1000"/>
|
||||
<define name="AUTO_THROTTLE_DASH_TRIM" value="-1200"/>
|
||||
<define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.2" unit="%/(m/s)"/>
|
||||
<define name="AUTO_THROTTLE_PGAIN" value="-0.023"/>
|
||||
<define name="AUTO_THROTTLE_IGAIN" value="0.1"/>
|
||||
<define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.05"/>
|
||||
|
||||
<!-- auto pitch inner loop -->
|
||||
<define name="AUTO_PITCH_PGAIN" value="-0.06"/>
|
||||
<define name="AUTO_PITCH_IGAIN" value="0.0"/>
|
||||
<define name="AUTO_PITCH_MAX_PITCH" value="0.35"/>
|
||||
<define name="AUTO_PITCH_MIN_PITCH" value="-0.35"/>
|
||||
|
||||
<define name="THROTTLE_SLEW" value="0.1"/>
|
||||
</section>
|
||||
|
||||
|
||||
<section name="HORIZONTAL CONTROL" prefix="H_CTL_">
|
||||
<define name="COURSE_PGAIN" value="-1.0"/>
|
||||
<define name="ROLL_MAX_SETPOINT" value="0.60" unit="radians"/>
|
||||
<define name="PITCH_MAX_SETPOINT" value="0.5" unit="radians"/>
|
||||
<define name="PITCH_MIN_SETPOINT" value="-0.5" unit="radians"/>
|
||||
|
||||
<define name="ROLL_ATTITUDE_GAIN" value="-9000."/>
|
||||
<define name="ROLL_RATE_GAIN" value="-3000."/>
|
||||
|
||||
<define name="PITCH_PGAIN" value="-9000."/>
|
||||
<define name="PITCH_DGAIN" value="0.4"/>
|
||||
|
||||
<define name="AILERON_OF_THROTTLE" value="0.0"/>
|
||||
<define name="ELEVATOR_OF_ROLL" value="1500"/>
|
||||
</section>
|
||||
|
||||
<section name="NAV">
|
||||
<define name="NAV_PITCH" value="0."/>
|
||||
<define name="NAV_GLIDE_PITCH_TRIM" value="0"/>
|
||||
</section>
|
||||
|
||||
<section name="AGGRESSIVE" prefix="AGR_">
|
||||
<define name="BLEND_START" value="50"/><!-- Altitude Error to Initiate Aggressive Climb CANNOT BE ZERO!!-->
|
||||
<define name="BLEND_END" value="15"/><!-- Altitude Error to Blend Aggressive to Regular Climb Modes CANNOT BE ZERO!!-->
|
||||
<define name="CLIMB_THROTTLE" value="0.9"/><!-- Gaz for Aggressive Climb -->
|
||||
<define name="CLIMB_PITCH" value="0.35"/><!-- Pitch for Aggressive Climb -->
|
||||
<define name="DESCENT_THROTTLE" value="0.05"/><!-- Gaz for Aggressive Decent -->
|
||||
<define name="DESCENT_PITCH" value="-0.35"/><!-- Pitch for Aggressive Decent -->
|
||||
<define name="CLIMB_NAV_RATIO" value="0.8"/><!-- Percent Navigation for Altitude Error Equal to Start Altitude -->
|
||||
<define name="DESCENT_NAV_RATIO" value="1.0"/>
|
||||
</section>
|
||||
|
||||
<section name="FAILSAFE" prefix="FAILSAFE_">
|
||||
<define name="DELAY_WITHOUT_GPS" value="2" unit="s"/>
|
||||
<define name="DEFAULT_THROTTLE" value="0.3" unit="%"/>
|
||||
<define name="DEFAULT_ROLL" value="0.17" unit="rad"/>
|
||||
<define name="DEFAULT_PITCH" value="0.08" unit="rad"/>
|
||||
<define name="HOME_RADIUS" value="100" unit="m"/>
|
||||
</section>
|
||||
|
||||
</airframe>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="cam_segment" dir="cam_control">
|
||||
<!--depend require="cam_point.xml"/-->
|
||||
<header>
|
||||
<file name="cam_segment.h"/>
|
||||
</header>
|
||||
<init fun="cam_segment_init()"/>
|
||||
<periodic fun="cam_segment_periodic()" stop="cam_segment_stop()" freq="10." autorun="FALSE"/>
|
||||
<makefile>
|
||||
<file name="cam_segment.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -3,7 +3,7 @@
|
||||
<settings>
|
||||
<dl_settings NAME="control">
|
||||
<dl_settings name="cam">
|
||||
<dl_setting MAX="5" MIN="0" STEP="1" module="cam_control/cam" VAR="cam_mode">
|
||||
<dl_setting MAX="5" MIN="0" STEP="1" module="cam_control/cam" VAR="cam_mode" values="0FF|ANGLES|NADIR|XY_TARGET|WP_TARGET|AC_TARGET">
|
||||
<strip_button name="AC_TARGET" value="5"/>
|
||||
<strip_button name="WP_TARGET" value="4"/>
|
||||
<strip_button name="XY_TARGET" value="3"/>
|
||||
|
||||
@@ -63,7 +63,7 @@ extern float cam_pan_c, cam_tilt_c;
|
||||
/* pan (move left and right), tilt (move up and down) */
|
||||
/** Radians, for CAM_MODE_ANGLES mode */
|
||||
|
||||
extern float cam_target_x, cam_target_y;
|
||||
extern float cam_target_x, cam_target_y, cam_target_alt;
|
||||
/** For CAM_MODE_XY_TARGET mode */
|
||||
|
||||
extern uint8_t cam_target_wp;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2011 Gautier Hattenberger
|
||||
*
|
||||
* This file is part of paparazzi.
|
||||
*
|
||||
* paparazzi is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* paparazzi is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with paparazzi; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
/** \file cam_segment.c
|
||||
* \brief camera control to track a segment using the general cam driver (target mode)
|
||||
*
|
||||
* initial version: pointing towards the carrot
|
||||
*/
|
||||
|
||||
#include "modules/cam_control/cam_segment.h"
|
||||
#include "modules/cam_control/cam.h"
|
||||
#include "subsystems/nav.h"
|
||||
#include "estimator.h"
|
||||
|
||||
void cam_segment_init( void ) {
|
||||
}
|
||||
|
||||
void cam_segment_stop ( void ) {
|
||||
cam_mode = CAM_MODE_OFF;
|
||||
}
|
||||
|
||||
void cam_segment_periodic( void ) {
|
||||
cam_mode = CAM_MODE_XY_TARGET;
|
||||
cam_target_x = desired_x;
|
||||
cam_target_y = desired_y;
|
||||
cam_target_alt = ground_alt;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2011 Gautier Hattenberger
|
||||
*
|
||||
* This file is part of paparazzi.
|
||||
*
|
||||
* paparazzi is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* paparazzi is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with paparazzi; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
/** \file cam_segment.c
|
||||
* \brief camera control to track a segment using the general cam driver (target mode)
|
||||
*
|
||||
* initial version: pointing towards the carrot
|
||||
*/
|
||||
|
||||
#ifndef CAM_SEGMENT_H
|
||||
#define CAM_SEGMENT_H
|
||||
|
||||
extern void cam_segment_init( void );
|
||||
extern void cam_segment_stop ( void );
|
||||
extern void cam_segment_periodic( void );
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user