1
0
Fork 0

Merge branch 'maint2' into next

This commit is contained in:
Tim Moore 2009-01-04 00:25:04 +01:00
commit 89010e6b0a
4 changed files with 9 additions and 5 deletions

View file

@ -514,7 +514,7 @@ void FGAICarrier::UpdateWind( double dt) {
+ (rel_wind_speed_from_north_kts * rel_wind_speed_from_north_kts));
//calculate the relative wind direction
rel_wind_from_deg = atan(rel_wind_speed_from_east_kts/rel_wind_speed_from_north_kts)
rel_wind_from_deg = atan2(rel_wind_speed_from_east_kts, rel_wind_speed_from_north_kts)
* SG_RADIANS_TO_DEGREES;
// rationalise the output

View file

@ -99,6 +99,8 @@ FGMetar::FGMetar(const string& icao, const string& proxy, const string& port, co
_wind_range_from = _wind_range_to = _wind_dir;
}
if (_wind_speed == SGMetarNaN)
_wind_speed = 0.0;
if (_gust_speed == SGMetarNaN)
_gust_speed = 0.0;

View file

@ -169,7 +169,7 @@ void PistonEngine::calc(float pressure, float temp, float speed)
// pressure change can be assumed to be adiabatic. Calculate a
// temperature change, and use that to get the density.
// Note: need to model intercoolers here...
float T = temp * Math::pow(_mp/pressure, 2.0/7.0);
float T = temp * Math::pow((_mp*_mp)/(pressure*pressure), 1.0/7.0);
float rho = _mp / (287.1f * T);
// The actual fuel flow is determined only by engine RPM and the

View file

@ -219,7 +219,9 @@ void CameraGroup::update(const osg::Vec3d& position,
void CameraGroup::setCameraParameters(float vfov, float aspectRatio)
{
_viewer->getCamera()->setProjectionMatrixAsPerspective(vfov,
if (vfov != 0.0f && aspectRatio != 0.0f)
_viewer->getCamera()
->setProjectionMatrixAsPerspective(vfov,
1.0f / aspectRatio,
_zNear, _zFar);
}