If degrees is zero, how should Degree Minute Second notation reflect the positive/negative hemisphere? What is the appropriate behavior when degree is zero? Basically this is a Signed Zero problem. https://en.wikipedia.org/wiki/Signed_zero
We have a software system in C/Python that converts GPS NMEA coordinates to DMS (degree (integer), minute (integer), second (float)). Normally hemisphere would be indicted by a positive or negative degree.
Given, for example, the University of Reading.
Decimal Degrees is 51.441400, -0.941800. DMS is 51°26'29.040000"N, 0°56'30.480000"W
Converting to integer, integer, float, we get:
longitude degree=0 minute=56 second=30.479999999999734
We lose hemisphere because no signed zero.
Is it appropriate to use negative minutes when degree is zero? Continuing, is it appropriate to use negative seconds if both degree and minute are zero?
For example: longitude degree=0 minute=-56 second=30.479999999999734
Using negative minutes, negative seconds (fixing the bug) would allow us to preserve backwards compatibility with existing code. Adding a "hemisphere" is an option but would imply dropping sign entirely which might cause backwards compatibility problems.