paparazzi-devel
[Top][All Lists]
Advanced

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

[Paparazzi-devel] conf.xml specs


From: David Pérez-Piñar López
Subject: [Paparazzi-devel] conf.xml specs
Date: Mon, 31 Dec 2007 10:11:45 +0100

Hi all,
 
I've been studying the Paparazzi airborne source code and configuration files for the last few days, and I think I have got a basic understanding of it. However, several aspects remain somewhat hidden to me.
 
Specifically, I would like to ask about the airframe configuration file, which is used with other xml files (if I have understood the source code correctly) to generate macros and definitions for the full airborne code compilation. In the Paparazzi source code I got from the repository there is one particular example that seems full of xml sections. The file name is twinstarmm.xml. Don't know if there is more than what can be found in this file, but anyway several sections have no reference in the wiki pages.
 
I copy the beginning of that file at the end of this message to make it easier to discuss.
 
My questions are about two specific sections: rc_commands and the section named MIXER:
 
1. The rc_commands section, although not documented in the wiki, seems to specify what commands are available to the RC (manual) vehicle interface. Does this mean that the commands issued to the servos are different depending on the flight control mode (manual or auto)? If so, what section is discarded when in RC manual mode? From the file contents only, it seems that rc_commands substitutes commands_laws, but it could also be another intermediate interface layer to map the RC controls received through the PPM signal to the command_laws. Can anyone give me a general idea of the structure of commands and servos taking into account the rc_commands section?
 
2. The MIXER section seems kind of a constants definition section. Does it have any other meaning for the compiled airborne code? I mean, is this airframe definition just the same if we write the two constants (AILERON_DIFF and COMBI_SWITCH) just as numbers inside the command_laws section, and we discard the MIXER section? For example, <set servo="AILERON_LEFT" value="($roll > 0 ? 1 : 0.66) * $roll"/> instead of <set servo="AILERON_LEFT" value="($roll > 0 ? 1 : AILERON_DIFF) * $roll"/>.
 
3. In general, can anyone give a brief summary of sections that can be defined in the airframe configuration file? Another solution to this problem (what can be configured through this file) is: where is the source code that extracts info from this file? I am not able to find it. And, by the way, what's the difference between generic sections (those beginning with the xml tag 'section' and defined by a 'name') and sections with specific tags (commands, servos, etc)? What sections are mandatory, if any? What code is generated for sections which don't appear in the airframe xml file?
 
This is the airframe file contents (just the first sections) I'm speking about:
 
<airframe name="TwinStarmm">
 
  <servos>
    <servo name="THROTTLE"      no="0" min="1000" neutral="1000" max="2000"/>
    <servo name="AILERON_RIGHT" no="1" min="2000" neutral="1610" max="1200"/>
    <servo name="ELEVATOR"      no="2" min="1750" neutral="1530" max="1250"/>
    <servo name="RUDDER"        no="3" min="1150" neutral="1430" max="1710"/>
    <servo name="AILERON_LEFT"  no="4" min="1900" neutral="1480" max="1050"/>
    <servo name="FWHEEL"        no="5" min="1900" neutral="1470" max="1100"/>
    <servo name="LIGHT"         no="6" min="1000" neutral="1500" max="2000"/>
    <servo name="CAM_ROLL"      no="7" min="1000" neutral="1500" max="2000"/>
    <servo name="CAM_PITCH"     no="8" 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_ROLL"  failsafe_value="0"/>
    <axis name="CAM_PITCH" 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"/>
  </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"/>
    <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 + @ROLL*COMBI_SWITCH"/>
    <set servo="FWHEEL" value="@YAW"/>
    <set servo="CAM_ROLL" value="@CAM_ROLL"/>
    <set servo="CAM_PITCH" value="@CAM_PITCH"/>
  </command_laws>
 
[...]
 
 
Thanks a lot in advance. Have a happy new year!
 
    David
 
--
David Pérez-Piñar López
Grupo de Tecnología de la Señal
Universidad de Vigo

reply via email to

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