The code assumes that latitude and longitude are always positive. If you are in China, I suppose this is true. But in the USA, longitude is going to be WEST and the convention is that negative numbers are used. Likewise, in the southern hemisphere, latitude will be negative. The affected code is this:
The code assumes that latitude and longitude are always positive. If you are in China, I suppose this is true. But in the USA, longitude is going to be WEST and the convention is that negative numbers are used. Likewise, in the southern hemisphere, latitude will be negative. The affected code is this:
In the USA, the longitude might print out something like this:
The suggested change is something like this: