the simplest and cheapest solution is the one mentioned by Jubin. You can also increase the resolution of the flying whell by dividing it digitally. However, for the applications regarding combustion analysis, the most used devices are encoders which provide CA resolution up to 0.1 CAD.
The most simple way is to "tap" the tooth sensors (inductive or hall) already installed for the ECU (Engine Control Unit). The toothed wheel (sampled on one edge only) usually gives 60 (-2) teeth per revolutions - equalling to a 6 degrees resolution. Between the tooth edges, the angle can be interpolated with a - usually - high-enough precision.
But it should be clear that other measurement approaches with individual measurement hardware apply as well - starting e.g. with an electrical generator (giving some sine signal) and maybe ending with some optical incremental encoder. Between these two "extremes" is the whole wealth of magnetical, optical or whatever sensors - either incremental or with some kind of continuous (typically sin/cos) signal output.
May be you can use laser diode which is fixed on the rotating shaft and a circular array of of photo diodes which are fixed on static frame around the shaft. By detecting the pulses generated at the detectors one can can get the angle as the diodes can be encoded into angles of position.
In addition to inductive encoders, optical pattern encoder discs with photodiode measurement have also been previously used and allow measurement to 0.1 CAD. Depending on the signal processing and data reduction methods used, you would typically need 0.25 to 0.5 CAD minimum for calculation of AHHR from cylinder pressure measurements. Flywheel tooth measurements, even with a degree of interpolation, would not provide sufficient resolution for combustion analysis.