Closed WZWren closed 1 year ago
Experimenting with the truncate method on both the frontend and backend has resulted in the natural movement of the grid space to be defined by the bottom left point of the grid instead. A bug with negative values of LatLng has resulted in the use of Floor instead of Truncate afterwords.
Additionally, negative values are stored by keeping the direction value as part of the Degree of the item, while keeping the magnitude of the Minute in the same direction. This has the consequence of representing negative values in an unintuitive format - 1° 50' S would be expressed as -2° 10' in the program. However, as the DMS is never publicly exposed to the users, this implementation is kept, as it simplifies the comparison calculation.
A location-sensitive feed would benefit the crowdsource feed by providing a very natural way to filter out user data.
If the LatLong is converted into a grid, we can map nearby users as those who are in and adjacent to the grid tile that our target is currently on, as demonstrated below.
We can have the app assign the top-left point of each grid space to be the name of the space. The app will subscribe to the grid the user is assigned to, which receives information from the backend when an adjacent cell receives a new feed.