Well, what began as a little experiment went a bit wild and this is the result.
EconoMeter is a fuel consumption meter for LFS. It tries to emulate behavior of onboard computers that can be found in standard road cars. It uses InSim and OutGauge to get data from LFS and displays fuel consumption in LFS. EconoMeter is written in C++ using MaKaKaZo's CInsim and the code should be fully multiplatform.
To run it on Windows you'll need MSVC++ 2008 Redistributable to be installed.
Features:
- Displays instant consumption in l/100 km or MPG
- Displays instant consumption in l/hr or gal/hr
- Displays average consumption and projected range
Usage:
- Edit following lines in "cfg.txt" file in LFS directory to enable OutGauge
You can set different values if you know what you're doing, but then the default settings of EconoMeter won't work.
- Launch LFS like "LFS /insim=29999" or type "/insim=29999" in LFS to enable InSim
- Launch EconoMeter, if you did everything right you should see EconoMeter running when you leave garage.
Controls:
- Click on the "Mode" button to toggle between "Instant consumption per distance", "Range", "Average consumption" and "Instant consumption per hour".
- Click on the "Reset" button to reset the average consumption counter. This button actually resets the whole application so you might try using it if you feel that the data displayed by EconoMeter is wrong. In that case you should also report a bug here
- Click on the "Config" button to open EconoMeter's configuration. You can use "U, D, L and R" buttons to change position of the interface or change units in which consumption and range are displayed by clicking on "Units". Clicking on "Back" saves these settings to "ecmeter.cfg" file and closes config mode.
The attached ZIP archive contains an .EXE file and a MSVS2008 project. Whoever wishes to use or modify the source in any way is by all means allowed to do so.
EconoMeter v0.051
-Fixes a corrupted instant consumption readout when units are set to MPG and instant conspumtion is 0.0l/100 km
EconoMeter v0.05
-Takes advantage of PLID info in OutGauge packet - it's now able to tell cars apart and the average consumption and range readings don't get messed up when you switch view to another car. Please note that EM receives data for one car at a time only, so consumption readings of not viewed cars don't get updated until you switch to one of them.
-Bunch of small fixes here and there
EconoMeter v0.04
-Added optional output to external window (somewhat experimental though)
-Code cleanup and reorganization, UDP connection tweak, increased responsiveness
Output to external window has to be enabled in the config file first
EconoMeter v0.03
-Added configuration file
-Interface can now be moved
Please note that as of now EconoMeter doesn't take any command line arguments, use the "ecmeter.cfg" file instead.
EconoMeter v0.02
-Added better WinSock error reporting
-Improved interface appearance
-Code cleanup
-Added some better code comments
-Added fuel/hour mode
EconoMeter v0.01
- First test (does it actually work for someone?)
(Thanks to MaKaKaZo for his CInSim lib and DarkTimes for useful pointers about OutGauge)
EconoMeter is a fuel consumption meter for LFS. It tries to emulate behavior of onboard computers that can be found in standard road cars. It uses InSim and OutGauge to get data from LFS and displays fuel consumption in LFS. EconoMeter is written in C++ using MaKaKaZo's CInsim and the code should be fully multiplatform.
To run it on Windows you'll need MSVC++ 2008 Redistributable to be installed.
Features:
- Displays instant consumption in l/100 km or MPG
- Displays instant consumption in l/hr or gal/hr
- Displays average consumption and projected range
Usage:
- Edit following lines in "cfg.txt" file in LFS directory to enable OutGauge
OutGauge Mode 1 (or 2)
OutGauge IP 127.0.0.1
OutGauge Port 30000
You can set different values if you know what you're doing, but then the default settings of EconoMeter won't work.
- Launch LFS like "LFS /insim=29999" or type "/insim=29999" in LFS to enable InSim
- Launch EconoMeter, if you did everything right you should see EconoMeter running when you leave garage.
Controls:
- Click on the "Mode" button to toggle between "Instant consumption per distance", "Range", "Average consumption" and "Instant consumption per hour".
- Click on the "Reset" button to reset the average consumption counter. This button actually resets the whole application so you might try using it if you feel that the data displayed by EconoMeter is wrong. In that case you should also report a bug here
- Click on the "Config" button to open EconoMeter's configuration. You can use "U, D, L and R" buttons to change position of the interface or change units in which consumption and range are displayed by clicking on "Units". Clicking on "Back" saves these settings to "ecmeter.cfg" file and closes config mode.
The attached ZIP archive contains an .EXE file and a MSVS2008 project. Whoever wishes to use or modify the source in any way is by all means allowed to do so.
EconoMeter v0.051
-Fixes a corrupted instant consumption readout when units are set to MPG and instant conspumtion is 0.0l/100 km
EconoMeter v0.05
-Takes advantage of PLID info in OutGauge packet - it's now able to tell cars apart and the average consumption and range readings don't get messed up when you switch view to another car. Please note that EM receives data for one car at a time only, so consumption readings of not viewed cars don't get updated until you switch to one of them.
-Bunch of small fixes here and there
EconoMeter v0.04
-Added optional output to external window (somewhat experimental though)
-Code cleanup and reorganization, UDP connection tweak, increased responsiveness
Output to external window has to be enabled in the config file first
EconoMeter v0.03
-Added configuration file
-Interface can now be moved
Please note that as of now EconoMeter doesn't take any command line arguments, use the "ecmeter.cfg" file instead.
EconoMeter v0.02
-Added better WinSock error reporting
-Improved interface appearance
-Code cleanup
-Added some better code comments
-Added fuel/hour mode
EconoMeter v0.01
- First test (does it actually work for someone?)
(Thanks to MaKaKaZo for his CInSim lib and DarkTimes for useful pointers about OutGauge)