Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Fuel Consumption & Remaining Time Calculator
   
Award
Favorite
Favorited
Unfavorite
Tags: v1.12.3
File Size
Posted
125.451 KB
7 Oct, 2024 @ 1:53am
1 Change Note ( view )

Subscribe to download
Fuel Consumption & Remaining Time Calculator

Description
If you want to test this microcontroller, or if you need a microcontroller that displays all information on the screen, you can follow this link to download the test build:
https://steamproxy.com/sharedfiles/filedetails/?id=3344675174


This microcontroller is designed to monitor and analyze fuel consumption in a system, providing real-time data and averages for different time intervals: seconds, minutes, and hours. It operates by checking the changes in fuel levels over a user-defined time period. For calculation, only the fuel level in the tank is required. The size of the microcontroller is 1 by 2 (which can vary depending on the number of output data). The key functions of the microcontroller are as follows:

- Fuel Consumption Calculation: At each defined update interval, the microcontroller checks for changes in fuel levels to determine the rate of fuel consumption. It computes this in three formats:
L/s (liters per second)
L/min (liters per minute)
L/h (liters per hour)

- Averaging Data: To provide a more stable view of fuel consumption, the microcontroller maintains an average of the last N fuel consumption values (where N is defined by the user). It ensures that the average array does not exceed the specified size, removing the oldest entries as new ones are added.

- Remaining Time Estimation: The microcontroller calculates the estimated remaining fuel time for the system, providing outputs in seconds, minutes, and hours. This feature is particularly useful for users to understand how long the remaining fuel will last based on current consumption rates.

- Output: The microcontroller outputs the current fuel level and calculated consumption rates, averages, and remaining time through composite output.

- User Configurable Settings: The update interval and the number of values used for average calculation can be adjusted, allowing for customization based on specific operational needs or performance requirements.


Output Channels Overview:

Output Channel 1: Current Fuel Consumption (L/s)
Output Channel 2: Current Fuel Consumption (L/min)
Output Channel 3: Current Fuel Consumption (L/h)

Output Channel 4: Average Fuel Consumption (L/s)
Output Channel 5: Average Fuel Consumption (L/min).
Output Channel 6: Average Fuel Consumption (L/h)

Output Channel 7: Remaining Time (s)
Output Channel 8: Remaining Time (min)
Output Channel 9: Remaining Time (h)

Output Channel 10: Current Fuel Level (L)


How to Change the Output for Your Microcontroller:

If you want to change the output method (for example, displaying values on a dial), follow these simple steps (The example can be seen in one of the screenshots.):

1) Add a New Output:
Open your microcontroller settings and add a new output channel for the dial.

2) Remove Composite Output:
Delete the existing composite output that you no longer need.

3) Connect Logic Element:
Connect a "composite read" logic element to Lua script. This element will allow you to access the desired output channels.

4) Select the Desired Channel:
In the "composite read" element settings, choose the specific channel you want to display on the dial.

5) Output the Value:
Connect "composite read" to the output.

You can create as many output channels as needed.
By following these steps, you can easily customize the output display to fit your needs!


The microcontroller includes tooltips that are visible when hovering over it. This means that if you don't need to display the values, you can simply learn them by hovering over the microcontroller.