Please do not quote everything as it is, since it does not make sense, since same can be read on previous post.
Do you mean dMap function example I wrote on post #351? map is just a simple function for making linear scaling I wrote. Arduino map uses long values and dMap doubles.
Anyway in principle you 0-1023 maps finally to your temperature values -20 - 150 C. You can also use direct mapping, if you know that it is right: tempK=dMap(analogRead(coolantTempPin),0,1023,253.15,423.15);
This is naturally fastest way to calculate it, since you do mapping only once. But now, if your reference changes e.g. by providing more accurate external 2.5V reference, you have to remember that then 0-1023 values are within 0 - 2.5 V, which means that 1023 does not map to 423.15 K anymore. So if you know your sensor mapping in voltages and you make it as commonly usable function, you need two mapping.
...
const double VRef=3.3;
const double AnalogMax=1023;
...
double ReadAnalogVoltage(int pin) {
return dMap(analogRead(pin),0,AnalogMax,0,VRef);
}
...
double SensorMxyzToKelvin(double Vin) {
return dMap(Vin,0,3.3,253.15,423.15);
}
...
double ReadTemp(coolantTempPin) {
return SensorMxyzToKelvin(ReadAnalogVoltage());
}
...
This makes your code a bit more abstract, understantable and movable, but also unfortunately also slower depending of you processor. Teensy works rather well with double, but Mega lags much.
There is no standards, since sensors has different output. But the mapping range depends of sensor and you may find it from the specifig sensor data sheets.