In a diesel engine, the MAP sensor measures the pressure inside the intake manifold. This information is used by the engine's electronic control unit (ECU) to calculate the amount of fuel that needs to be injected into the cylinders. By measuring the MAP, the ECU can ensure that the engine is operating at the correct air-to-fuel ratio.