Comparing version 0.3.1 to 0.3.2
@@ -1,3 +0,7 @@ | ||
* _2016-08-13_: Added retire.js (HEAD -> master) [Øistein Sørensen] <a href="http://github.com/5orenso/geo-lib/commit/2f0812bbe3a96439532a016aed74375d40ed272f">view commit</a> | ||
* _2016-08-12_: Fix #2: Doc updated (origin/master) [Øistein Sørensen] <a href="http://github.com/5orenso/geo-lib/commit/54e9b9b92401cab0b778d66dc42a4f6dcd1bf5f0">view commit</a> | ||
* _2019-06-28_: Updated docs. (HEAD -> master, origin/master) [Oistein Sorensen] <a href="http://github.com/5orenso/geo-lib/commit/17b92ee54d1c383e1e7b3b3fb125798715ead918">view commit</a> | ||
* _2016-08-13_: Bumped version. (tag: 0.3.1) [Øistein Sørensen] <a href="http://github.com/5orenso/geo-lib/commit/be186a133cea75f77e65d3071c66899cbe2a792e">view commit</a> | ||
* _2016-08-13_: Added missing files. [Øistein Sørensen] <a href="http://github.com/5orenso/geo-lib/commit/f6823102f433e960ea0e67a00f2ed6a58059cc4c">view commit</a> | ||
* _2016-08-13_: Updated version (tag: 0.3.0) [Øistein Sørensen] <a href="http://github.com/5orenso/geo-lib/commit/40aa2d1eecf9071576997343254f0f93b068b503">view commit</a> | ||
* _2016-08-13_: Added retire.js [Øistein Sørensen] <a href="http://github.com/5orenso/geo-lib/commit/2f0812bbe3a96439532a016aed74375d40ed272f">view commit</a> | ||
* _2016-08-12_: Fix #2: Doc updated [Øistein Sørensen] <a href="http://github.com/5orenso/geo-lib/commit/54e9b9b92401cab0b778d66dc42a4f6dcd1bf5f0">view commit</a> | ||
* _2016-08-12_: Fix #2. Removed bin links. They are not used. [Øistein Sørensen] <a href="http://github.com/5orenso/geo-lib/commit/2e644c8ed737df524c7827b84b988b0220c8bf13">view commit</a> | ||
@@ -4,0 +8,0 @@ * _2016-08-05_: Added download info. [Øistein Sørensen] <a href="http://github.com/5orenso/geo-lib/commit/dcb74295c63fc8b7b25c9b40f2c6d8351efb4066">view commit</a> |
@@ -41,3 +41,3 @@ /* | ||
let distanceKm = earthRadius * 2 * Math.atan2(Math.sqrt(centralAngle), Math.sqrt(1 - centralAngle)); | ||
return (distanceKm).toFixed(2); | ||
return distanceKm; | ||
} | ||
@@ -121,3 +121,3 @@ | ||
); | ||
distance = (distance / 1000).toFixed(2); | ||
distance = distance / 1000; | ||
} else { | ||
@@ -133,6 +133,6 @@ distance = distanceHaversine(opt.p1, opt.p2); | ||
result.timeUsedInSeconds = opt.timeUsed; | ||
result.speedKph = Number((result.distance / (opt.timeUsed / 3600)).toFixed(2)); | ||
result.speedMph = Number((result.speedKph * 0.621371).toFixed(2)); | ||
result.speedKph = Number(result.distance / (opt.timeUsed / 3600)); | ||
result.speedMph = Number(result.speedKph * 0.621371); | ||
// mpk = 60 ÷ (kph) | ||
let mpkSec = (60 / result.speedKph * 60).toFixed(0); | ||
let mpkSec = (60 / result.speedKph * 60); | ||
let mpkMin = Math.floor(mpkSec / 60); | ||
@@ -139,0 +139,0 @@ result.speedMpk = mpkMin + ':' + (mpkSec % 60); |
{ | ||
"name": "geo-lib", | ||
"description": "A Node.js module with useful geo functions. Made with performance in mind.", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"homepage": "https://github.com/5orenso/geo-lib", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -168,24 +168,29 @@ # Geo-lib module for fast calculations of distance, speed and heading | ||
```bash | ||
$ npm install -g npm-check-updates | ||
$ ncu -u | ||
$ npm install --save --no-optional | ||
$ sudo npm install -g npm-check-updates | ||
$ ncu -u -a | ||
$ npm install --no-optional | ||
``` | ||
### HOWTO upgrade dev environment | ||
```bash | ||
$ npm install buster --save-dev | ||
$ npm install buster-istanbul --save-dev | ||
$ npm install grunt --save-dev | ||
$ npm install grunt-buster --save-dev | ||
$ npm install grunt-contrib-jshint --save-dev | ||
$ npm install grunt-contrib-nodeunit --save-dev | ||
$ npm install grunt-contrib-watch --save-dev | ||
$ npm install grunt-coveralls --save-dev | ||
$ npm install grunt-jscs --save-dev | ||
$ npm install grunt-nodemon --save-dev | ||
$ npm install grunt-shell --save-dev | ||
$ npm install grunt-jsdoc --save-dev | ||
$ npm install grunt-retire --save-dev | ||
``` | ||
## Contributions and feedback: | ||
We ❤️ contributions and feedback. | ||
If you want to contribute, please check out the [CONTRIBUTING.md](CONTRIBUTING.md) file. | ||
If you have any question or suggestion create an issue. | ||
Bug reports should always be done with a new issue. | ||
## Other Resources | ||
* [AWS Basic setup with Cloudformation](https://github.com/5orenso/aws-cloudformation-base) | ||
* [AWS Lambda boilerplate](https://github.com/5orenso/aws-lambda-boilerplate) | ||
* [Automated AWS Lambda update](https://github.com/5orenso/aws-lambda-autodeploy-lambda) | ||
* [AWS API Gateway setup with Cloudformation](https://github.com/5orenso/aws-cloudformation-api-gateway) | ||
* [AWS IoT setup with Cloudformation](https://github.com/5orenso/aws-cloudformation-iot) | ||
## More about the author | ||
@@ -192,0 +197,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91168
200