Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Altitude and sea level pressure #44

Open
TheOzarkWizard opened this issue Jun 12, 2021 · 2 comments
Open

Altitude and sea level pressure #44

TheOzarkWizard opened this issue Jun 12, 2021 · 2 comments

Comments

@TheOzarkWizard
Copy link

Im needing altitude and sea level pressure parameters. Is there something Im missing?

@smurfix
Copy link

smurfix commented Jun 25, 2021

It's simple enough to convert one to the other. Check Wikipedia for the formula.

@themeadery
Copy link

I use this code in my project. Seems to work well

# Station altitude in meters
sta_alt = 276.0

# Station pressure to MSL Pressure conversion function
# Formula source: https://gist.github.com/cubapp/23dd4e91814a995b8ff06f406679abcf
def sta_press_to_mslp(sta_press, temp_c):
    mslp = sta_press + ((sta_press * 9.80665 * sta_alt)/(287 * (273 + temp_c + (sta_alt/400))))
    logging.info(f"{mslp:.2f} hPa MSL")
    return mslp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants