The function of the crankshaft position sensor is to determine the position of the crankshaft, that is, the rotation angle of the crankshaft. It usually determines the basic ignition time together with the camshaft position sensor. As we all know, the engine starts to ignite at the end of the compression stroke, so how does the engine computer know which cylinder to ignite? It is calculated from the signals of crankshaft position sensor and camshaft position sensor. The crankshaft position sensor can know which cylinder piston is at the top dead center, and the camshaft position sensor can know which cylinder piston is in the compression stroke. So the engine computer knows when to ignite which cylinder.