google / open-location-code

Open Location Code is a library to generate short codes, called "plus codes", that can be used as digital addresses where street addresses don't exist.
https://plus.codes
Apache License 2.0
4.06k stars 471 forks source link

OLC inconsistent reference to Earth equatorial circumference #449

Closed fulldecent closed 2 months ago

fulldecent commented 3 years ago

The document/specification/notes refer to the Earth as having a circumference of 111321 meters per degree of latitude.

NB: This table assumes one degree is 111321 meters, and that all distances are calculated at the equator.

https://github.com/google/open-location-code/blob/d47d9f9b95e9f306628396e1b30aaf275f83a5d4/docs/specification.md#code-precision

However, elsewhere it is specified that plus codes are predicated over the WSG 84 standard.

The WSG 84 geoid sets the semi major axis at 6 378 137.0 m. (Sorry, can't find actual reference for this // https://en.wikipedia.org/wiki/World_Geodetic_System)

That means one degree is 6378137.0 2 π / 360 ≈ 111319.49.


Of no consequence. But still, all standards should be written consistently and in the voice of an expert who cares more about all the things you are implementing than you do.

bocops commented 3 years ago

Nothing in that statement claims that it refers to WGS84 - and if it did, I would question the correctness of using the exact semi-major axis value but not the semi-minor axis value for a calculation that tries to roughly approximate lengths not only along the equator but also perpendicular to it.

Considering that

I'd say that, by all means, let's split the difference and call it 111320m, or 111257m if we use the average between semi-major and semi-minor, or 111194m if we base our calculation on what Wikipedia claims is the "mean radius" of Earth... or let's stop pretending that any of these values is really "better" than the others and that not using it is a sign of abundant sloppiness.

in the voice of an expert who cares more about all the things you are implementing than you do

Just BTW, this is borderline insulting and IMO uncalled for.

fulldecent commented 3 years ago

Regarding tone.

Very insulting! And ambiguous!!!

in the voice of an expert who cares more about all the things you are implementing than you do

This is meant to mean the person who writes the standard (us, you and me, everybody here) should care more than anybody reading the document (implementors, the public, baseline humans) about any detail written down.

Sorry for that confusion.

(The insulting, unintended alternate meaning reads as a personal attack against a "you" some person here.)


WGS84 is referred in:

In my draft (PR coming), I am using the wording like "< XXX meters" so that the statement has a more concrete meaning. I will also check the correct equatorial distance.

fulldecent commented 3 years ago

This issue is fixed (actually, obviated) at https://github.com/google/open-location-code/pull/463