FlightData HUD: Fuel Gauge feature #3219
Open
+1,104
−183
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Feature:
The purpose of the fuel gauge is to display an estimation of the amount of fuel that is remaining in the tank of the vehicle. The calculation for the value displayed is based on the efi fuel consumed (in grams) and is multiplied by a ratio of the weight per litre of the fuel to get the value of the efi fuel consumed into millilitres. This calculated value is subtracted off of the fuel amount in the tank as specified by the user. This is the value which displays on the fuel gauge bar.
Functionality:
The Fuel Gauge is a new feature which has been implemented into the FlightData screen on the HUD. It is accessible by right clicking on the HUD and selecting the "Fuel Gauge" menu strip item.
Once the user clicks on the Fuel Gauge menu item, five controls are displayed on the persistent panel displayed under the HUD. These controls are namely: the Fuel Tank Size button, labelled as “Set Tank Size (ml)”, and input field and the Fuel Amount in the tank button, labelled as ”Set Fuel Amount (ml)”, and input field, as well as the “Set Fuel Density” button.
The user will first set the Fuel Density weight per litre of fuel by clicking on the set fuel density button, this will open the Fuel Density Form where there is an explanation of the use of the Fuel Density, which is the same value that the user would submit in the configuration settings in the parameter list(parameter EFI_FUEL_DENS) and that this value for the fuel gauge is only needed to be set the first time using the fuel gauge. The value is only reset if the user changes the value or the Mission Planner is reopened.
The user will input the weight per litre of the fuel in grams and once the Set button is pressed, the value will be used in the fuel consumption calculation.
The user will then be able to set the size of the fuel tank in millilitres, once set the user either can press enter or press the “Set Tank Size (ml)” button which will enable the “Set Fuel Amount (ml) button and the input field for the fuel amount in the tank. Once this value is set and the user presses the button or presses enter while in the input field, the Fuel Gauge will be displayed on the HUD to the right of the Disarmed status and above where the AOA is displayed.
Once the Fuel Gauge is displayed on the screen the Button’s, used for setting the fuel amount in the tank, text changes to: “Hide Fuel Gauge”. When pressed, the fuel gauge will be hidden and not display on the HUD, the button will need to be pressed again in order to display the fuel Gauge on the HUD.
When the amount of fuel remaining in the tank is above 30%, the gauge is displayed in a lime colour, when between 15% and 30%, the gauge is displayed in orange, when below 15%, the gauge is displayed in red.
Fuel between 15% and 30% - Orange
Fuel between 0% and 15% - Red
If a user does not want to view the Fuel Gauge bar and its controls any more, the user can right click on the HUD and select the “Fuel Gauge” menu item which will hide all of the fuel gauge controls.
When hovering over any of the controls displayed in the persistent panel for the fuel gauge input setup, the tooltip displays some text to inform the user that the fuel gauge is set and calculated in millilitres. Once the Fuel Density has been set, the Fuel Density buttons’ tooltip displays the set fuel density in grams which the user set in the fuel density form.
HUD Dropout Form
When the user double clicks on the HUD in order to view the Hud in its own form, the fuel gauge is also added onto the HUD if it was already displaying on the original HUD
When the HUD dropout form is resized, the fuel gauge stays in the same place relative to the size of the form.
The functionality works the same way when the fuel gauge is displayed on the HUD dropout as to when it is on the original HUD, the fuel gauge bar can be hidden, redisplayed, resized, the bar changes value when connected to an EFI fuel system.
Fuel Level warnings
When the fuel amount remaining reaches 15%, a message box pops up to inform the user that the fuel is below 15%, and when the fuel has reached 0, another message box displays to inform the user that the fuel has been depleted. The message boxes are only displayed when the vehicle which is connected is armed.
When a user hovers over the fuel gauge bar on the HUD, the user will be able to view the amount of millilitres remaining in the fuel tank.
Resizing the HUD
When the HUD is resized the fuel gauge will stay in the same position relative to the size of the HUD