Wi-Fi trilateration (also referred to as multi-lateration) is the technique used to estimate the position of a client’s device based on relative distance from the positions of available Wi-Fi access points. This is in contrast to Wi-Fi triangulation, which determines positioning based on the angles of arrival (AoA) of signals received by the antennae of the access points. In this post, you'll see Wi-Fi Trilateration using Node.js (It’s different from triangulation)
Wi-Fi trilateration (also referred to as multi-lateration) is the technique used to estimate the position of a client’s device based on relative distancefrom the positions of available Wi-Fi access points. This is in contrast to Wi-Fi triangulation, which determines positioning based on the anglesof arrival (AoA) of signals received by the antennae of the access points.
In the above image, you can see three GPS satellites with a certain radius. Suppose your location is within the range of all three of these satellites. Based on the position and radius of these three access points, your potential position can be determined using trilateration by finding the point at which they all intersect.
For Wi-Fi trilateration, you can imagine these satellites as wireless access points, and you are able to reach all of them. This means that your device is in range of all these access points. The space in which these access points meet is the space that your device falls under.
Picture this scenario. You are trying to make a script that will grab a user’s geographic location (latitude and longitude) and use those coordinates to recommend restaurants nearby. To do this in the browser, you would use the
Location object. However, you cannot access the browser’s location via the command line.
Here’s what we’ll need.
**node-wifiscanner**— This npm package is what will be used to gather wireless access points near you. You can install it by doing
npm install node-wifiscanner.
**node-fetch**— Once we get our wireless access points, we will make a POST request, using fetch. Since the fetch API is not implemented in Node.js, we will need to run
npm install node-fetch to download the npm package. Once you’ve done that, we can make our request to the Google Geolocation API.
Node.js N-API Team meeting
Learn what are the most important API security threats engineering leaders should be aware of and steps you can take to prevent them
A Guide to Hire Node.js Developers who can help you create fast and efficient web applications. Also, know how much does it cost to hire Node.js Developers.
Building A Rest API Using Node JS will help you understand the concept of RESTful APIs and also show you how to implement this in your real world web applications.
You may already be aware that Raygun uses Node.JS for our API nodes that receive your precious crash reporting data (we also do node.js crash reporting if you’re interested). We’ve peaked in the past at more than 110,000 requests per second coming...