Skip to content

Conversation

@MrD-RC
Copy link
Member

@MrD-RC MrD-RC commented Feb 23, 2025

This PR adds more flexibility to minimum ground speed. Access has been added to the programming framework for retrieval and override. An example use would be setting the min ground speed to be x km/h above the wind speed.

  • Added overriding min ground speed to the programming framework.
  • Added reading min ground speed to the programming framework.
  • Updated nav functions to get the min ground speed via the programming framework. This handles if the override is enabled or not.
  • Added min ground speed element to the OSD. This involved re-formatting osdFormatVelocityStr to take a osd_speedTypes_e value. Instead or adding another Boolean to define speed types. Moved Airspeed variants in to the function too. I think it's a neater and more futureproof solution.

Requires Configurator iNavFlight/inav-configurator#2382

Todo

  • Add getting wind speed to programming framework
  • Add getting wind direction to programming framework
  • Configurator side
  • Test

- Added overriding min ground speed to the programming framework.
- Added reading min ground speed to the programming framework.
- Updated nav functions to get the min ground speed via the programming framework. This handles if the override is enabled or not.
- Added min ground speed element to the OSD. This involved re-formatting `osdFormatVelocityStr` to take a `osd_speedTypes_e` value. Instead or adding another boolean to define speed types. Moved Airspeed variants in to the function too.

**Todo**
- [ ] Add getting wind speed to programming framework
- [ ] Test
@MrD-RC MrD-RC added this to the 9.0 milestone Feb 23, 2025
- Added horizontal wind speed to the programming framework.
- Added min ground speed and horizontal wind speed to programming framework docs. Along with a couple of missing entries
-  Added min ground speed to the OSD doc, plus another that was missing.
Corrected min constraint value for min ground speed programming framework operand A.
@sensei-hacker
Copy link
Member

If someone could please test this, that would be great.
In particular if you can test any weird cases you might think of, any way it might break.

@iNavFlight iNavFlight deleted a comment from qodo-code-review bot Oct 12, 2025
@MrD-RC
Copy link
Member Author

MrD-RC commented Oct 12, 2025

I made a couple of updates and have tested. All seems fine in HITL. But welcome peer review.

Here is the programming that I used
image
Unfortunately my choice of 15m/s (54kmh) and a 556 cm/s (20kmh) increase over horizontal wind speed mad the resulting requested ground speeds identical. However from the programming tab. It's obvious that the two different methods are being used. There is also a mistake in the programming. LC 9 & 10 should both be active always. That explains the glitches in the requested horizontal wind speed + 20kmh in the video.

HITL test video

@MrD-RC MrD-RC requested a review from Copilot October 13, 2025 06:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds flexibility to minimum ground speed configuration by enabling programming framework access for both retrieval and override functionality. The changes allow users to dynamically adjust minimum ground speed (e.g., setting it relative to wind speed) and display it on the OSD.

  • Added programming framework support for overriding and reading minimum ground speed
  • Enhanced OSD velocity formatting to support different speed types including minimum ground speed
  • Added wind speed and direction operands to the programming framework

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/main/programming/logic_condition.h Added new operands and override operation for minimum ground speed
src/main/programming/logic_condition.c Implemented minimum ground speed override logic and wind estimation operands
src/main/navigation/navigation_fixedwing.c Updated to use programming framework for minimum ground speed retrieval
src/main/io/osd.h Added new OSD element and speed type enumeration
src/main/io/osd.c Refactored velocity formatting and added minimum ground speed display
src/main/drivers/osd_symbols.h Added minimum ground speed symbol and fixed duplicate ADSB definition
src/main/common/maths.h Added KMH to m/s conversion macro
docs/Programming Framework.md Documented new programming framework features
docs/OSD.md Added minimum ground speed OSD element documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Jetrell
Copy link

Jetrell commented Oct 20, 2025

If someone could please test this, that would be great. In particular if you can test any weird cases you might think of, any way it might break.

From the best that I could tell when flying in blustery wind conditions, in order to trigger an event. It appears to be working as it was designed to, when looking back over the OSD footage.
Great addition with the wind direction and horizontal wind speed in the IPF @MrD-RC

@MrD-RC MrD-RC merged commit cbe6982 into master Oct 26, 2025
22 checks passed
@MrD-RC MrD-RC deleted the MrD_Make-min-ground-speed-more-accessible branch October 26, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants