Hi Curt,

I thought about that before but I don't think so. I'm printing a line 
for every single ctrl packet I'm sending, and each ctrl packet is in 
response to one from FG. If I kill the app, or tell it to stop sending 
ctrl messages, nothing else seems to be controlling anything.


Engine state: 0, mag: 3, starter: 1, RPM: 459.994720
Engine state: 0, mag: 3, starter: 1, RPM: 461.520630
Engine state: 0, mag: 3, starter: 1, RPM: 460.076843
Engine state: 0, mag: 3, starter: 1, RPM: 461.829773
Engine state: 2, mag: 3, starter: 0, RPM: 534.171448
Engine state: 2, mag: 3, starter: 0, RPM: 695.545776
Engine state: 2, mag: 3, starter: 0, RPM: 909.278687
Engine state: 2, mag: 3, starter: 0, RPM: 1037.803955

The above is a successful startup. The output tells me that the starter 
is constantly on, which is the expected behaviour given this code:

     if(f.eng_state[0] < 2 && runEngine) c.starter_power[0] = 1;
     if((f.eng_state[0] == 2  && f.rpm[0] > 500) || !runEngine) 
c.starter_power[0] = 0;

I did notice that when I press 's', the engine is in the intermediate 
'cranking' stage, which seems to be missing above. Although it could 
also be that due to the full throttle the 'cranking' stage is so short 
it didn't show up.

Anyway, I'm currently cloning fgdata and once I'm done with that, I'll 
repeat the test on the master branch.

Cheers,
Vik


On 06/01/2012 09:51 PM, Curtis Olson wrote:
> It makes me wonder if some other control is battling for the starter
> property and it's not consistently switched on?
>
> On Fri, Jun 1, 2012 at 2:46 PM, Viktor Radnai <viktor.rad...@gmail.com
> <mailto:viktor.rad...@gmail.com>> wrote:
>
>     Actually the engine rpm is usually oscillating between 430 and 450 rpm.
>     Therefore it must be shutting down and starting up repeatedly, or at
>     least I think that's what's happening. Also it could be possible that
>     when the starter engages, it might pull the rpm back momentarily.
>
>     In any case, I just did a couple more tests and this time around the RPM
>     slowly increased past 460 and then the engine managed to start. But it
>     seems to take a random amount of time before that happens, so perhaps
>     the wind might be helping out. Or it could be something related to the
>     timing of the UDP control packets, I really have no idea.
>
>     Anyway, I'll give the new code a go at some point, it's about time I
>     rebuilt from git again.
>
>     Cheers,
>     Vik
>
>     On 06/01/2012 09:16 PM, Ron Jensen wrote:
>      > There is a change to the starter motor code (should be entering
>     git real soon
>      > now) that may help address this. But your engine should have
>     'started' as it
>      > exceeded 440 RPM... Anyway, glad it works now, and we can revisit
>     this after
>      > FlightGear syncs JSBSim.
>      >
>      > Ron
>      >
>      > On Friday 01 June 2012 09:39:52 Viktor Radnai wrote:
>      >> Hi Ron,
>      >>
>      >> A quick test confirms that you were indeed right:
>      >>
>      >> Engine state: 0, mag: 3, starter: 1, RPM: 440.915466
>      >> Engine state: 0, mag: 3, starter: 1, RPM: 440.567566
>      >> Engine state: 0, mag: 3, starter: 1, RPM: 447.837677
>      >> Engine state: 0, mag: 3, starter: 1, RPM: 445.897156
>      >>
>      >>
>      >> It must be that the periodic engaging and disengaging of the starter
>      >> makes it impossible to reach 550 rpm. If I also press 's' in
>     Flightgear,
>      >> the engine will start immediately. Also if I reset the game and
>     the prop
>      >> is still turning, it will start.
>      >>
>      >> I do find it a bit odd how the starter was implemented. I wonder
>     if it's
>      >> feasible to change it so it keeps running until a starter_power=0 is
>      >> received. In the meantime I might just change the idle RPM to
>     440 in my
>      >> copy so I'm able to start the engine.
>      >>
>      >> Thanks for your help!
>      >>
>      >> Cheers,
>      >> Vik
>      >>
>      >> On 06/01/2012 02:16 AM, Ron Jensen wrote:
>      >>>>  From eng_io320.xml:
>      >>>
>      >>> <idlerpm>                   550.0</idlerpm>
>      >>>
>      >>> The engine needs to reach 440 RPM to start (80% of 550, the
>     coded idle
>      >>> RPM) if you're reaching above 440 RPM make sure you've engaged
>     fuel and
>      >>> magneto controls. If you're not reaching that perhaps you need
>     to look
>      >>> into the controlling nasal as the c172 uses some non-standard
>     stuff. Also
>      >>> make sure you're not sitting with a strong tailwind as that can
>     affect
>      >>> some propeller configurations and make them harder to turn.
>      >>>
>      >>> Ron
>      >>>
>      >>> On Thursday 31 May 2012 15:16:42 Viktor Radnai wrote:
>      >>>> Hi all,
>      >>>>
>      >>>> I'm going to use Flightgear for developing/testing UAV code (yep,
>      >>>> another one of those :) ). I'm currently putting together an
>     SDL app
>      >>>> that communicates with FG.
>      >>>>
>      >>>> I'm using the FGNetCtrls structure from net_ctrls.hxx. I'm
>     trying to
>      >>>> start the C172's engine but when I set startup_power = 1, the
>     engine
>      >>>> tries to start, but won't. Flightgear behaves like I was
>     repeatedly
>      >>>> pressing the 's' key several times per second rather than
>     holding it
>      >>>> down, so the engine spins up, but not quite enough to start.
>     Am I doing
>      >>>> something wrong?
>      >>>>
>      >>>> Thanks for your help in advance.
>      >>>>
>      >>>> Cheers,
>      >>>> Vik
>      >
>      >
>     
> ------------------------------------------------------------------------------
>      > Live Security Virtual Conference
>      > Exclusive live event will cover all the ways today's security and
>      > threat landscape has changed and how IT managers can respond.
>     Discussions
>      > will include endpoint security, mobile security and the latest in
>     malware
>      > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>      > _______________________________________________
>      > Flightgear-devel mailing list
>      > Flightgear-devel@lists.sourceforge.net
>     <mailto:Flightgear-devel@lists.sourceforge.net>
>      > https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>      >
>
>     
> ------------------------------------------------------------------------------
>     Live Security Virtual Conference
>     Exclusive live event will cover all the ways today's security and
>     threat landscape has changed and how IT managers can respond.
>     Discussions
>     will include endpoint security, mobile security and the latest in
>     malware
>     threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>     _______________________________________________
>     Flightgear-devel mailing list
>     Flightgear-devel@lists.sourceforge.net
>     <mailto: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
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to