~ubuntu-branches/debian/sid/flightgear/sid

« back to all changes in this revision

Viewing changes to src/FDM/JSBSim/models/flight_control/FGFCSComponent.cpp

  • Committer: Package Import Robot
  • Author(s): Markus Wanner, Markus Wanner, Rebecca Palmer
  • Date: 2014-01-21 22:31:02 UTC
  • mfrom: (1.3.1) (15.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20140121223102-cjw7g9le25acd119
Tags: 3.0.0~git20140204+c99ea4-1
[ Markus Wanner ]
* Upload to unstable.
* Adjust B-D to allow building on kfreebsd-*. Closes: #724686.
* Add a lintian-overrides on autotools; we use cmake.
* Upstream corrected the fgfs manpage. Closes: #556362.
* Drop unnecessary man page for gl-info. Closes: #698308.
* Drop README.Linux: it's outdated to the point of uselessness.
  Closes: #574173.
* Add an upper limit of libsimgear-dev versions that flightgear can be
  built with. Closes: #738436.
* Drop the libsvn-dev dependency, neither flightgear nor simgear depend
  on libsvn, anymore. Closes: #682947.
* List icons in debian/install rather than copying around from rules.
* Update menu entry for flightgear, add one for fgcom; add .xpm icons.
  Closes: #713924.
* flightgear.desktop: add German translation
* Bump Standards-Version to 3.9.5; no changes needed.

[ Rebecca Palmer ]
* New upstream release.
* Install the icons (based on code by Saikrishna Arcot).  (Not a
  complete fix for LP908153 as it only sets the menu/Dash icon, not the
  running window's icon, but better than nothing).
* Disable screensaver while running. Closes: LP#793599. Add required
  libdbus-1-dev dependency.
* Remove outdated README.Debian.
* Terrasync now works after just ticking the box. Closes: #252899.
* Always set Terrasync directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
namespace JSBSim {
50
50
 
51
 
static const char *IdSrc = "$Id: FGFCSComponent.cpp,v 1.34 2011/09/11 11:36:04 bcoconni Exp $";
 
51
static const char *IdSrc = "$Id: FGFCSComponent.cpp,v 1.37 2013/09/27 19:38:36 jberndt Exp $";
52
52
static const char *IdHdr = ID_FCSCOMPONENT;
53
53
 
54
54
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
57
57
 
58
58
FGFCSComponent::FGFCSComponent(FGFCS* _fcs, Element* element) : fcs(_fcs)
59
59
{
60
 
  Element *input_element, *clip_el;
 
60
  Element *input_element,*init_element, *clip_el;
61
61
  Input = Output = clipmin = clipmax = delay_time = 0.0;
62
62
  treenode = 0;
63
63
  delay = index = 0;
64
64
  ClipMinPropertyNode = ClipMaxPropertyNode = 0;
65
65
  clipMinSign = clipMaxSign = 1.0;
66
66
  IsOutput   = clip = false;
67
 
  string input, clip_string;
 
67
  string input,init, clip_string;
68
68
  dt = fcs->GetDt();
69
69
 
70
70
  PropertyManager = fcs->GetPropertyManager();
106
106
    Type = "GYRO";
107
107
  } else if (element->GetName() == string("actuator")) {
108
108
    Type = "ACTUATOR";
 
109
  } else if (element->GetName() == string("waypoint_heading")) {
 
110
    Type = "WAYPOINT_HEADING";
 
111
  } else if (element->GetName() == string("waypoint_distance")) {
 
112
    Type = "WAYPOINT_DISTANCE";
 
113
  } else if (element->GetName() == string("angle")) {
 
114
    Type = "ANGLE";
 
115
  } else if (element->GetName() == string("distributor")) {
 
116
    Type = "DISTRIBUTOR";
109
117
  } else { // illegal component in this channel
110
118
    Type = "UNKNOWN";
111
119
  }
112
120
 
113
121
  Name = element->GetAttributeValue("name");
114
122
 
 
123
  init_element = element->FindElement("init");
 
124
  while (init_element) {
 
125
    init = init_element->GetDataLine();
 
126
    if (init[0] == '-') {
 
127
      InitSigns.push_back(-1.0);
 
128
      init.erase(0,1);
 
129
    } else {
 
130
      InitSigns.push_back( 1.0);
 
131
    }
 
132
    FGPropertyNode* node = 0L;
 
133
    if (PropertyManager->HasNode(init)) {
 
134
      node = PropertyManager->GetNode(init);
 
135
      InitNodes.push_back(new FGPropertyValue( node ));
 
136
    } else {
 
137
      InitNodes.push_back(new FGPropertyValue( init,
 
138
                                                PropertyManager ));
 
139
    }
 
140
    InitNames.push_back( init );
 
141
 
 
142
    init_element = element->FindNextElement("init");
 
143
  }
 
144
  
115
145
  input_element = element->FindElement("input");
116
146
  while (input_element) {
117
147
    input = input_element->GetDataLine();
121
151
    } else {
122
152
      InputSigns.push_back( 1.0);
123
153
    }
124
 
    FGPropertyManager* node = 0L;
 
154
    FGPropertyNode* node = 0L;
125
155
    if (PropertyManager->HasNode(input)) {
126
156
      node = PropertyManager->GetNode(input);
127
157
      InputNodes.push_back(new FGPropertyValue( node ));
138
168
  while (out_elem) {
139
169
    IsOutput = true;
140
170
    string output_node_name = out_elem->GetDataLine();
141
 
    FGPropertyManager* OutputNode = PropertyManager->GetNode( output_node_name, true );
 
171
    FGPropertyNode* OutputNode = PropertyManager->GetNode( output_node_name, true );
142
172
    OutputNodes.push_back(OutputNode);
143
173
    if (!OutputNode) {
144
174
      cerr << endl << "  Unable to process property: " << output_node_name << endl;