- name("vertical-speed-indicator"),
- num(0),
- static_port("/systems/static")
-{
- int i;
- for ( i = 0; i < node->nChildren(); ++i ) {
- SGPropertyNode *child = node->getChild(i);
- string cname = child->getName();
- string cval = child->getStringValue();
- if ( cname == "name" ) {
- name = cval;
- } else if ( cname == "number" ) {
- num = child->getIntValue();
- } else if ( cname == "static-port" ) {
- static_port = cval;
- } else {
- SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in vertical-speed-indicator config logic" );
- if ( name.length() ) {
- SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << name );
- }
- }
- }
-}
-
-VerticalSpeedIndicator::VerticalSpeedIndicator ()
- : _internal_pressure_inhg(29.92)
+ _name(node->getStringValue("name", "vertical-speed-indicator")),
+ _num(node->getIntValue("number", 0)),
+ _static_pressure(node->getStringValue("static-pressure", "/systems/static/pressure-inhg"))