1
0
Fork 0

Jean-Yves Lefort :

I have implemented a Honeywell MK VIII EGPWS emulation for FlightGear.
The MK VIII is an Enhanced Ground Proximity Warning System aimed at
regional turboprop and small turbofan aircrafts such as the Citation,
Citation Bravo, B1900D, Beechcraft 99 and L410.

Frederic Bouvier:
make the MSVC compilation possible. Rearrange base package directories.
This commit is contained in:
fredb 2006-03-04 20:21:32 +00:00
parent 479d4d7484
commit acd09b99cb
5 changed files with 6660 additions and 1 deletions

View file

@ -26,7 +26,7 @@ libInstrumentation_a_SOURCES = \
vertical_speed_indicator.cxx vertical_speed_indicator.hxx \
inst_vertical_speed_indicator.cxx inst_vertical_speed_indicator.hxx \
od_gauge.hxx od_gauge.cxx wxradar.hxx wxradar.cxx \
tacan.cxx tacan.hxx \
tacan.cxx tacan.hxx mk_viii.cxx mk_viii.hxx \
dclgps.cxx dclgps.hxx \
render_area_2d.cxx render_area_2d.hxx

View file

@ -43,6 +43,7 @@
#include "od_gauge.hxx"
#include "wxradar.hxx"
#include "tacan.hxx"
#include "mk_viii.hxx"
FGInstrumentMgr::FGInstrumentMgr ()
@ -165,6 +166,9 @@ bool FGInstrumentMgr::build ()
} else if ( name == "tacan" ) {
set_subsystem( "instrument" + temp.str(),
new TACAN( node ) );
} else if ( name == "mk-viii" ) {
set_subsystem( "instrument" + temp.str(),
new MK_VIII( node ) );
} else {
SG_LOG( SG_ALL, SG_ALERT, "Unknown top level section: "
<< name );

5002
src/Instrumentation/mk_viii.cxx Executable file

File diff suppressed because it is too large Load diff

1608
src/Instrumentation/mk_viii.hxx Executable file

File diff suppressed because it is too large Load diff

View file

@ -1353,6 +1353,49 @@ do_save_xml_from_proptree(const SGPropertyNode * node)
return true;
}
static bool
do_press_cockpit_button (const SGPropertyNode *arg)
{
const char *prefix = arg->getStringValue("prefix");
if (arg->getBoolValue("guarded") && fgGetDouble((string(prefix) + "-guard").c_str()) < 1)
return true;
string prop = string(prefix) + "-button";
double value;
if (arg->getBoolValue("latching"))
value = fgGetDouble(prop.c_str()) > 0 ? 0 : 1;
else
value = 1;
fgSetDouble(prop.c_str(), value);
fgSetBool(arg->getStringValue("discrete"), value > 0);
return true;
}
static bool
do_release_cockpit_button (const SGPropertyNode *arg)
{
const char *prefix = arg->getStringValue("prefix");
if (arg->getBoolValue("guarded")) {
string prop = string(prefix) + "-guard";
if (fgGetDouble(prop.c_str()) < 1) {
fgSetDouble(prop.c_str(), 1);
return true;
}
}
if (! arg->getBoolValue("latching")) {
fgSetDouble((string(prefix) + "-button").c_str(), 0);
fgSetBool(arg->getStringValue("discrete"), false);
}
return true;
}
////////////////////////////////////////////////////////////////////////
// Command setup.
@ -1419,6 +1462,8 @@ static struct {
{ "hud-init2", do_hud_init2 },
{ "loadxml", do_load_xml_to_proptree},
{ "savexml", do_save_xml_from_proptree },
{ "press-cockpit-button", do_press_cockpit_button },
{ "release-cockpit-button", do_release_cockpit_button },
{ 0, 0 } // zero-terminated
};