Tha altitude compensator (AC) reduces the fuel to air ratio at higher altitudes where the air is thin. My '74 240D didn't have one and it poured out black smoke at high altitudes but never smoked at sea level. My 300SDs have the AC and do not smoke at high altitudes, but they also have the turbo charger which puts more air into the cylinders. and tends to keep the air/fuel ratio constant.
The AC is mounted on the end injection pump and adjusts the rack according to atmospheric pressure. I imagine on any of the computer controlled injection systems, gas or Diesel, the AC would be an electrical input into the computer.
P E H