void runway_instr::drawArrow() {
Point3D ac,rwy;
+ memset(&ac,0,sizeof(ac));
+ memset(&rwy,0,sizeof(rwy));
ac.setlat(current_aircraft.fdm_state->get_Latitude_deg());
ac.setlon(current_aircraft.fdm_state->get_Longitude_deg());
rwy.setlat(runway._lat);
sgScaleVec3(fTotal, gravity_vector, mTotal);
- sgAddVec3(fTotal, fLift);
- sgAddVec3(fTotal, fFriction);
+ //sgAddVec3(fTotal, fLift); //FIXME: uninitialized fLift
+ //sgAddVec3(fTotal, fFriction); //FIXME: uninitialized fFriction
//claculate acceleration: a = F / m
sgVec3 aTotal, vTotal, dTotal;
#include <simgear/sg_inlines.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/math/point3d.hxx>
+#include <simgear/math/polar3d.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/math/vector.hxx>
#include <simgear/timing/timestamp.hxx>
int this_hit = -1;
int max_hit = -1;
- Point3D geoc;
double hit_elev = -9999;
double max_elev = -9999;
Point3D sc(scenery_center[0], scenery_center[1], scenery_center[2]) ;
if ( hit_elev > -9000 ) {
*terrain_elev = hit_elev;
- *radius = geoc.radius();
+ *radius = sgCartToPolar3d(sc + hit_list->get_point(this_hit)).radius();
sgVec3 tmp;
sgSetVec3(tmp, hit_list->get_normal(this_hit));
// cout << "cur_normal: " << tmp[0] << " " << tmp[1] << " " << tmp[2] << endl;
int this_hit = -1;
int max_hit = -1;
- Point3D geoc;
double hit_elev = -9999;
double max_elev = -9999;
Point3D sc(scenery_center[0], scenery_center[1], scenery_center[2]) ;
max_hit = i;
}
}
+
if ( this_hit < 0 ) {
// no hits below us, take the max hit
if ( hit_elev > -9000 ) {
*terrain_elev = hit_elev;
- *radius = geoc.radius();
+ *radius = sgCartToPolar3d(sc + hit_list->get_point(this_hit)).radius();
+
sgVec3 tmp;
sgSetVec3(tmp, hit_list->get_normal(this_hit));
// cout << "cur_normal: " << tmp[0] << " " << tmp[1] << " " << tmp[2] << endl;