libCockpit_a_SOURCES = \
cockpit.cxx cockpit.hxx \
- dme.cxx dme.hxx \
hud.cxx hud.hxx hud_opts.hxx \
hud_card.cxx hud_dnst.cxx hud_gaug.cxx hud_inst.cxx \
hud_labl.cxx hud_ladr.cxx \
hud_lat.cxx hud_lon.cxx \
hud_rwy.cxx \
hud_scal.cxx hud_tbi.cxx \
- kt_70.cxx kt_70.hxx \
- marker_beacon.cxx marker_beacon.hxx \
navcom.cxx navcom.hxx \
panel.cxx panel.hxx \
panel_io.cxx panel_io.hxx \
FGRadioStack::~FGRadioStack()
{
//adf.unbind();
- beacon.unbind();
+ //beacon.unbind();
navcom1.unbind();
navcom2.unbind();
- xponder.unbind();
+ //xponder.unbind();
}
navcom2.init();
//adf.init();
- beacon.init();
- xponder.init();
+ //beacon.init();
+ //xponder.init();
search();
update(0); // FIXME: use dt
FGRadioStack::bind ()
{
//adf.bind();
- beacon.bind();
- dme.bind();
+ //beacon.bind();
+ //dme.bind();
navcom1.set_bind_index( 0 );
navcom1.bind();
navcom2.set_bind_index( 1 );
navcom2.bind();
- xponder.bind();
+ //xponder.bind();
}
FGRadioStack::unbind ()
{
//adf.unbind();
- beacon.unbind();
- dme.unbind();
+ //beacon.unbind();
+ //dme.unbind();
navcom1.unbind();
navcom2.unbind();
- xponder.unbind();
+ //xponder.unbind();
}
FGRadioStack::update(double dt)
{
//adf.update( dt );
- beacon.update( dt );
+ //beacon.update( dt );
navcom1.update( dt );
navcom2.update( dt );
- dme.update( dt ); // dme is updated after the navcom's
- xponder.update( dt );
+ //dme.update( dt ); // dme is updated after the navcom's
+ //xponder.update( dt );
}
void FGRadioStack::search()
{
//adf.search();
- beacon.search();
+ //beacon.search();
navcom1.search();
navcom2.search();
- dme.search();
- xponder.search();
+ //dme.search();
+ //xponder.search();
}
#include <Sound/beacon.hxx>
#include <Sound/morse.hxx>
-#include "dme.hxx"
-#include "kt_70.hxx" // Transponder
-#include "marker_beacon.hxx"
+//#include "dme.hxx"
+//#include "kt_70.hxx" // Transponder
+//#include "marker_beacon.hxx"
#include "navcom.hxx"
class FGRadioStack : public SGSubsystem
{
- FGDME dme;
+ //FGDME dme;
//FGKR_87 adf; // King KR 87 Digital ADF model
- FGKT_70 xponder; // Bendix/King KT 70 Panel-Mounted Transponder
- FGMarkerBeacon beacon;
+ //FGKT_70 xponder; // Bendix/King KT 70 Panel-Mounted Transponder
+ //FGMarkerBeacon beacon;
FGNavCom navcom1;
FGNavCom navcom2;
// Update nav/adf radios based on current postition
void search ();
- inline FGDME *get_dme() { return &dme; }
+ //inline FGDME *get_dme() { return &dme; }
inline FGNavCom *get_navcom1() { return &navcom1; }
inline FGNavCom *get_navcom2() { return &navcom2; }
};
gyro.cxx gyro.hxx \
heading_indicator.cxx heading_indicator.hxx \
kr_87.hxx kr_87.cxx \
+ kt_70.cxx kt_70.hxx \
mag_compass.cxx mag_compass.hxx \
+ marker_beacon.cxx marker_beacon.hxx \
+ navradio.cxx navradio.hxx \
slip_skid_ball.cxx slip_skid_ball.hxx \
transponder.cxx transponder.hxx \
turn_indicator.cxx turn_indicator.hxx \
// TODO:
// - better spin-up
+#include <simgear/compiler.h>
+
+#include STL_IOSTREAM
+#include STL_STRING
+#include <sstream>
+
#include <math.h> // fabs()
#include "attitude_indicator.hxx"
void
AttitudeIndicator::bind ()
{
+ std::ostringstream temp;
string branch;
- branch = "/instrumentation/" + name + "/serviceable";
+ temp << num;
+ branch = "/instrumentation/" + name + "[" + temp.str() + "]";
- fgTie(branch.c_str(),
+ fgTie((branch + "/serviceable").c_str(),
&_gyro, &Gyro::is_serviceable, &Gyro::set_serviceable);
- branch = "/instrumentation/" + name + "/spin";
- fgTie(branch.c_str(),
+ fgTie((branch + "/spin").c_str(),
&_gyro, &Gyro::get_spin_norm, &Gyro::set_spin_norm);
}
void
AttitudeIndicator::unbind ()
{
+ std::ostringstream temp;
string branch;
- branch = "/instrumentation/" + name + "/serviceable";
+ temp << num;
+ branch = "/instrumentation/" + name + "[" + temp.str() + "]";
- fgUntie(branch.c_str());
- branch = "/instrumentation/" + name + "/spin";
- fgUntie(branch.c_str());
+ fgUntie((branch + "/serviceable").c_str());
+ fgUntie((branch + "/spin").c_str());
}
void
//
// This file is in the Public Domain and comes with no warranty.
+#include <simgear/compiler.h>
+#include STL_IOSTREAM
+#include STL_STRING
+#include <sstream>
+
#include "heading_indicator.hxx"
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
void
HeadingIndicator::bind ()
{
+ std::ostringstream temp;
string branch;
- branch = "/instrumentation/" + name + "/serviceable";
- fgTie(branch.c_str(),
+ temp << num;
+ branch = "/instrumentation/" + name + "[" + temp.str() + "]";
+
+ fgTie((branch + "/serviceable").c_str(),
&_gyro, &Gyro::is_serviceable, &Gyro::set_serviceable);
- branch = "/instrumentation/" + name + "/spin";
- fgTie(branch.c_str(),
+ fgTie((branch + "/spin").c_str(),
&_gyro, &Gyro::get_spin_norm, &Gyro::set_spin_norm);
}
void
HeadingIndicator::unbind ()
{
+ std::ostringstream temp;
string branch;
- branch = "/instrumentation/" + name + "/serviceable";
- fgUntie(branch.c_str());
- branch = "/instrumentation/" + name + "/spin";
- fgUntie(branch.c_str());
+ temp << num;
+ branch = "/instrumentation/" + name + "[" + temp.str() + "]";
+
+ fgUntie((branch + "/serviceable").c_str());
+ fgUntie((branch + "/spin").c_str());
}
void
#include "gps.hxx"
#include "heading_indicator.hxx"
#include "kr_87.hxx"
+#include "kt_70.hxx"
#include "mag_compass.hxx"
+#include "marker_beacon.hxx"
+#include "navradio.hxx"
#include "slip_skid_ball.hxx"
#include "transponder.hxx"
#include "turn_indicator.hxx"
} else if ( name == "encoder" ) {
set_subsystem( "instrument" + temp.str(),
new Encoder( node ) );
+ } else if ( name == "gps" ) {
+ set_subsystem( "instrument" + temp.str(),
+ new GPS( node ), 0.45 );
} else if ( name == "heading-indicator" ) {
set_subsystem( "instrument" + temp.str(),
new HeadingIndicator( node ) );
} else if ( name == "KR-87" ) {
set_subsystem( "instrument" + temp.str(),
new FGKR_87( node ) );
+ } else if ( name == "KT-70" ) {
+ set_subsystem( "instrument" + temp.str(),
+ new FGKT_70( node ) );
} else if ( name == "magnetic-compass" ) {
set_subsystem( "instrument" + temp.str(),
new MagCompass( node ) );
+ } else if ( name == "marker-beacon" ) {
+ set_subsystem( "instrument" + temp.str(),
+ new FGMarkerBeacon( node ) );
+ } else if ( name == "nav-radio" ) {
+ set_subsystem( "instrument" + temp.str(),
+ new FGNavRadio( node ) );
} else if ( name == "slip-skid-ball" ) {
set_subsystem( "instrument" + temp.str(),
new SlipSkidBall( node ) );
} else if ( name == "vertical-speed-indicator" ) {
set_subsystem( "instrument" + temp.str(),
new VerticalSpeedIndicator( node ) );
- } else if ( name == "gps" ) {
- set_subsystem( "instrument" + temp.str(),
- new GPS( node ), 0.45 );
} else {
SG_LOG( SG_ALL, SG_ALERT, "Unknown top level section: "
<< name );
//
// This file is in the Public Domain and comes with no warranty.
+#include <simgear/compiler.h>
+#include STL_IOSTREAM
+#include STL_STRING
+#include <sstream>
+
#include "turn_indicator.hxx"
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
void
TurnIndicator::bind ()
{
+ std::ostringstream temp;
string branch;
- branch = "/instrumentation/" + name + "/serviceable";
- fgTie(branch.c_str(),
+ temp << num;
+ branch = "/instrumentation/" + name + "[" + temp.str() + "]";
+
+ fgTie((branch + "/serviceable").c_str(),
&_gyro, &Gyro::is_serviceable, &Gyro::set_serviceable);
- branch = "/instrumentation/" + name + "/spin";
- fgTie(branch.c_str(),
+ fgTie((branch + "/spin").c_str(),
&_gyro, &Gyro::get_spin_norm, &Gyro::set_spin_norm);
}
void
TurnIndicator::unbind ()
{
+ std::ostringstream temp;
string branch;
- branch = "/instrumentation/" + name + "/serviceable";
- fgUntie(branch.c_str());
- branch = "/instrumentation/" + name + "/spin";
- fgUntie(branch.c_str());
+ temp << num;
+ branch = "/instrumentation/" + name + "[" + temp.str() + "]";
+
+ fgUntie((branch + "/serviceable").c_str());
+ fgUntie((branch + "/serviceable").c_str());
}
void