Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
@mmit/latlong
Advanced tools
Lightweight library for common latitude and longitude calculation
Weekly downloads
Readme
This library supports both, the "Haversine" and the "Vincenty" algorithm.
"Haversine" is a bit faster but "Vincenty" is far more accurate!
Catmull-Rom algorithm is used for smoothing out the path.
const distance = new Distance();
// km = 423
const km = distance.as(LengthUnit.Kilometer,
new LatLng(52.518611,13.408056),new LatLng(51.519475,7.46694444));
// meter = 422591.551
const meter = distance.distance(
new LatLng(52.518611,13.408056),
new LatLng(51.519475,7.46694444)
);
const distance = new Distance();
const distanceInMeter = Math.round(EARTH_RADIUS * Math.PI / 4));
const p1 = new LatLng(0.0, 0.0);
const p2 = distance.offset(p1, distanceInMeter, 180);
// LatLng(latitude:-45.219848, longitude:0.0)
console.log(p2.round());
// 45° 13' 11.45" S, 0° 0' 0.00" O
console.log(p2.toSexagesimal());
// zigzag is a list of coordinates
const path = new Path.from(zigzag);
// Result is below
const steps = path.equalize(8,smoothPath: true);
For more - check out my tests
FAQs
Lightweight library for common latitude and longitude calculation
The npm package @mmit/latlong receives a total of 42 weekly downloads. As such, @mmit/latlong popularity was classified as not popular.
We found that @mmit/latlong demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.