So, having gotten some free time, I finished analyzing the oil level items from the M3.
As you can see from the picture, there is the main level routine, a correction routine, data for OBDII freeze frames, startup values, and getting the level signal from the sensor.
This will likely be the basis for all of the E46 BMWs, as it is the most comprehensive code I would think. The MS45 code supports more than one sensor type, but those are not used on E46, so that doesn’t matter.
The corrections are pretty thorough, it corrects for altitude changes, X and Y axis movement, as well as the current engine speed.
Thankfully, you can just put 0 for these when the correction data is missing, and you’ll get an approximate value. For other cars, they have standalone temperature sensors, so this is good enough. For the M3, you want the most correct data you can get to accurately determine oil temperature.