// Constructor
FGNavRadio::FGNavRadio(SGPropertyNode *node) :
+ term_tbl(NULL),
+ low_tbl(NULL),
+ high_tbl(NULL),
lon_node(fgGetNode("/position/longitude-deg", true)),
lat_node(fgGetNode("/position/latitude-deg", true)),
alt_node(fgGetNode("/position/altitude-ft", true)),
+ _operable(false),
play_count(0),
last_time(0),
target_radial(0.0),
+ effective_range(0.0),
+ target_gs(0.0),
+ twist(0.0),
horiz_vel(0.0),
last_x(0.0),
last_loc_dist(0.0),
_name(node->getStringValue("name", "nav")),
_num(node->getIntValue("number", 0)),
_time_before_search_sec(-1.0),
+ _gsCart(SGVec3d::zeros()),
+ _gsAxis(SGVec3d::zeros()),
+ _gsVertical(SGVec3d::zeros()),
+ _dmeInRange(false),
+ _toFlag(false),
+ _fromFlag(false),
+ _cdiDeflection(0.0),
+ _cdiCrossTrackErrorM(0.0),
+ _gsNeedleDeflection(0.0),
+ _gsNeedleDeflectionNorm(0.0),
_sgr(NULL)
{
SGPath path( globals->get_fg_root() );
term_tbl = new SGInterpTable( term.str() );
low_tbl = new SGInterpTable( low.str() );
high_tbl = new SGInterpTable( high.str() );
-
-
+
string branch("/instrumentation/" + _name);
_radio_node = fgGetNode(branch.c_str(), _num, true);
}
double crs12 = SGGeodesy::courseRad(a, b),
crs21 = SGGeodesy::courseRad(b, a);
- double degCrs12 = crs12 * SG_RADIANS_TO_DEGREES;
- double degCrs21 = crs21 * SG_RADIANS_TO_DEGREES;
+ //double degCrs12 = crs12 * SG_RADIANS_TO_DEGREES;
+ //double degCrs21 = crs21 * SG_RADIANS_TO_DEGREES;
/*
if (sin(diffLon) < 0.0) {
{
public:
BasicWayptCtl(RNAV* aRNAV, const WayptRef& aWpt) :
- WayptController(aRNAV, aWpt)
+ WayptController(aRNAV, aWpt),
+ _distanceM(0.0),
+ _courseDev(0.0)
{
if (aWpt->flag(WPT_DYNAMIC)) {
throw sg_exception("BasicWayptCtrl doesn't work with dynamic waypoints");
{
public:
RunwayCtl(RNAV* aRNAV, const WayptRef& aWpt) :
- WayptController(aRNAV, aWpt)
+ WayptController(aRNAV, aWpt),
+ _runway(NULL),
+ _distanceM(0.0),
+ _courseDev(0.0)
{
}
{
public:
InterceptCtl(RNAV* aRNAV, const WayptRef& aWpt) :
- WayptController(aRNAV, aWpt)
-
+ WayptController(aRNAV, aWpt),
+ _trueRadial(0.0)
{
if (_waypt->type() != "radialIntercept") {
throw sg_exception("invalid waypoint type", "InterceptCtl ctor");
{
public:
DMEInterceptCtl(RNAV* aRNAV, const WayptRef& aWpt) :
- WayptController(aRNAV, aWpt)
-
+ WayptController(aRNAV, aWpt),
+ _dme(NULL),
+ _distanceNm(0.0)
{
if (_waypt->type() != "dmeIntercept") {
throw sg_exception("invalid waypoint type", "DMEInterceptCtl ctor");
DirectToController::DirectToController(RNAV* aRNAV, const WayptRef& aWpt, const SGGeod& aOrigin) :
WayptController(aRNAV, aWpt),
- _origin(aOrigin)
+ _origin(aOrigin),
+ _distanceM(0.0),
+ _courseDev(0.0)
{
}
///////////////////////////////////////////////////////////////////////////////
OBSController::OBSController(RNAV* aRNAV, const WayptRef& aWpt) :
- WayptController(aRNAV, aWpt)
+ WayptController(aRNAV, aWpt),
+ _distanceM(0.0),
+ _courseDev(0.0)
{
}