ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

GCS_MAVLink: Add FLIGHT_INFORMATION message

Open nexton-winjeel opened this issue 2 years ago • 10 comments

Adds ~~a new FLIGHT_DURATION~~ the FLIGHT_INFORMATION message to report the time that the vehicle armed and took off (if known).

This message is needed if connecting a GCS to a vehicle that is already armed/flying, as otherwise these times can't be accurately determined.

Also adds an accessor to AP_Arming to record the arming time.

~~Requires: https://github.com/ArduPilot/mavlink/pull/336~~

nexton-winjeel avatar Nov 08 '23 06:11 nexton-winjeel

I wonder if the new metrics would be useful as part of AP_Stats, you can get flight time from there, but currently you have to pull the param value.

IamPete1 avatar Nov 08 '23 11:11 IamPete1

@nexton-winjeel I think this PR is now no-longer-required as we're going to use FLIGHT_INFORMATION instead, correct?

peterbarker avatar Apr 05 '24 01:04 peterbarker

@peterbarker: It's not required as-is, but I'll convert it to use FLIGHT_INFORMATION instead of the now non-existent FLIGHT_DURATION. Will get to it early next week.

nexton-winjeel avatar Apr 05 '24 02:04 nexton-winjeel

@peterbarker: It's not required as-is, but I'll convert it to use FLIGHT_INFORMATION instead of the now non-existent FLIGHT_DURATION. Will get to it early next week.

Long week?

peterbarker avatar May 22 '24 13:05 peterbarker

Long week?

Very. Still not my oldest open PR though...

nexton-winjeel avatar May 23 '24 00:05 nexton-winjeel

Closes https://github.com/ArduPilot/ardupilot/issues/25284

peterbarker avatar Jul 31 '24 03:07 peterbarker

I think this should be disabled by def and a build option...not going to be used by 95% of users....or at least disabled in minimize include...also needs file for build server and features list added

This is going to be a good/useful message for a lot of people. I plan on patching MAVProxy for it to fix the resetting-flight-time problem it has.

@nexton-winjeel please add an entry into minimize_common.inc so this isn't built on the tiny boards. Also entries to extract_features.py and build_options.py so users can turn the feature on/off as desired.

peterbarker avatar Aug 06 '24 23:08 peterbarker

@nexton-winjeel please add an entry into minimize_common.inc so this isn't built on the tiny boards. Also entries to extract_features.py and build_options.py so users can turn the feature on/off as desired.

Done.

nexton-winjeel avatar Aug 07 '24 00:08 nexton-winjeel

In-progress MAVProxy support is here: https://github.com/ArduPilot/MAVProxy/pull/1438

Works ~, but I've broken other stuff in a refactor~

peterbarker avatar Aug 14 '24 06:08 peterbarker

Ping @nexton-winjeel - might still be viable for 4.6 - but even than had better be soon :-)

peterbarker avatar Oct 18 '24 02:10 peterbarker

@peterbarker: Can I get you to review this again?

nexton-winjeel avatar Oct 28 '24 03:10 nexton-winjeel

Can we have this merged ?

patrickelectric avatar Mar 13 '25 20:03 patrickelectric

I can't force-push this branch.

I've rebased this branch over here: https://github.com/ArduPilot/ardupilot/pull/29541 - just resolved the conflicts.

I intend to merge that other PR once it passes CI. And then the MAVProxy one.

peterbarker avatar Mar 16 '25 23:03 peterbarker

@peterbarker: Can I get you to review this again?

Apologies - missed this request.

peterbarker avatar Mar 16 '25 23:03 peterbarker

I can't force-push this branch.

I've rebased this branch over here: #29541 - just resolved the conflicts.

I intend to merge that other PR once it passes CI. And then the MAVProxy one.

I've rebased this one if you want to merge this instead of the other branch.

nexton-winjeel avatar Mar 17 '25 05:03 nexton-winjeel

Merged, thanks!

peterbarker avatar Mar 17 '25 10:03 peterbarker