Hi Gaurav, For questions specific to JSBSim code, you might also ask on the jsbsim mailing list (details at www.jsbsim.org) -- although I'm sure several of the developers are subscribe to both flightgear and jsbsim devel lists.
One other thought if you want to avoid changing C++ code or you wish to support versions of FlightGear that are already released, is that you might be able to create a simple battery model using Nasal (flightgear's embedded scripting language.) You could perhaps limit maximum throttle position based on the output of your battery simulation to simulate the what happens as your battery is used up (or to simulate an aging battery, etc.) I know batteries are pretty complex if you dig into them, but you could probably hack something simple really quickly that would get you 90% of the way there and cover most of the situations you would be concerned about. Curt. On Fri, Jun 3, 2011 at 2:49 AM, Gaurav Tendolkar <grvtendol...@gmail.com>wrote: > I am modelling an battery powered electric motor MAV. > In JSBsim the battery does not discharge. > > 00178 FGElectric::CalcFuelNeed(void)00179 {00180 return 0;00181 } > > now i want to write a code where fuel is the power supplied by battery. > by knowing the total stored energy we will calculate time to discharge. > > How do i make the changes to the code come to effect in flightgear ? > > > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with > vRanger. > Installation's a snap, and flexible recovery options mean your data is > safe, > secure and there when you need it. Discover what all the cheering's about. > Get your free trial download today. > http://p.sf.net/sfu/quest-dev2dev2 > _______________________________________________ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > > -- Curtis Olson: http://www.atiak.com - http://aem.umn.edu/~uav/ http://www.flightgear.org - http://gallinazo.flightgear.org
------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2
_______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel