Skip to content

Drivetech/dmm-parser

Repository files navigation

@drivetech/dmm-parser

npm version npm downloads Build Status Coverage Status Maintainability dependencies Status devDependencies Status

Parser for latitude and longitude in DMM format.

Example: '3321.6735,S' -> -33.361225

Installation

$ npm i @drivetech/dmm-parser

Use

Try on Tonic

const dmm = require('@drivetech/dmm-parser');

dmm.degToDec('3321.6735,S'); // -33.361225
dmm.degToDec('07030.7640,W'); // -70.51273333333333
dmm.latToDmm(-33.361225, 4); // '3321.6735,S'
dmm.lngToDmm(-70.51273333333333, 4); // '07030.7640,W'

License

MIT

About

Parser for latitude and longitude in DMM format

Resources

License

Stars

Watchers

Forks

Packages

No packages published