Next / Previous / Contents / TCC Help System / NM Tech homepage

7. dmsUnits: Converter to and from degrees, minutes, and seconds

Global to this module is an instance of MixedUnits named dmsUnits, which is a facility to allow conversion to and from two mixed-unit systems used throughout: hours/minutes/seconds and degrees/minutes/seconsd, which happen to have the same factor list, namely, (60, 60).

For example, to convert 14.876 hours to mixed units and back:

>>> dmsUnits.singleToMix(14.876)
(14, 52, 33.599999999998005)
>>> dmsUnits.mixToSingle(_)
14.876