BME280's barometric pressure and altitude

This may be difficult to understand since I am not a native English speaker.
BME280 outputs barometric pressure, temperature, humidity, and altitude. The altitude value is obviously different because it is calculated by assigning these values to a single formula. Since the location of the sensor is fixed, I would like to assign the value obtained from the map data in advance and reflect it in the calculation of the barometric pressure, but I need some good advice. Thank you in advance.

I believe the BME280’s hardware in addition to it’s software driver/library already makes these calculations internally. There is no need to perform additional calculations.

Thanks for your feedback. I am at 150m above sea level, but the BME280’s altitude readings vary from about 60m to about 170m. I wanted to compensate for this if it affects the barometric pressure value.

Not really understanding why you would need to need to re-calculate the altitude reading compensating for barometric pressure on a fixed sensor if you already know the altitude?

This sensor calculates altitude based on barometric pressure. Therefore, since the pressure changes, the calculated altitude will change. You could recalibrate the sensor, but unless you know the exact pressure at the time of calibration, you will be making the sensor less accurate (these sensors are calibrated at the factory, so if your sensor is new, you already have accurate pressure measurements). I would not advise calibrating based on your altitude (i.e. the ideal pressure at your altitude), since the actual pressure is likely different due to weather fluctuations.