
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
Latitude/longitude spherical geodesy formulae and scripts.
$ npm install mt-latlon
The module exposes the LatLon class which represents a point on the earth's surface. With this class you can create LatLon objects on which you can perform various operations.
var LatLon = require('mt-latlon');
var point = new LatLon(51.5136, -0.0983);
The available operations of the LatLon objects is listed below.
Creates a point on the earth's surface at the supplied latitude/longitude.
var point = new LatLon(51.5136, -0.0983);
Returns the distance from this point to the supplied point, in km (using Haversine formula). Source: Haversine formula - R. W. Sinnott, "Virtues of the Haversine", Sky and Telescope, vol 68, no 2, 1984.
var p1 = new LatLon(51.5136, -0.0983);
var p2 = new LatLon(51.4778, -0.0015);
var dist = p1.distanceTo(p2);
// => 7.794
Returns the (initial) bearing from this point to the supplied point, in degrees. (see http://williams.best.vwh.net/avform.htm#Crs)
var p1 = new LatLon(51.5136, -0.0983);
var p2 = new LatLon(51.4778, -0.0015);
var brng = p1.bearingTo(p2);
// => 120.67420693455165
Returns final bearing arriving at supplied destination point from this point; the final bearing will differ from the initial bearing by varying degrees according to distance and latitude.
var p1 = new LatLon(51.5136, -0.0983);
var p2 = new LatLon(51.4778, -0.0015);
var brng = p1.finalBearingTo(p2);
// => 120.74995889218458
Returns the midpoint between this point and the supplied point. (see http://mathforum.org/library/drmath/view/51822.html for derivation)
var p1 = new LatLon(51.5136, -0.0983);
var p2 = new LatLon(51.4778, -0.0015);
var p3 = p1.midpointTo(p2);
// p3 = 51°29′45″N, 000°03′00″W (as LatLon object)
Returns the destination point from this point having travelled the given distance (in km) on the given initial bearing (bearing may vary before destination is reached). (see http://williams.best.vwh.net/avform.htm#LL)
var p1 = new LatLon(51.5136, -0.0983);
var p2 = p1.destinationPoint(120, 10);
// p2 = 51°28′07″N, 000°01′36″E (as LatLon object)
Returns the point of intersection of two paths defined by point and bearing. null is returned if no unique intersection is defined.
(see http://williams.best.vwh.net/avform.htm#Intersection)
var p1 = new LatLon(51.5136, -0.0983);
var p2 = new LatLon(51.4778, -0.0015);
var p3 = LatLon.intersection(p1, 120, p2, 10);
// p3 = 51°28′43″N, 000°00′05″W
Returns the distance from this point to the supplied point, in km, travelling along a rhumb line. (see http://williams.best.vwh.net/avform.htm#Rhumb)
var p1 = new LatLon(51.5136, -0.0983);
var p2 = new LatLon(51.4778, -0.0015);
var dist = p1.rhumbDistanceTo(p2);
// => 7.794
Returns the bearing from this point to the supplied point along a rhumb line, in degrees from North.
var p1 = new LatLon(51.5136, -0.0983);
var p2 = new LatLon(51.4778, -0.0015);
var dist = p1.rhumbBearingTo(p2);
// => 120.71209100924256
Returns the destination point from this point having travelled the given distance (in km) on the given bearing along a rhumb line.
var p1 = new LatLon(51.5136, -0.0983);
var p2 = p1.rhumbDestinationPoint(120, 10);
// p2 = 51°28′07″N, 000°01′36″E (as LatLon object)
Returns the loxodromic midpoint (along a rhumb line) between this point and the supplied point. (see http://mathforum.org/kb/message.jspa?messageID=148837)
var p1 = new LatLon(51.5136, -0.0983);
var p2 = new LatLon(51.4778, -0.0015);
var p3 = p1.rhumbMidpointTo(p2);
// p3 = 51°29′45″N, 000°03′00″W (as LatLon object)
Returns the latitude of this point; signed numeric degrees if no format, otherwise format and dp as per Geo.toLat().
d, dm, dmsvar p1 = new LatLon(51.5136, -0.0983);
var lat = p1.lat();
// => 51.5136
lat = p1.lat('d');
// => 51.5136°N
lat = p1.lat('dm');
// => 51°30.82′N
lat = p1.lat('dms');
// => 51°30′49″N
lat = p1.lat('d', 2);
// => 51.51°N
Returns the longitude of this point; signed numeric degrees if no format, otherwise format and dp as per Geo.toLon().
d, dm, dmsvar p1 = new LatLon(51.5136, -0.0983);
var lon = p1.lon();
// => -0.0983
lon = p1.lon('d');
// => 000.0983°W
lon = p1.lon('dm');
// => 000°05.90′W
lon = p1.lon('dms');
// => 000°05′54″W
lon = p1.lon('d', 2);
// => 000.10°W
The original code was written by Chris Veness and can be found at http://www.movable-type.co.uk/scripts/latlong.html. It is released under the simple Creative Commons attribution license (http://creativecommons.org/licenses/by/3.0/).
This project is released under the MIT license.
FAQs
Latitude/longitude spherical geodesy formulae and scripts.
We found that mt-latlon demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.