If you want to be pedantic, I can do that.Hmmm. So, starting at say 9900' current elevation, highest point 10000', and destination elevation 0' (you didn't mention destination), and the reverse trip 0->10000->9900, you'd use the same energy? I'd be surprised, but then again you know rocket launches. I'd probably gone for an integral calculation over the road elevation changes for the trip. And with the weight of the car being roughly 6000 lbs, wouldn't four adults plus luggage make for more than a 10% difference in mass? I was thinking, though, that in many of the previous discussions on this topic, people have reported that wind speed and direction, road conditions, use of HVAC played a significant factor. Oh, and tires and tire air pressure and effect on rolling resistance. Seemed to be more of a multivariate problem to me.
As previously mentioned, the ABetterRoutePlanner site seems to do its calculations on range based on many of these factors and include battery degradation. As previously discussed, it would be great to have more accurate and dynamic range information available for road trips. But for me, the more significant concern is around being able to find working and available charging infrastructure along my long distance route such that I can travel more miles in a day, spend less time cursing about people who need to charge to 100% or leave their cars fully charged and taking up a charging spot or finding out of service units. Now if you have a nice algorithm in mind to handle that aspect of range planning, send me the code and I'll do a code review.
Wind speed, tire pressure, roof racks, if the car has been washed, if the widows are rolled down, if I'm listening the The Wall at 11, whatever you want to throw at the problem, save change in elevation, is going to be resolved by the current efficiency calculation. is it 3 mi/kWh? or 4? Don't care. The car already resolves this and it has been shown to be pretty accurate. Because energy is a scalar, I can simply add the quantities for electrical, potential and kinetic energy together. Kinetic energy is by virtue of the car moving through a fluid. The car's estimate is presently summing the kinetic and electrical energy in its efficiency calculations, but what it lacks is an estimate of the potential energy.
Estimating mass is possible, but probably little more than a noise generator. But the car definitely knows if seats are occupied, etc. Are there sensors on the shocks to estimate the load? I confess I don't know. I could find out, but you know what, this has already gotten silly.
Before ABRP was ever a thing I made a spreadsheet to perform these calculations and using the origin, peak and destination elevations got me within a mile for the drive from SF to Tahoe, assuming 80% recaptured on the downhill portions. As you suggest, a piecewise integration is an option and I'm sure that's what ABRP uses, but it may be driving in a thumbtack with a sledgehammer, too.
Honestly, I wouldn't care if all EV manufacturers would give up on range estimates and just use ABRP if I had access to it in the cockpit while driving. But you know.... ABRP doesn't include the Touring or the Pure as selections, just the GT. And Lucid doesn't support Android Auto, so, I'm SOL unless I get a new phone.
As for coding, I confess I haven't actually coded since FORTRAN 77 was the preferred solution for such problems. I forgot to use the sarcasm font in my original post.
This forum is starting to feel al ot like the Tesla forums. So many fanbois that are unable to critical look at the car they are driving and create a cult of personality.
I'm frankly disappointed in the direction this took, but I stand by my current statement. A range estimate the is void of the topography is useless for any driving scenario with significant altitude changes. Ya'll defending otherwise are kool-aid drinkers.