So i was getting low on my fuel gauge and my mileage indicator said i have 25 miles left. Well with in 5 miles it went to 0 miles left and then i ran out of gas, my question is where does the computer get its information on miles left from the fuel gauge ? What could be off the sender in the tank not accurate ? Or is it using the overall life average fuel mileage ?
I think it uses the level sensor in the tank as well as averaging the injector flow rate, vehicle speed, time, etc.
I watch my vitals closely to proactively spot issues and can fairly accurately calculate the fuel's alcohol content based on MPG. So, I'm very familiar with the actions of my fuel gauge. For a few months, I found that when I was around 1/4 tank or less and accelerated hard from a stop, it'd bog, nose down, then come back to life. It'd immediately be resolved once I added fuel and would repeat when the level got back down, getting worse the closer to "E" the gauge read.
The pump is in a bucket that should stay full even if the tank level is low. I thought the bucket was leaking, leaving the pump at the mercy of the fuel level in the tank and the fuel was sloshing to the back on those hard accelerations. I dropped the tank to replace the entire pump assembly (~200K, so why not?). When I started the job, the gauge read 1/4 tank. When I dropped the tank, I found it had maybe an inch or so of fuel in the bottom- much less than 1/4 tank.
After installing the new pump module, the gauge was hąrd on "E". I tested the original level sensor and found the impedance scaled as it should for the first ~3/4 of it's travel down from full. Then, somewhere around 1/4 tank, it'd go to infinite/open circuit. What was happening was that I was much lower on fuel than I was lead to believe and was running the bucket dry since it couldn't replenish from the tank during accelerations.
If the gauge relied solely on level sensor in the tank, it would've plummeted from 1/4 tank to "E" when the fuel got that low. What it does, maybe as a backup, maybe as a smoothing function or maybe as some other function, is uses calculations to estimate the remaining amount of fuel. When the fuel is that low, its calculated guess can only be so accurate, especially if driving like an ass. Or, in your case, pulling a trailer. MPG and miles to empty is constantly being averaged. Pulling a trailer for 50 miles compared to the hundreds or thousands of miles prior unloaded means that trailering mileage will be a very small factor in those calculations. Idling returns 0 MPG, so that will drag down your average MPG calculations. As soon as you start driving again, it should recover fairly quickly and the longer you drive, the more accurately it'll calculate your driving MPG. Since the fuel level is constantly changing, this won't (can't?) be as accurate.
You running out of gas could be due to this or a failed/failing fuel level sensor or a combination of both.