mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 12:23:23 +08:00
*** empty log message ***
This commit is contained in:
@@ -49,6 +49,9 @@
|
||||
<define name="IR2" value="1"/>
|
||||
<define name="VSUPPLY" value="6"/>
|
||||
</section>
|
||||
<section name="servo">
|
||||
<define name="SERVOS_FALLING_EDGE" value="1"/>
|
||||
</section>
|
||||
<servos min="1000" neutral="1500" max="2000">
|
||||
<servo name="MOTOR_FRONT" no="1" min="1250" neutral="1250" max="1850"/>
|
||||
<servo name="MOTOR_BACK" no="2" min="1250" neutral="1250" max="1850"/>
|
||||
@@ -66,8 +69,10 @@
|
||||
<set servo="MOTOR_LEFT" value="$throttle - $roll + $yaw"/>
|
||||
</command>
|
||||
<section name="INFRARED" prefix="IR_">
|
||||
<define name="ROLL_NEUTRAL_DEFAULT" value="0"/>
|
||||
<define name="PITCH_NEUTRAL_DEFAULT" value="1024"/>
|
||||
<define name="ADC_ROLL_NEUTRAL" value="0"/>
|
||||
<define name="ADC_PITCH_NEUTRAL" value="1024"/>
|
||||
<define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/>
|
||||
<define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/>
|
||||
<define name="DEFAULT_CONTRAST" value="200"/>
|
||||
<define name="RAD_OF_IR_CONTRAST" value="0.75"/>
|
||||
<linear name="RollOfIrs" arity="2" coeff1="-1" coeff2="1"/>
|
||||
@@ -80,6 +85,7 @@
|
||||
<define name="MAX_ROLL" value="0.35"/>
|
||||
<define name="MAX_PITCH" value="0.35"/>
|
||||
<define name="MIN_PITCH" value="-0.35"/>
|
||||
<define name="AILERON_OF_GAZ" value="-0.13"/>
|
||||
</section>
|
||||
<section name="ALT" prefix="CLIMB_">
|
||||
<define name="PITCH_PGAIN" value="-0.1"/>
|
||||
|
||||
+3
-3
@@ -38,7 +38,7 @@
|
||||
ac_id="4"
|
||||
airframe="airframes/plaster1.xml"
|
||||
radio="radios/mc3030.xml"
|
||||
flight_plan="flight_plans/ricou_vz.xml"
|
||||
flight_plan="flight_plans/muret_mini.xml"
|
||||
/>
|
||||
|
||||
<aircraft
|
||||
@@ -71,7 +71,7 @@
|
||||
ac_id="8"
|
||||
airframe="airframes/ladybug.xml"
|
||||
radio="radios/mc3030.xml"
|
||||
flight_plan="flight_plans/sinsat.xml"
|
||||
flight_plan="flight_plans/muret_mini.xml"
|
||||
/>
|
||||
|
||||
<aircraft
|
||||
@@ -79,7 +79,7 @@
|
||||
ac_id="9"
|
||||
airframe="airframes/flyingtux.xml"
|
||||
radio="radios/mc3030.xml"
|
||||
flight_plan="flight_plans/ricou_vz.xml"
|
||||
flight_plan="flight_plans/muret_mini.xml"
|
||||
/>
|
||||
|
||||
<ground name="desktop" ivy_bus="127.255.255.255:2010">
|
||||
|
||||
+12
-1
@@ -139,7 +139,7 @@
|
||||
|
||||
<session name="replay Ricou">
|
||||
<!-- <variable name="ivy_bus" value="192.168.1:2001"/> -->
|
||||
<variable name="map" value="ricouUTM.xml"/>
|
||||
<variable name="map" value="ricou_large.xml"/>
|
||||
<program name="receive"/>
|
||||
<program name="http server"/>
|
||||
<program name="cockpit"><arg flag="-render" constant="1"/></program>
|
||||
@@ -228,6 +228,17 @@
|
||||
<program name="map 2d ml"/>
|
||||
</session>
|
||||
|
||||
<session name="flight hard modem Muret">
|
||||
<variable name="map" value="muret_UTM.xml"/>
|
||||
<variable name="ivy_bus" value="127:2010"/>
|
||||
<program name="http server"/>
|
||||
<program name="modem"><arg flag="-d" constant="/dev/ttyUSB0"/></program>
|
||||
<program name="receive"/>
|
||||
<program name="messages"><arg flag="-c" constant="telemetry_ap:*"/><arg flag="-c" constant="ground"/></program>
|
||||
<program name="cockpit"/>
|
||||
<program name="map 2d ml"/>
|
||||
</session>
|
||||
|
||||
<session name="flight microjet multimon sim">
|
||||
<program name="multimon"><arg flag="-p" constant="/tmp/multimon"/></program>
|
||||
<program name="modem"><arg flag="-d" constant="/tmp/multimon"/></program>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</waypoints>
|
||||
<include name="zz" procedure="zigzag.xml" x="120" y="-20" rotate="0">
|
||||
<arg name="alt" value="GROUND_ALT+50"/>
|
||||
<with from="end" to="home"/>
|
||||
<with from="end" to="init"/>
|
||||
</include>
|
||||
<blocks>
|
||||
<block NAME="init">
|
||||
|
||||
@@ -3,40 +3,44 @@
|
||||
<flight_plan NAME="Muret mini" LON0="1.27289" MAX_DIST_FROM_HOME="1000" GROUND_ALT="185" SECURITY_HEIGHT="25" QFU="270" ALT="250" LAT0="43.46223">
|
||||
<rc_control>
|
||||
<mode NAME="AUTO1">
|
||||
<setting VAR="ir_pitch_neutral" RANGE="60." RC="gain_1_up" TYPE="int16"/>
|
||||
<setting VAR="ir_roll_neutral" RANGE="-60." RC="gain_2_up" TYPE="int16"/>
|
||||
<setting VAR="pitch_pgain" RANGE="1000." RC="gain_1_down" TYPE="int16"/>
|
||||
<setting VAR="ir_pitch_neutral" RANGE="0.1" RC="gain_1_up" TYPE="float"/>
|
||||
<setting VAR="ir_roll_neutral" RANGE="-0.1" RC="gain_2_up" TYPE="float"/>
|
||||
<setting VAR="pitch_pgain" RANGE="-1000." RC="gain_1_down" TYPE="int16"/>
|
||||
<setting VAR="roll_pgain" RANGE="-1000." RC="gain_2_down" TYPE="int16"/>
|
||||
</mode>
|
||||
<mode NAME="AUTO2">
|
||||
<setting VAR="pitch_of_roll" RANGE="0.1" RC="gain_1_down" TYPE="float"/>
|
||||
<setting VAR="ir_pitch_neutral" RANGE="0.1" RC="gain_1_up" TYPE="float"/>
|
||||
<setting VAR="ir_roll_neutral" RANGE="-0.1" RC="gain_2_up" TYPE="float"/>
|
||||
<setting VAR="aileron_of_gaz" RANGE="0.1" RC="gain_1_down" TYPE="float"/>
|
||||
<setting VAR="pitch_of_vz" RANGE=".1" RC="gain_2_down" TYPE="float"/>
|
||||
<setting VAR="ir_pitch_neutral" RANGE="60." RC="gain_1_up" TYPE="int16"/>
|
||||
<setting VAR="ir_roll_neutral" RANGE="-60." RC="gain_2_up" TYPE="int16"/>
|
||||
</mode>
|
||||
</rc_control>
|
||||
<waypoints utm_x0="360284.8" utm_y0="4813595.5">
|
||||
<waypoint name="HOME" x="0.0" y="30.0" lat="43.4625000078" lon="1.27288231142" alt="250."/>
|
||||
<waypoint name="HOME" x="0.0" y="120.0" alt="250."/>
|
||||
</waypoints>
|
||||
|
||||
<blocks>
|
||||
<block NAME="home">
|
||||
<exception COND="(RcEvent1())" DEROUTE="c50"/>
|
||||
<circle wp="HOME" alt="GROUND_ALT+50" radius="75"/>
|
||||
<circle wp="HOME" alt="GROUND_ALT+50" radius="-75"/>
|
||||
</block>
|
||||
<block NAME="c50">
|
||||
<exception COND="(RcEvent1())" DEROUTE="c40"/>
|
||||
<exception COND="(RcEvent2())" DEROUTE="home"/>
|
||||
<circle wp="HOME" alt="GROUND_ALT+50" radius="50"/>
|
||||
<circle wp="HOME" alt="GROUND_ALT+50" radius="-50"/>
|
||||
</block>
|
||||
<block NAME="c40">
|
||||
<exception COND="(RcEvent1())" DEROUTE="c30"/>
|
||||
<exception COND="(RcEvent2())" DEROUTE="home"/>
|
||||
<circle wp="HOME" alt="GROUND_ALT+50" radius="40"/>
|
||||
<circle wp="HOME" alt="GROUND_ALT+50" radius="-40"/>
|
||||
</block>
|
||||
<block NAME="c30">
|
||||
<exception COND="(RcEvent1())" DEROUTE="c20"/>
|
||||
<circle wp="HOME" alt="GROUND_ALT+30" radius="-30"/>
|
||||
</block>
|
||||
<block NAME="c20">
|
||||
<exception COND="(RcEvent1())" DEROUTE="home"/>
|
||||
<circle wp="HOME" alt="GROUND_ALT+50" radius="30"/>
|
||||
<circle wp="HOME" alt="GROUND_ALT+25" radius="-20"/>
|
||||
</block>
|
||||
</blocks>
|
||||
</flight_plan>
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
<block NAME="back">
|
||||
<exception COND="(RcEvent1())" DEROUTE="takeoff"/>
|
||||
<exception COND="(RcEvent2())" DEROUTE="target"/>
|
||||
<go wp="LANDING" alt="GROUND_ALT"/>
|
||||
<deroute block="end"/>
|
||||
</block>
|
||||
|
||||
@@ -142,8 +142,6 @@ void estimator_update_state_3DMG( void ) {
|
||||
#else //NO_IMU
|
||||
|
||||
float ir_roll_neutral = RadOfDeg(IR_ROLL_NEUTRAL_DEFAULT);
|
||||
/** Initialized to \a IR_PITCH_NEUTRAL_DEFAULT.
|
||||
* Changed with @@@@@ EST-CE QUE CA CHANGE @@@@@ */
|
||||
float ir_pitch_neutral = RadOfDeg(IR_PITCH_NEUTRAL_DEFAULT);
|
||||
|
||||
void estimator_update_state_infrared( void ) {
|
||||
@@ -193,9 +191,7 @@ void estimator_update_state_infrared( void ) {
|
||||
|
||||
#endif
|
||||
|
||||
float rad_of_ir_roll = rad_of_ir * ir_roll;
|
||||
|
||||
estimator_phi = rad_of_ir * ir_roll -ir_roll_neutral;
|
||||
estimator_phi = rad_of_ir * ir_roll - ir_roll_neutral;
|
||||
|
||||
#if defined IR_RELIEF_CORRECTION
|
||||
|
||||
|
||||
@@ -119,6 +119,11 @@ servo_init( void )
|
||||
* Configure output compare to toggle the output bits.
|
||||
*/
|
||||
TCCR1A |= _BV(SERVO_COM0 );
|
||||
|
||||
#ifdef SERVOS_FALLING_EDGE
|
||||
/** Starts CLOCK high for the falling edge case */
|
||||
TCCR1A |= _BV(SERVO_FORCE);
|
||||
#endif
|
||||
|
||||
/* Clear the interrupt flags in case they are set */
|
||||
TIFR = _BV(SERVO_FLAG);
|
||||
@@ -143,6 +148,33 @@ SIGNAL( SIG_OUTPUT_COMPARE1A )
|
||||
static uint8_t servo = 0;
|
||||
uint16_t width;
|
||||
|
||||
#ifdef SERVOS_FALLING_EDGE
|
||||
#define RESET_WIDTH (CLOCK*1000)
|
||||
#define FIRST_PULSE_WIDTH (CLOCK*100)
|
||||
/** The clock pin has been initialized high and is toggled down by
|
||||
the timer.
|
||||
Unfortunately it seems that reset does not work on 4017 in this case if it
|
||||
occurs after the first falling edge. We add two more states at the end of
|
||||
the sequence:
|
||||
- keeping clock low, reset high during 1ms
|
||||
- clock high (toggled by the timer), reset down, during 100us (looks like
|
||||
the first pulse of a standard RC */
|
||||
if (servo == _4017_NB_CHANNELS) {
|
||||
sbi( _4017_RESET_PORT, _4017_RESET_PIN );
|
||||
/** Start a long 1ms reset, keep clock low */
|
||||
SERVO_OCR += RESET_WIDTH;
|
||||
servo++;
|
||||
return;
|
||||
}
|
||||
if (servo > _4017_NB_CHANNELS) {
|
||||
/** Clear the reset, the clock has been toggled high */
|
||||
cbi( _4017_RESET_PORT, _4017_RESET_PIN );
|
||||
/** Starts a short pulse-like period */
|
||||
SERVO_OCR += FIRST_PULSE_WIDTH;
|
||||
servo=0; /** Starts a new sequence next time */
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (servo >= _4017_NB_CHANNELS) {
|
||||
sbi( _4017_RESET_PORT, _4017_RESET_PIN );
|
||||
servo = 0;
|
||||
@@ -150,7 +182,7 @@ SIGNAL( SIG_OUTPUT_COMPARE1A )
|
||||
// asm( "nop; nop; nop; nop;nop; nop; nop; nop;nop; nop; nop; nop;nop; nop; nop; nop;" );
|
||||
cbi( _4017_RESET_PORT, _4017_RESET_PIN );
|
||||
}
|
||||
|
||||
#endif
|
||||
width = servo_widths[servo];
|
||||
|
||||
SERVO_OCR += width;
|
||||
@@ -160,6 +192,7 @@ SIGNAL( SIG_OUTPUT_COMPARE1A )
|
||||
servo++;
|
||||
}
|
||||
|
||||
|
||||
void servo_set_one(uint8_t servo, uint16_t value_us) {
|
||||
servo_widths[servo] = ChopServo(CLOCK*value_us);
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ let send_wind = fun a ->
|
||||
let vs =
|
||||
["ac_id", Pprz.String id;
|
||||
"dir", Pprz.Float wind_cap_deg;
|
||||
"speed", Pprz.Float wind_polar;
|
||||
"wspeed", Pprz.Float wind_polar;
|
||||
"mean_aspeed", Pprz.Float mean;
|
||||
"stddev", Pprz.Float stddev] in
|
||||
Ground_Pprz.message_send my_id "WIND" vs
|
||||
|
||||
@@ -116,7 +116,8 @@ let parse_section = fun s ->
|
||||
and max = get_float "max" in
|
||||
|
||||
let servos = Xml.children s in
|
||||
define "NB_SERVO" (string_of_int (List.length servos));
|
||||
let nb_servos = List.fold_right (fun s m -> Pervasives.max (int_of_string (ExtXml.attrib s "no")) m) servos min_int in
|
||||
define "LAST_SERVO_CHANNEL" (string_of_int nb_servos);
|
||||
nl ();
|
||||
let servos_params = Array.create nb_servo_4017 { min = min; neutral = neutral; max = max } in
|
||||
|
||||
|
||||
Reference in New Issue
Block a user