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

Thermal properties #47

Open
iamambrus opened this issue Nov 4, 2017 · 3 comments
Open

Thermal properties #47

iamambrus opened this issue Nov 4, 2017 · 3 comments

Comments

@iamambrus
Copy link

iamambrus commented Nov 4, 2017

Hi Marcin, looks very promising. To be truly useful though the following information would be necessary:

  • thermal entry height
  • thermal exit height
  • (average) thermal strength
  • time spent in thermal (can be calculated from current data, still nice)
  • optionally some wind/drift information

Maybe this is all doable with your library, if so please could you provide some instructions? Thanks.

@marcin-osowski
Copy link
Owner

Hi,

the first 4 things on the list are there in the library. After you parse an IGC flight and get a Thermal object you can query it like this:

ipdb> flight
<igc_lib.Flight instance at 0x1011336c8>
ipdb> flight.thermals[0]
Thermal(vertical_velocity=1.61 m/s, duration=7m 8s)
ipdb> flight.thermals[0].enter_fix.alt
537.0
ipdb> flight.thermals[0].exit_fix.alt
1224.0
ipdb> flight.thermals[0].vertical_velocity()
1.605140186915888
ipdb> flight.thermals[0].time_change()
428.0

See the Flight::create_from_file() function on how to create a Flight object, and the Thermal class in igc_lib.py.

As far as wind/drift calculation goes, it's not currently there, but a basic version: (exit_position - entry_position)/(exit_time - entry_time) should be pretty easy to implement. Let me know if you'd need that, I can have a look into it. Also, I'm happy to accept pull requests here :)

@iamambrus
Copy link
Author

Great, thank you! Looked through the code and it's very readable. Will look into the wind drift topic, shouldn't be that hard to implement.

@marcin-osowski
Copy link
Owner

Sure, if you get some time for it and get it working I'll be happy to review a pull request with an extra feature - sounds useful to have.

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

2 participants