Hi im trying to write a pressure equation:
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?