![]() |
Quote:
|
Quote:
|
There is also another, top secret, zip code field, which only the assigner can access, that is used when calculating your distance to game sites for auto-assigning. Somehow mine got set to another state (perhaps I ticked off my assigner? :eek:), and when I got assigned games, I was due some very hefty mileage checks.
I have also been told that the algorithm for figuring mileage uses a fixed point within the zip code. In my case, that fixed point is many miles farther. I normally mapquest and google maps my journey, and pass that number along to the school. But some schools just use the number from the arbiter, and my check is a little bigger than normal. Can't help 'em out if they don't want the help, I guess. |
Quote:
|
Quote:
Ironically, the one sport where I have a definite list of partners I would block, won't allow blocking partners, but allows blocking schools. The one sport where I would really like to entirely block a certain school, won't allow blocking more than 3 individual teams (varsity/jv/soph/frosh and boys/girls are all listed separately). |
Quote:
I do it from the geographic center of the zipcode of the official to the geographic center of the zipcode of the school. Databases are available that give precise coordinates (latitude and longitude) of this geographic center. With this data, you can calculate the distance between two coordinates. The ramifications of this sort of approximation is that the driving distance can be off by +/- half the size of each zipcode.....plus the "as-the-crow-flies" approximation error. (I've been investigation even better methods of approximating distance that eliminates 1/2 zipcode errors). The distance from an official to a school in the same zipcode will come up as 0 miles. The distance between a school and an official who just live on opposite sides of the zipcode boundaries could be 10's of miles. On RefTown, however, I don't do it "as-the-crow-flies". I have another method that I created that more closely approximates real driving distances....still an approximation but typically with a smaller margin of error. To calculate precise mileages for all the possible addresses and routes is a pretty complicated and compute intensive task...something you don't really want when you load your page with 40-50 games. |
Sounds like a tough problem to solve, Camron. I just looked up my zip code, and it covers ...oh probably 2-3% of the state. My town is near the edge. Utah is kind of unusual in that the majority of the population live within a fairly narrow corridor running north/south through the center of the state. So the state is framed by huge zip code areas. And since I normally only get mileage when traveling to rural schools, that would seem to make the worst case scenario, the norm.
BTW, would it make more sense to calculate mileage once for each assignment and cache it, rather than calc it on the fly? |
Quote:
In fact, if I put the time in to do that, I'd probably take it a step farther and get zip+4 locations or actual address locations (Latitude/Longitude of the home/work and game locations) if I could find a usable source for the data. As it is, I do 6 trig functions, 4 floating point multiplies, and a couple other miscellaneous operations. That mileage function is not heavily used at this point so it is not that big of a issue. |
For our games, one driver gets paid round trip by the school, who also pays the game fee. For some schools I know the mileage and can fill it out by memory on the pay voucher, for others I set the trip gauge from my house and figure it that way.
It seems like some people are making this way harder than it really is. |
He Has A Loophole Named After Him ...
Quote:
|
All times are GMT -5. The time now is 08:01am. |