Determining the air-fuel ratio of a four-stroke internal combustion engine from spark ignition voltage waveforms