It would need the height above sea level for the QNH station you are using. i.e. If you are flying to an airport, and have that airport's QNH set up - the airport adjusts the QNH figure they pass you so that your bog-standard altimeter reads the correct level at the airport. The aircraft would need to know the height of the airport above sea level in order to apply the same correction.