Hi All, I also have the interpolation for the nose gear scissors done and working. The main gear rotation interpolation is also done and working. I have been busy on other projects today, so have not had time to clean this up for a git push.
The main gear requires a different script based on the geometry. I based the script on that section of action-sim.nas. One issue in generalizing this approach; apparently jsbsim normalizes so 1 ~ 1 ft while yasim normalizes to compression set in the set file. I can clean this up and push to git tomorrow or I can use Torsten's autopilot filter idea to allow the deletion of all of action-sim.nas. Should get that done tomorrow also. Main Gear script follows: import("math"); var acos = func(x) { math.atan2(math.sqrt(math.abs(1-x*x)), x) } var R2D = 180.0 / math.pi; var Radius_main = 0.919879; # Radius_main is the distance from the center of rotation to the tire contact point var h0 = 0.63872; # ho is the vertical height of the center of rotation with no compression var h_norm = 0.3048; # h_norm is the height of the center of rotation with compression-norm = 1 var theta0 = acos(h0/Radius_main); print( "<?xml version = '1.0' encoding = 'UTF-8' ?>\n" ); print( "<PropertyList>\n" ); for( var i = 0; i < 1.05; i += 0.05 ) { print( "<entry>\n" ); var delta_h = i * h_norm; print( "<ind>" ~ sprintf("%4.3f", i ) ~ "</ind>\n" ); print( "<dep>" ~ sprintf("%4.3f", (acos( (h0 -delta_h) / Radius_main ) - theta0 ) * R2D ) ~ "</dep>\n" ); print( "</entry>\n" ); } print( "</PropertyList>\n" ); Dave P. On 02/12/2011 04:03 PM, Stuart Buchanan wrote: > Hi Guys, > > Thanks very much for looking at this. I had a play with it myself > yesterday, and have XML interpolation code already working for the > nose-gear in my local copy. I used an oleo length of 1ft as > /gear/gear[0]/gear-compression-ft and > /gear/gear[0]/gear-compression-norm seem to be the same by inspection, > which looks fine to my eye. I think that should equate to the oleo > length? > > I haven't looked at the main gear yet, and I'd like to get them both > sorted before committing. Using an oleo length equal to twice the main > gear compression should give the correct animation I think. > > I've also ported Torstens Nasal code to perl, which I'll add to the > wiki once I've cleaned it up. Like Dave I couldn't get the latest > version of Nasal to compile :) > > Dave - sounds like we've been duplicating effort in our enthusiasm to > sort this. If you haven't managed to get the Nasal code working yet, I > suggest I post the perl code and sort out the c172p. Then you should > be able to sort out the pa24& pa28 pretty easily. First one finished > gets to do the pittss1c :) > > -Stuart > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel