paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Spektrum in Fixed Wings


From: Todd Sandercock
Subject: Re: [Paparazzi-devel] Spektrum in Fixed Wings
Date: Wed, 1 Dec 2010 18:28:15 -0800 (PST)

Xmega16 would have been good with it's 5 USART's.....


From: Adam Spence <address@hidden>
To: address@hidden
Sent: Thu, 2 December, 2010 10:56:16 AM
Subject: Re: [Paparazzi-devel] Spektrum in Fixed Wings

No worries,
 
I ended up compiling from the command line and finding the issue with the radio channels. Thank you for the replies.
 
Yeah I saw the issue with the RadioControlEventImp but looking through the list files couldn't work out how it even resolved this!
 
I'm actually using an external UART to SPI convertor so it's coming in via the SPI port on the tiny... I wonder after all the effort and headache if it wouldn't have been easier to buy a PPM encoder... ah well :)

On 1 December 2010 09:03, Felix Ruess <address@hidden> wrote:
Hi,

that was a wrong define of the number of radio channels in the default
spektrum file.
I also changed the makefile to define RADIO_CONTROL_SPEKTRUM_MODEL_H
not only for booz boards but for all lpc21 targets.
Now there is still an issue with the RadioControlEventImp makro,
probably include order problem.

But as Eric said the code for the stm32 works just fine, the code for
the lpc21 still has a bug though. They have different parsers, that is
also why the parser still lives in the arch files).
There are some ISRs that need to be implemented for the lpc21 as well,
then we can use the better parser that is currently used for the stm32
(e.g. lisa) for the lpc21 as well (and move it out of the arch files).
This was not a priority so far since there is no free UART on the lpc anyway.

Cheers, Felix

On Wed, Dec 1, 2010 at 8:01 AM, Christophe De Wagter <address@hidden> wrote:
> can you do a command prompt compile in your paparazzi directory to get the
> full error:
> make AIRCRAFT=Microjet clean_ac ap.compile
> or even
> make AIRCRAFT=Microjet clean_ac ap.compile Q=''
> to see more compile information.
>
> -Christophe
>
>
>
> On Wed, Dec 1, 2010 at 2:48 AM, Adam Spence <address@hidden> wrote:
>>
>> Hey guys,
>>
>> I've just switched over to using module and was happy to see that it was
>> easier to switch between ppm and spektrum for the radio_type. Unfortunately
>> I've tried spektrum in a non booz build and it would appear this is still
>> very much set up for booz.
>>
>> In order to proceed with the build I modified the
>> radio_control_spektrum.makefile to remove the check for booz and always
>> include the line: ap.CFLAGS +=
>> -DRADIO_CONTROL_SPEKTRUM_MODEL_H=$(RADIO_CONTROL_SPEKTRUM_MODEL)
>>
>> This results in the following build:
>>
>>
>> Run 'make -C /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software
>> -f Makefile.ac AIRCRAFT=Microjet clean_ac '
>> make: Entering directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software'
>> Microjet
>> rm -fr
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet
>> make: Leaving directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software'
>> Run 'make -C /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software
>> -f Makefile.ac AIRCRAFT=Microjet ap.compile '
>> make: Entering directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software'
>> Microjet
>> BUILD Microjet, TARGET ap
>> make[1]: Entering directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software'
>> BUILD
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/airframe.h
>> ##################################################
>>  AIRFRAME MODEL: Microjet
>> ##################################################
>> BUILD
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/modules.h
>> BUILD
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/settings.h
>> BUILD
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/tuning.h
>> BUILD
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/periodic.h
>> make[1]: Leaving directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software'
>> make[1]: Entering directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software'
>> BUILD
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/radio.h
>> ##################################################
>>  RADIO MODEL: cockpitMM
>> ##################################################
>> make[1]: Leaving directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software'
>> make[1]: Entering directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software'
>> BUILD
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/flight_plan.h
>> ##################################################
>>  FLIGHT PLAN: Basic
>> ##################################################
>> Warning: low altitude (0<0+25) in <waypoint NAME="TD" Y="57.0" X="28.8"
>> ALT="0.0"/>
>> BUILD
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/flight_plan.xml
>> make[1]: Leaving directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software'
>> cd sw/airborne; make
>> PAPARAZZI_SRC=/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software
>> PAPARAZZI_HOME=/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software
>> TARGET=ap all
>> make[1]: Entering directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/sw/airborne'
>> DEPEND
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/ap/.depend
>> make[1]: Leaving directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/sw/airborne'
>> make[1]: Entering directory
>> `/media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/sw/airborne'
>> AS
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/ap/crt0.o
>> CC
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/ap/sys_time.o
>> CC
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/var/Microjet/ap/./inter_mcu.o
>> In file included from ./subsystems/radio_control/spektrum.h:31,
>>                  from subsystems/radio_control.h:35,
>>                  from inter_mcu.h:44,
>>                  from inter_mcu.c:25:
>> /media/B836-EC76/Documents/Personal/RC/ppz/paparazzi-software/s
>>
>> The output appears to be truncated and I can't see a sensible error.
>>
>> The airframe file I am using is as follows:
>>
>>
>> <!DOCTYPE airframe SYSTEM "airframe.dtd">
>>
>> <!-- EasyGlider Multiplex (http://www.multiplex-rc.de/)
>>      Tiny 2.1 board (http://paparazzi.enac.fr/wiki/index.php/Tiny_v2)
>>      Tilted infrared sensor
>> (http://paparazzi.enac.fr/wiki/index.php/Image:Tiny_v2_1_Funjet.jpg)
>>      XBee modem
>> (http://paparazzi.enac.fr/wiki/index.php/Modems#Maxstream_XBee_Pro) in
>> transparent mode.
>> -->
>>
>> <airframe name="EasyGlider Tiny 2.1">
>> <!-- commands section -->
>>   <servos>
>>
>>     <servo name="AILERON_RIGHT" no="0" min="1000" neutral="1500"
>> max="2000"/>
>>     <servo name="ELEVATOR"      no="2" min="2000" neutral="1500"
>> max="1000"/>
>>     <servo name="THROTTLE"      no="3" min="1000" neutral="1000"
>> max="2000"/>
>>     <servo name="RUDDER"        no="7" min="1000" neutral="1500"
>> max="2000"/>
>>     <servo name="AILERON_LEFT"  no="4" 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"/>
>>   </commands>
>>
>>   <rc_commands>
>>     <set command="ROLL"      value="@ROLL"/>
>>     <set command="PITCH"     value="@PITCH"/>
>>     <set command="THROTTLE"  value="@THROTTLE"/>
>>     <set command="YAW"       value="@YAW"/>
>>   </rc_commands>
>>
>>   <section name="MIXER">
>>      <define name="AILERON_DIFF" value="0.66"/>
>>      <define name="COMBI_SWITCH" value="0.5"/>
>>   </section>
>>
>>   <command_laws>
>>     <set servo="THROTTLE"    value="@THROTTLE"/>
>>     <set servo="ELEVATOR"    value="@PITCH"/>
>>     <set servo="RUDDER"      value="@YAW + @ROLL*COMBI_SWITCH"/>
>>
>>     <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"/>
>>   </command_laws>
>>
>>
>>   <section name="AUTO1" prefix="AUTO1_">
>>     <define name="MAX_ROLL" value="0.80"/>
>>     <define name="MAX_PITCH" value="0.80"/>
>>   </section>
>>
>>   <section name="adc" prefix="ADC_CHANNEL_">
>>     <define name="IR1" value="ADC_1"/>
>>     <define name="IR2" value="ADC_2"/>
>>     <define name="IR_TOP" value="ADC_0"/>
>>     <define name="IR_NB_SAMPLES" value="16"/>
>>
>> <!--
>>   <define name="GYRO_ROLL" value="ADC_3"/>
>>     <define name="GYRO_NB_SAMPLES" value="16"/>
>> -->
>>   </section>
>>
>>   <section name="INFRARED" prefix="IR_">
>>     <define name="ADC_IR1_NEUTRAL" value="514"/>
>>     <define name="ADC_IR2_NEUTRAL" value="513"/>
>>     <define name="ADC_TOP_NEUTRAL" value="516"/>
>>
>>     <define name="LATERAL_CORRECTION" value="1."/>
>>     <define name="LONGITUDINAL_CORRECTION" value="1."/>
>>     <define name="VERTICAL_CORRECTION" value="1."/>
>> <!--
>>     <define name="HORIZ_SENSOR_TILTED" value="1"/>
>> -->
>>     <define name="HORIZ_SENSOR_ALIGNED" value="1"/>
>>     <define name="IR2_SIGN" value="1"/>
>>     <define name="TOP_SIGN" value="1"/>
>>
>>     <define name="ROLL_NEUTRAL_DEFAULT" value="-3" unit="deg"/>
>>     <define name="PITCH_NEUTRAL_DEFAULT" value="3" unit="deg"/>
>>
>>     <define name="CORRECTION_UP" value="1."/>
>>     <define name="CORRECTION_DOWN" value="1."/>
>>     <define name="CORRECTION_LEFT" value="1."/>
>>     <define name="CORRECTION_RIGHT" value="1."/>
>>   </section>
>>
>> <!--
>> <section name="GYRO" prefix="GYRO_">
>>     <define name="ADC_ROLL_NEUTRAL" value="520"/>
>>     <define name="ADC_TEMP_NEUTRAL" value="476"/>
>>     <define name="ADC_TEMP_SLOPE" value="0"/>
>>     <define name="DYNAMIC_RANGE" value="300" unit="deg/s"/>
>>     <define name="ADXRS300_RESISTOR_BRIDGE" value="(3.3/(3.3+1.8))"/>
>>     <define name="ADXRS300_SENSITIVITY" value="5" unit="mV/(deg/s)"/>
>>     <define name="ROLL_SCALE"
>> value="3.3*1000./1024./(GYRO_ADXRS300_SENSITIVITY*GYRO_ADXRS300_RESISTOR_BRIDGE)"
>> unit="deg/s/adc_unit"/>
>>     <define name="ROLL_DIRECTION" value="-1."/>
>>   </section>
>> -->
>>
>>   <section name="BAT">
>>     <define name="MILLIAMP_AT_FULL_THROTTLE" value="15000" unit="mA"/>
>>     <define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
>>   </section>
>>
>>   <section name="MISC">
>>     <define name="NOMINAL_AIRSPEED" value="10." unit="m/s"/>
>>     <define name="CARROT" value="3." unit="s"/>
>>     <define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
>>     <define name="CONTROL_RATE" value="60" unit="Hz"/>
>> <!--
>>     <define name="XBEE_INIT" value="\"ATPL2\rATRN1\rATTT80\r\""/>
>> -->
>>     <define name="NO_XBEE_API_INIT" value="TRUE"/>
>>     <define name="ALT_KALMAN_ENABLED" value="TRUE"/>
>>
>>     <define name="TRIGGER_DELAY" value="1."/>
>>     <define name="DEFAULT_CIRCLE_RADIUS" value="50."/>
>>     <define name="MIN_CIRCLE_RADIUS" value="50."/>
>>   </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.04"/>
>>     <!-- outer loop saturation -->
>>     <define name="ALTITUDE_MAX_CLIMB" value="2."/>
>>
>>     <!-- auto throttle inner loop -->
>>     <define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.5"/>
>>     <define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.35"/>
>>     <define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.80"/>
>>     <define name="AUTO_THROTTLE_LOITER_TRIM" value="1500"/>
>>     <define name="AUTO_THROTTLE_DASH_TRIM" value="-1000"/>
>>     <define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.1"
>> unit="%/(m/s)"/>
>>     <define name="AUTO_THROTTLE_PGAIN" value="-0.02"/>
>>     <define name="AUTO_THROTTLE_IGAIN" value="0.1"/>
>>     <define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.5"/>
>>
>>     <!-- auto pitch inner loop -->
>>     <define name="AUTO_PITCH_PGAIN" value="-0.05"/>
>>     <define name="AUTO_PITCH_IGAIN" value="0.075"/>
>>     <define name="AUTO_PITCH_MAX_PITCH" value="0.35"/>
>>     <define name="AUTO_PITCH_MIN_PITCH" value="-0.35"/>
>>
>>    <define name="THROTTLE_SLEW" value="0.5"/>
>>
>>   </section>
>>
>>   <section name="HORIZONTAL CONTROL" prefix="H_CTL_">
>>     <define name="COURSE_PGAIN" value="-0.8"/>
>>
>>     <define name="ROLL_MAX_SETPOINT" value="0.6" unit="radians"/>
>>     <define name="PITCH_MAX_SETPOINT" value="0.5" unit="radians"/>
>>     <define name="PITCH_MIN_SETPOINT" value="-0.5" unit="radians"/>
>>
>>     <define name="PITCH_PGAIN" value="-10000."/>
>>     <define name="PITCH_DGAIN" value="1.5"/>
>>
>>     <define name="ELEVATOR_OF_ROLL" value="2500"/>
>>
>>     <define name="ROLL_ATTITUDE_GAIN" value="-7500"/>
>>     <define name="ROLL_RATE_GAIN" 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="15"/><!-- Altitude Error to Initiate
>> Aggressive Climb CANNOT BE ZERO!!-->
>>     <define name="BLEND_END" value="10"/><!-- Altitude Error to Blend
>> Aggressive to Regular Climb Modes  CANNOT BE ZERO!!-->
>>     <define name="CLIMB_THROTTLE" value="0.8"/><!-- Gaz for Aggressive
>> Climb -->
>>     <define name="CLIMB_PITCH" value="0.3"/><!-- Pitch for Aggressive
>> Climb -->
>>     <define name="DESCENT_THROTTLE" value="0.1"/><!-- Gaz for Aggressive
>> Decent -->
>>     <define name="DESCENT_PITCH" value="-0.15"/><!-- 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="GYRO_GAINS">
>>     <define name="GYRO_MAX_RATE" value="200."/>
>>     <define name="ROLLRATESUM_NB_SAMPLES" value="64"/>
>>     <define name="ALT_ROLL__PGAIN" value="1.0"/>
>>     <define name="ROLL_RATE_PGAIN" value="1000.0"/>
>>     <define name="ROLL_RATE_IGAIN" value="0.0"/>
>>     <define name="ROLL_RATE_DGAIN" value="0.0"/>
>>   </section>
>> -->
>>
>>   <section name="FAILSAFE" prefix="FAILSAFE_">
>>  <define name="DELAY_WITHOUT_GPS" value="1" unit="s"/>
>>      <define name="DEFAULT_THROTTLE" value="0.3" unit="%"/>
>>      <define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
>>      <define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
>>  <define name="HOME_RADIUS" value="70" unit="m"/>
>> </section>
>>
>>  <section name="DATALINK" prefix="DATALINK_">
>>     <define name="DEVICE_TYPE" value="XBEE"/>
>>     <define name="DEVICE_ADDRESS" value="...."/>
>>   </section>
>>
>>  <section name="SIMU">
>>     <define name="YAW_RESPONSE_FACTOR" value="0.5"/>
>>  </section>
>>
>>   <firmware name="fixedwing">
>>     <target name="sim"    board="pc"/>
>>     <target name="ap"    board="tiny_2.11">
>>       <define name="AGR_CLIMB" />
>>       <define name="LOITER_TRIM" />
>>       <define name="ALT_KALMAN" />
>>     </target>
>>     <subsystem name="radio_control"  type="spektrum"/>
>>     <!-- Communication -->
>>     <subsystem name="telemetry"  type="transparent">
>>       <param name="MODEM_BAUD"   value="B9600"/>
>>     </subsystem>
>>     <!-- Actuators are automatically chosen according to the board-->
>>     <subsystem name="control"/>
>>     <!-- Sensors -->
>>     <subsystem name="attitude"   type="infrared"/>
>>     <subsystem name="gps"   type="ublox_lea4p"/>
>>     <subsystem name="navigation"        type="extra"/><!--this includes
>> OSAMNav, nav, discsurvey and nav_cube as well-->
>>   </firmware>
>>   <!-- Carefull: add the location after!! -->
>>   <makefile location="after">
>>     # specific stuff that only you are needing... be aware that files
>> might move, so USE the firmware-source variable
>>   </makefile>
>> </airframe>
>>
>> This compiles if I change the <subsystem name="radio_control"
>>  type="spektrum"/> to <subsystem name="radio_control"  type="ppm"/> but not
>> when set to spektrum.
>>
>> I'm trying to get over this stumbling block before I move onto enabling
>> the SPI (I'm using an external SPI to UART convertor). Any help or advice
>> would be greatly appreciated.
>>
>> Cheers,
>>
>> Adam
>> _______________________________________________
>> Paparazzi-devel mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>>
>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>
>

_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel


 
reply via email to

[Prev in Thread] Current Thread [Next in Thread]