thomaslavi
Posts: 1
Joined: Mon Apr 25, 2016 3:02 pm

how to record and display max altitude reached?

Mon Apr 25, 2016 3:16 pm

We would like to know how the max altitude that has been recorded on the way to the highest point reached can be displayed for the rest of the flight once the altitude starts to go down. We know how to find the altitude but it would be helpful if we could know how to do this using python so that after the balloon peaks and starts falling the screen will display the max altitude.
:mrgreen:

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: how to record and display max altitude reached?

Mon Apr 25, 2016 10:09 pm

Store your data in an SQL table and use

Code: Select all

SELECT alt, max(alt) from data_logging_table where ...;
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: how to record and display max altitude reached?

Mon Apr 25, 2016 11:27 pm

thomaslavi wrote:. We know how to find the altitude but it would be helpful if we could know how to do this using python so that after the balloon peaks and starts falling the screen will display the max altitude.
There's a screen being carried up on the balloon? Is someone up there to look at it? If not, I would think that you'd dispense with frivolities, you'll likely get to a higher altitude.

In any case, if you don't care about the time altitude data and just want the highest altitude, why not something like the following, but in actual python, which this isn't really so much, well, kind of:

HILLINESS = # an unknown fudge
GROUND = getAltitude()
altitude = GROUND
highestAltitude = GROUND
flight = False
while not flight #wait for the balloon to be released
if altitude is greater than (GROUND + HILLINESS) then
flight = True

while flight
altitude = getAltitude()
if altitude is greater than highestAltitude then
highestAltitude = altitude
if altitude is less than (GROUND + HILLINESS) then
flight = False

print("The highest altitude was: ", highestAltitude)

Nevertheless, I'd be saving the information because you never know what is going to happen, you might not find the balloon for a week or it might just smash into something and reboot. So perhaps add in code to test when the balloon has gone down X feet from highestAltitude and then write to the sdcard the max height.

User avatar
daveake
Posts: 188
Joined: Thu Jul 12, 2012 12:07 am

Re: how to record and display max altitude reached?

Tue Apr 26, 2016 9:52 am

If this is a Pi-In-The-Sky question, then the simplest is to enable gps logging, and open the gps.txt file when you recover the SD card.

Dave

Return to “High Altitude Balloon”