Advertisement

Pressure equation (gravity force at lattitude 45*degs) <- what does that mean

Started by December 30, 2014 01:57 PM
1 comment, last by nobodynews 10 years, 1 month ago

Hi im trying to write a pressure equation:

pres.jpg

i came to this:




const double eGForce = 9.810; 
const double TEMP_AT_SEALEVEL_STD = 288.150; //Kelvins
const double PRESSURE_AT_SEALEVEL_STD = 101.3250; //Pascals


double GEOPOTENTIAL_ALTITUDE(double obj_height) { return earth_radius*obj_height/ (earth_radius+obj_height); }
											  //288.15 kelvins T0 15 C at sea level
double TEMPERATURE(double height) { return (TEMP_AT_SEALEVEL_STD ? (0.00650*GEOPOTENTIAL_ALTITUDE(height))); } //0.0065*C m-1 temp lapse


double Pressure /*Pa*/ (double height) {             
return PRESSURE_AT_SEALEVEL_STD * pow(2.71828,  ( (sin(45.0*imopi)*eGForce * 28.96440) / (8314.32 * -0.00650) ) * log(TEMP_AT_SEALEVEL_STD / TEMPERATURE(height)) );
}

what is i do not understand is

g0 is the acceleration of gravity (m/s2 at a latitude of 45 ?) and how can i calculate this

another thing is is my function correctly written?


g0 is the acceleration of gravity (m/s2 at a latitude of 45 ?) and how can i calculate this

Unless you're concerned with variations in gravity on the order of 0.7%, you can just use your value of ~9.8 m/s2 (or google for the force of gravity at some particular location and use that.) The force of gravity at a point on the surface of the Earth can't really be calculated as it depends on the local altitude, the shape of the Earth, the density of materials within the Earth, etc.


another thing is is my function correctly written?

You don't need to multiply eGForce by anything. I.e., delete the sin multiplication. Otherwise, the form of your equation looks ok (didn't look up the constants you're using).

General comment: using double vs float doesn't really enhance the calc as you're just using approx. values for several of your constants.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Advertisement

The equation to determine gravity at a given latitude is supposedly:

http://en.wikipedia.org/wiki/Gravity_of_Earth#Latitude_model

However, i also checked the actual US Standard Atmosphere 1976 document (available here) and on the pdf page 19 they describe the value of g0 chosen for use in that equation.

Of course these are all estimates anyway, so unless you care about < 1% error it probably doesn't matter much.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

This topic is closed to new replies.

Advertisement