On Monday 19 June 2006 23:23, Melchior FRANZ wrote:
> YASim (j3cub in KUFO).
The one I expected :)

Try that attached patch.

Andy safes an on ground trim routine by just starting an aircraft with zero 
agl in the sense of 'all gear contact points are exactly zero meters above 
ground'. Starting from this situation the aircraft just drops into its 
springs.

This kind of agl is also set into the FGInterface agl routine from YASim.
If you would ask me, I would like to have it in a consistent way, but may be 
we should ask Andy about such a change?

   Greetings

          Mathias

-- 
Mathias Fröhlich, email: [EMAIL PROTECTED]
Index: src/FDM/YASim/YASim.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/FDM/YASim/YASim.cxx,v
retrieving revision 1.34
diff -u -r1.34 YASim.cxx
--- src/FDM/YASim/YASim.cxx	1 Mar 2006 22:59:58 -0000	1.34
+++ src/FDM/YASim/YASim.cxx	19 Jun 2006 21:39:13 -0000
@@ -371,13 +371,13 @@
     double lat, lon, alt;
     sgCartToGeod(s->pos, &lat, &lon, &alt);
     _set_Geodetic_Position(lat, lon, alt*M2FT);
-    _update_ground_elev_at_pos();
+    double groundlevel_m = get_groundlevel_m(lat, lon, alt);
+    _set_Runway_altitude(groundlevel_m*SG_METER_TO_FEET);
+    _set_Altitude_AGL((alt-groundlevel_m)*SG_METER_TO_FEET);
 
     // UNUSED
     //_set_Geocentric_Position(Glue::geod2geocLat(lat), lon, alt*M2FT);
 
-    _set_Altitude_AGL(model->getAGL() * M2FT);
-
     // useful conversion matrix
     float xyz2ned[9];
     Glue::xyz2nedMat(lat, lon, xyz2ned);
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to