A DMS value is converted to decimal degrees using the formula: :\mathrm{D}_\text{dec} = \mathrm{D} + \frac{\mathrm{M}}{60} + \frac{\mathrm{S}}{3600} For instance, the decimal degree representation for :38° 53′ 23″ N, 77° 00′ 32″ W (the location of the
United States Capitol) is :38.8897°, −77.0089° In most systems, such as
OpenStreetMap, the degree symbols are omitted, reducing the representation to :38.8897, −77.0089 To calculate the D, M and S components, the following formulas can be used: :\begin{align} \mathrm{D} &= \operatorname{trunc}(\mathrm{D}_\text{dec},0) \\ \mathrm{M} &= \operatorname{trunc}(60 \times |\mathrm{D}_\text{dec} - \mathrm{D}|,0) \\ \mathrm{S} &= 3600 \times |\mathrm{D}_\text{dec} - \mathrm{D}| - 60 \times \mathrm{M} \end{align} where \mathrm{\left\vert D_{dec} - D \right\vert} is the
absolute value of \mathrm{ D_{dec} - D } and \mathrm{trunc} is the
truncation function. Note that with this formula only \mathrm{D} can be negative and only \mathrm{S} may have a fractional value. == See also ==