-
Notifications
You must be signed in to change notification settings - Fork 1
1. Model and Engine
There are two main views: the 2D map view that is more akin to a standard map UI and the AR view in which nearby posts will be visible as if they were a part of the real world.
The 2D map view will be generated using Mapbox SDK for Android by providing it the GPS location of the device along with the locations of the nearest pins. The user's location is needed so the map view can zoom in to the right area of the world while the nearest pin locations are need to appear as pins on the map UI.
The AR view will be facilitated by ARCore-Location, which will only need the locations of the nearby posts. The user's location is not needed since the camera will act as the main interface, which will already be "snapped" to the location of the user unlike the 2D map view since it is taking direct input from the camera. The nearby post locations are still needed for the pins to appear in AR for the user to interact with in a 3D space.
This service can primarily be split into two categories: posting pins and getting pins.
Posting pins requires the user ID and the image but also the location as latitude and longitude. The city of the location is then found by using the Google Maps API, which is important for the sake of being able to index posts by city. The ability to index posts by city greatly alleviates computational pressure in the processes of getting nearby pins.
The main difficulty in getting pins is in determining which pins are nearby. The posts being indexed by city helps to heavily reduce the amount of posts that this service needs to look through to determine the distance to the user. The distance to the user is calculated using the Google Maps API. Once a set of nearby posts are determined, they are returned for the Mapbox view or the ARCore-Location view to show in the frontend.
This service is simply to deal with friends and friend requests. Using only user IDs, friends can be viewed and friend requests can be made, accepted, or rejected.
Firestore will be where we store all of our server-side data. We will use Cloud Functions to act as the services.

