How to calculate altitude in a flight simulation? I guess altitude from sea level in the real aircraft is read from barometer, while for the altitude from ground a radar is used. For the purposes of very simple simulation, and assuming aircraft is on ground at certain airport at certain altitude.

The starting variables are then nothing but a throttle position, which over time increases, which translates into speed. And once the aircraft is airborne also the pitch. For this purpose I would not assume any roll, wind or other factors. The aircraft engine has certain torque % and pilot pulls the nose up to achieve certain pitch. 

Is it possible to get the altitude simply as the function of pitch and torque % Or to put it differently what are the minimum variables to take into account to come up with an altitude?

UPDATE

Obviously there's something wrong with the question because it resulted in the explosion of complexity, even touching the topic of atmospheric re-entry.

What I want to know is, as a pilot of a simple simulator, standing still on the runway, I can only change two things. 


Throttle, and some time later
Pitch


I don't have to do anything else whatsoever in simple sims, I click on + to set the throttle to X, and when the speed is Y, I pull the nose up, and now the altitude keeps on picking up. How do those two changes to those two variables (throttle, pitch) eventually give me the altitude and speed, through a series of equations (that needn't be neither simple nor linear)?
You can't directly calculate the altitude of an aircraft from any set of control settings. The altitude is dependent on the history of the aircraft. For example:


Fly level at full power for one minute, and pitch up suddenly. You will be near the ground, having quite some speed.
Climb at full power for a minute. You will be at high altitude, going quite slow.


In both situations, your aircraft is pitched up and at full power, but at very different altitudes. So, what are then the minimum variables needed?

This answer is quite difficult to give. If you're making a professional simulator, thousands. If you're making a platform game, just pitch and power, as well as some way of knowing the history of the aircraft. Usually, this is just a stepped simulation: at each moment in time, determine what your current pitch and power do to the attitude and altitude of the aircraft, and save it for the next time step. Of course, you need some model for relating these variables to actual accelerations of your airplane, and again, this model can be as complicated as you want or need it to be. See Koyovis' answer for more details on such a model.