Mission Planner Time in Air logic

As I can see Time in Air doesn’t reset with the new flight, not even after power-cycle. It resets after Mission Planner manual reconnection or Mission Planner restart.

Is there a way to set Time in Air to resets at take off?
With the new battery actual time in the air is the most useful time counter.

As I read the code, no. Time in Air is part of the connection stat. It resets only on new connection. However it is easy to add a keyboard combination to reset it without reconnect. If time permit i’ll put a pull request…

1 Like

ive updated this to reset on arm/disarm

2 Likes

Oh yeah !!!
Thanks Michael!

Michael, could future versions enact a way to select how this stat will reset? Possibly including a GUI button to reset this and other stats like distance traveled?

Since our aircraft disarms automatically on landing after automissions I lose this stat now which I use to help log time on our birds. Also for manual flights I want to be able to do multiple take off and lands with cumulative time in air and distance traveled when we’re testing VTOL capabilities and need to do intermittent disarms to check on motors/escs.

2 Likes

Have a look at the log index option in Control-F. bottom left.

this will show similar stats for all logs.

i can add other stats if that helps as well

1 Like

So I did as you suggested (what other info exists out there about all the other stuff on that page? looks like a lot of nifty stuff, but I have no clue what any of it does) but now it looks like since MP change, all the logs show 0 time in air regardless of how long was flown. Is the logic used to calculate this stat reliant on the time in air stat as it accumulates in the app? I have since written a little script that prints the takeoff, land, and time in air stats to the console, but its a pain in the butt.

Thanks for all you do!

im not aware of anything that would have stopped this from working.

ill check it out again

In recent flights for a client (with their equipment) I also noticed that the time in air was not counted cumulatively anymore, as I was familiar with in the past.
I don’t have access to the Pixhawk or the GCS used right now, but believe they had Mission Planer 1.3.55 installed, if I recall correctly.

Have since refined script to write to a .txt file and save at a google file stream location. It also makes a cumulative TIA stat now. its attached as a .txt, just change to .py and run in MPflight logger.txt (2.0 KB)

I might add another option to the status

timeinair
and
timesincearm (in air)

one of my old changes to reset timeinair on disarm is what caused this to stop working.

@Michael_Oborne: Just wondering. I noticed in latest few MP Beta, that when I land and disarm the “Time in Air” Field that I have manually listed in the “Quick” Tab, goes to Zero. It used to stay in place until I re-armed or started over. I used this data for my battery/flight log after the flight. Now I have to get TIA from DataFlash Log. No biggie- just wanted to make sure this is expected behavior, or if your possible change will restore this action. I really appreciate your work on MP, It’s a fantastic piece of software and must be a real pain to keep current with all the changes that happen in the flight software
Thanks,
Joe

Any news on this reseet on landing rather than on arming? It would be great to get this to reset on arm rather than disarm.

so there are 2

timeinair
and
timeSinceArmInAir

which one are you referring too?

ive just made a change for
timeSinceArmInAir
to only reset on arming

Michael, you are a gentleman and a scholar! Thank you very much, hugely appreciated.

  • Thanks- this will work great !!!