[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 258: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 320: mysqli_free_result(): Couldn't fetch mysqli_result
rusefi.com • Engine position
Page 1 of 1

Engine position

Posted: Fri Apr 11, 2014 10:21 am
by mpeski
Are there any documentation available how crankshaft position is calculated and how ignition callback is generated in current software ?

I'm trying to go through the software to get the idea how is it designed.

Re: Engine position

Posted: Fri Apr 11, 2014 11:15 am
by AndreyB
http://rusefi.com/docs/html/

I would be happy to extend this article, so please read & ask questions.

Re: Engine position

Posted: Fri Apr 11, 2014 2:22 pm
by mpeski
Ok, so is the ignition event only occurring on trigger interrupt ? I mean, can ignition be adjusted between trigger pulses ?

Re: Engine position

Posted: Fri Apr 11, 2014 2:32 pm
by AndreyB
Sure it can. I've just expanded the last paragraph, it now reads:
So, for this particular sensor the most precise scheduling would be possible if we schedule coil charting as '85.6 degrees after the 600 degrees position sensor event', and spark firing as '10 degrees after the 690 position sensor event'. Considering current RPM, we calculate that '10 degress after' is 2.777ms, so we schedule spark firing at '2.777ms after the 690 position sensor event', thus combining trigger events with time-based offset.
At some point I would need a native speaker to fix my broken English...

Re: Engine position

Posted: Fri Apr 11, 2014 3:19 pm
by mpeski
Ok, perfect. One more question. Time in the example, 2.777 ms, when is that calculated ?

Your English far better than mine :D

Re: Engine position

Posted: Fri Apr 11, 2014 3:25 pm
by AndreyB
2.777 ms is calculated within the trigger event interrupt handler when we know that this trigger event needs to schedule an output signal.

Check the handleSparkEvent method @ http://sourceforge.net/p/rusefi/code/HEAD/tree/trunk/firmware/controllers/trigger/main_trigger_callback.cpp#l117

At least I hope my Russian is better than yours.

Re: Engine position

Posted: Fri Apr 11, 2014 3:34 pm
by mpeski
I think I got the picture now, looks good.

...more questions to come...