It’s snowing and I needed something to do. So I built a new Node.js library written in Typescript (with the help of Claude!)

Context: In the Journey app, I wanted a way to inform users of interesting POI’s in relation to where they were. For example, I am (standing | walking | cycling | driving) from point A to point B, there is an interesting story I want to hear about, in relation to my co-ordinates, bearing and speed, where is the POI in relation to me. This allows me to customize the story for the user. For instance: You may have just passed X, or, on your right is Y, or, about 2 miles to your south is Z.
The purpose of this library is two fold: One it personalizes the story to create a USP and two it gives context to the user as to where the POI is, in relation to themselves. Should they be looking out the window? Or Just understand that the POI is in the general vicinity. Piggy backing off that, the user can decide if they want to stop, explore or if close enough, take a detour to visit or view that POI.
Geo Relative Position (GRP) attempts to solve that by providing a library which lets developers provide a users coordinates (Lat, Long, Bearing and Speed) and a POI (Lat, Long) and returns the distance apart, the orientation in relation to the user (the user is heading East, the POI is South), relative position (on the users right, left, behind or ahead) and ETA until the POI comes into range (In 1KM the POI will be approaching X). In a story fashion, you can see how this may be helpful context for the listener. if you are interested in checking out the code, or reading more, check out Github and on Node Package Manager (npm)
You must be logged in to post a comment.