uninitialized or unused variables, init sequence, ...
props( NULL ),
model_removed( fgGetNode("/ai/models/model-removed", true) ),
manager( NULL ),
- fp( NULL ),
_installed(false),
+ fp( NULL ),
_impact_lat(0),
_impact_lon(0),
_impact_elev(0),
void FGAIWingman::Join(double dt) {
double range, bearing, az2;
- double parent_hdg, parent_spd, parent_ht= 0;
+ double parent_hdg, parent_spd = 0;
double p_hdg, p_pch, p_rll = 0;
setTgtOffsets(dt, 25);
double rel_brg = calcRelBearingDeg(bearing, hdg);
double recip_brg = calcRecipBearingDeg(bearing);
double angle = calcAngle(distance,_offsetpos, pos);
- double approx_angle = atan2(daltM, range);
+ //double approx_angle = atan2(daltM, range);
double frm_spd = 50; // formation speed
double join_rnge = 1000.0;
double recip_parent_hdg = calcRecipBearingDeg(parent_hdg);
float b = ground[3] - Math::dot3(tmp, ground)+BumpAltitude;
// Calculate the point of ground _contact.
- _frac = a/(a-b);
- if(b < 0) _frac = 1;
+ if(b < 0)
+ _frac = 1;
+ else
+ _frac = a/(a-b);
for(i=0; i<3; i++)
_contact[i] = _pos[i] + _frac*_cmpr[i];
float b;
b=_rotor->getBalance();
float s =Math::sin(_phi+_direction);
- float c =Math::cos(_phi+_direction);
+ //float c =Math::cos(_phi+_direction);
if (s>0)
_balance=(b>0)?(1.-s*(1.-b)):(1.-s)*(1.+b);
else
float dirblade[3];
Math::cross3(_normal,_directionofcentripetalforce,dirblade);
- float vblade=Math::abs(Math::dot3(dirblade,v));
+ //float vblade=Math::abs(Math::dot3(dirblade,v));
alpha=_alphaalt+(alpha-_alphaalt)*factor;
_alpha=alpha;
Col 107-111 MSA center fix. We can ignore this.
*/
void DCLGPS::LoadApproachData() {
- FGNPIAP* iap;
+ FGNPIAP* iap = NULL;
GPSWaypoint* wp;
GPSFlightPlan* fp;
const GPSWaypoint* cwp;
double yaw_rate = _yaw_rate_node->getDoubleValue();
double error = _error_node->getDoubleValue();
double g = _g_node->getDoubleValue();
- int sign = 0;
if ( fabs ( yaw_rate ) > 5 ) {
error += 0.033 * -yaw_rate * dt ;
case RESTRICT_NONE:
assert(false);
break;
+ case SPEED_RESTRICT_MACH:
+ assert(false);
+ break;
}
}
/* double *lat; (return) latitude */
/* double *lon; (return) longitude */
- double alpha, delta;
double tmp;
SGPropertyNode* sun = fgGetNode("/ephemeris/sun");
assert(sun);
double xs = sun->getDoubleValue("xs");
- double ys = sun->getDoubleValue("ys");
+ //double ys = sun->getDoubleValue("ys");
double ye = sun->getDoubleValue("ye");
double ze = sun->getDoubleValue("ze");
double ra = atan2(ye, xs);