What do you mean, no one knows?
I mean that I've asked not only here, but on reddit and other communities and the answers that I get back are old discussions with no definitive conclusion or old tools that give inaccurate results. No one has said "JGRPP works differently" or "here is the math that is used" or "the game also accounts for these variables." Yours is the most definitive answer I've got thus far, and it's little more than "it's in the code." So, if no one is able to answer my question, then I must conclude that no one knows. It's not a personal attack on the community or anyone in particular; maybe the person or people who knows how it works are no longer active in OpenTTD. That's fine if that's the case, not like anyone's getting paid for this.
Unfortunately, I'm not a programmer (or a mathematician, or physicist, or any sort of technically trained person), so I don't have a clue where to even begin to look in the source code for the information, or even which code to look at. I hadn't considered your point that an equation will not match the game code perfectly. What I have right now isn't even close enough to be considered an approximation, though, so I don't think that's the problem. Maybe I would be better off to record data from in-game testing and derive an approximation from that? I don't know, I've been figuring this all out on my own (including Excel), so I'm just trying to get some help.