diff --git a/src/Instrumentation/altimeter.cxx b/src/Instrumentation/altimeter.cxx index 5b7e3decc..ceea78ddc 100644 --- a/src/Instrumentation/altimeter.cxx +++ b/src/Instrumentation/altimeter.cxx @@ -46,10 +46,10 @@ static double altitude_data[][2] = { Altimeter::Altimeter ( SGPropertyNode *node ) - : _altitude_table(new SGInterpTable), - name("altimeter"), + : name("altimeter"), num(0), - static_port("/systems/static") + static_port("/systems/static"), + _altitude_table(new SGInterpTable) { int i; for (i = 0; altitude_data[i][0] != -1; i++) diff --git a/src/Instrumentation/encoder.cxx b/src/Instrumentation/encoder.cxx index fa01c40ea..c8677a6d5 100644 --- a/src/Instrumentation/encoder.cxx +++ b/src/Instrumentation/encoder.cxx @@ -62,10 +62,10 @@ int round (double value, int nearest=1) Encoder::Encoder(SGPropertyNode *node) : - altitudeTable(new SGInterpTable), name("encoder"), num(0), - staticPort("/systems/static") + staticPort("/systems/static"), + altitudeTable(new SGInterpTable) { int i; for ( i = 0; altitude_data[i][0] != -1; i++ ) diff --git a/src/Instrumentation/gps.cxx b/src/Instrumentation/gps.cxx index 83dbac7e4..26aad8dcf 100644 --- a/src/Instrumentation/gps.cxx +++ b/src/Instrumentation/gps.cxx @@ -32,7 +32,16 @@ GPS::GPS ( SGPropertyNode *node) _last_longitude_deg(0), _last_latitude_deg(0), _last_altitude_m(0), - _last_speed_kts(0) + _last_speed_kts(0), + _wp0_latitude_deg(0), + _wp0_longitude_deg(0), + _wp0_altitude_m(0), + _wp1_latitude_deg(0), + _wp1_longitude_deg(0), + _wp1_altitude_m(0), + _alt_dist_ratio(0), + _distance_m(0), + _course_deg(0) { int i; for ( i = 0; i < node->nChildren(); ++i ) { @@ -57,7 +66,16 @@ GPS::GPS () _last_longitude_deg(0), _last_latitude_deg(0), _last_altitude_m(0), - _last_speed_kts(0) + _last_speed_kts(0), + _wp0_latitude_deg(0), + _wp0_longitude_deg(0), + _wp0_altitude_m(0), + _wp1_latitude_deg(0), + _wp1_longitude_deg(0), + _wp1_altitude_m(0), + _alt_dist_ratio(0), + _distance_m(0), + _course_deg(0) { } @@ -90,7 +108,7 @@ GPS::init () _wp0_longitude_node = wp0_node->getChild("longitude-deg", 0, true); _wp0_latitude_node = wp0_node->getChild("latitude-deg", 0, true); - _wp0_altitude_node = wp0_node->getChild("altitude-deg", 0, true); + _wp0_altitude_node = wp0_node->getChild("altitude-ft", 0, true); _wp0_ID_node = wp0_node->getChild("ID", 0, true); _wp0_name_node = wp0_node->getChild("name", 0, true); _wp0_course_node = wp0_node->getChild("desired-course-deg", 0, true); @@ -110,7 +128,7 @@ GPS::init () _wp1_longitude_node = wp1_node->getChild("longitude-deg", 0, true); _wp1_latitude_node = wp1_node->getChild("latitude-deg", 0, true); - _wp1_altitude_node = wp1_node->getChild("altitude-deg", 0, true); + _wp1_altitude_node = wp1_node->getChild("altitude-ft", 0, true); _wp1_ID_node = wp1_node->getChild("ID", 0, true); _wp1_name_node = wp1_node->getChild("name", 0, true); _wp1_course_node = wp1_node->getChild("desired-course-deg", 0, true); diff --git a/src/Instrumentation/mag_compass.cxx b/src/Instrumentation/mag_compass.cxx index 1120dce77..d3d15e5c1 100644 --- a/src/Instrumentation/mag_compass.cxx +++ b/src/Instrumentation/mag_compass.cxx @@ -86,7 +86,7 @@ MagCompass::update (double delta_time_sec) // This is the real magnetic // which would be displayed // if the compass had no errors. - double heading_mag_deg = _heading_node->getDoubleValue(); + //double heading_mag_deg = _heading_node->getDoubleValue(); // don't update if the compass @@ -146,7 +146,7 @@ MagCompass::update (double delta_time_sec) */ double x_accel_g = _x_accel_node->getDoubleValue() / 32; double y_accel_g = _y_accel_node->getDoubleValue() / 32; - double z_accel_g = _z_accel_node->getDoubleValue() / 32; + //double z_accel_g = _z_accel_node->getDoubleValue() / 32; theta -= 0.07 * x_accel_g; phi -= 0.07 * y_accel_g;