]> git.mxchange.org Git - flightgear.git/commitdiff
Pass the north-east-down velocty directly to the sample_group and do the calculations...
authorehofman <ehofman>
Tue, 10 Nov 2009 14:29:25 +0000 (14:29 +0000)
committerTim Moore <timoore@redhat.com>
Tue, 10 Nov 2009 15:29:51 +0000 (16:29 +0100)
src/Model/acmodel.cxx

index 4df8f19f1810cab0c4453d0e6e826b77f1542896..1da7e37592f07f43497750fb9b88839f7132030f 100644 (file)
@@ -132,16 +132,10 @@ FGAircraftModel::update (double dt)
                                                 _roll->getDoubleValue());
   _fx->set_orientation( orient );
  
-  SGVec3d vel = SGVec3d( _speed_n->getFloatValue(),
-                         _speed_e->getFloatValue(),
-                         _speed_d->getFloatValue() );
-  if ( vel[0] || vel[1] || vel[2] ) {
-    SGQuatd hlOr = SGQuatd::fromLonLat(position);
-    _velocity = 100.0 * toVec3f( hlOr.rotateBack( vel * SG_FEET_TO_METER ) );
-  }
-  else
-      _velocity = SGVec3f::zeros();
-  _fx->set_velocity( _velocity );
+  SGVec3d vel = SGVec3d( _speed_n->getDoubleValue(),
+                         _speed_e->getDoubleValue(),
+                         _speed_d->getDoubleValue() );
+  _fx->set_velocity( vel );
 }