Two of our group members, Pavan and Kyle, are avid long-distance runners. Before the COVID-19 pandemic began, they often met up in-person to run together. This "buddy system" kept them accountable for staying consistent, which allowed them to make progress on their times. This positive peer pressure also allowed them to push each other during every run, allowing them to pace each other and hit split times that would have been impossible to do if they were running solo.
Then, everything changed.
When the pandemic struck, in order to protect the health of themselves and their families, Pavan and Kyle decided to stop running together in person. However, when it came to running solo, they quickly found out that they didn't have as much motivation to stay consistent. Without positive peer pressure, they were much more likely to sink back into their couch, rather than grabbing their sneakers and heading out for a run. Even when they did manage to go on a run, their split times increased because they didn't have another person to push them. As a result, their run times got worse (and they even put on a little weight). We also quickly realized that this problem existed outside of just a pandemic. If 2 RunningMates who wanted to run together simply lived far from each other, it would be a great inconvenience to meet up to run.
Running has been shown to have countless great health benefits. Furthermore, running with a Mate makes the process fun and easier. To us, the only thing standing in the way of being able to stay healthy and run with a Mate is sheer distance and social distancing. In this way we stumbled upon the problem of being able to "run together, from afar." Our app attempts to solve that.
What it does
It all starts with Mate 1 who initiates a run on the welcome screen. They will have various options, including which Mate they want to run with, the distance they want to run, and what direction they would like to run. After collecting this information, the app sends the data to a server. Here, we have used the Google-Maps API to automatically calculate a path that is equal to the exact distance that the Mate 1 would like to run. They will receive directions and a final destination. After this, the server collects the starting location from Mate 2. Also using the Google-Maps API, the path is calculated for Mate 2 in a similar way. This path will be the same distance that Mate 1 selected previously.
While both of these paths are different (based on the roads/paths that are in the surroundings of each different Mate), they will be the same distance, guaranteeing that the Mates will be able to run together. Also, in order to avoid stranding the users far from their starting location after they have finished their run, our app will calculate the path so that the final destination is within 100 meters of the starting location.
Next, the run will be started. Using socket.io, we were able to transmit the real-time locations of each mate to a server. Here, we calculate how far each Mate has ran along their respective routes, as well as their current velocities. Then, we transmit this data to the other Mate, so each user can keep track of how fast and how far the other has ran. This simulates the experience of running with a parter in real life, but from afar.
After the run is finished, the data will be saved for each Mate, allowing them to check information about their previous runs, such as who they ran with, split times, max speed, etc.
How we built it
Using Facebook’s React Native Framework, we created a cross-platform (Android and IOS) app which connects to the Python backend. We used the Google Maps API and Google Cloud API to retrieve information about the user’s current location as well as creating a path for both users to run on. We also used Socket.IO to communicate real-time information about both users’ location and pace information.
Challenges we ran into
We had to figure out how to reverse engineer the Google Maps API in order to create a final route/path based on an input of distance, which is contrary to the way most applications of the Google Maps API work. Furthermore, it took a collective group effort of several hours to figure out how to use Socket.io to transmit real-time data between users and servers. Creating algorithms to figure out estimated distances was also challenging as we had to take into account factors that we did not even think about originally, such as having to account for the curvature of Earth when finding the distance between longitude/latitude coordinates.
Accomplishments that we're proud of
Our app has a nice UI that we worked hard on. We also were able to solve the unique problem of calculating a route based on distance, while it usually works the other way around. We were able to calculate different paths for 2 different people that were the same distance. It was one of our group members' first hackathon so they never had the experience of being in a high pressure situation where the final product needs to be completed in such a short time. Overall we are just happy we learned this much, while also making an app that some of us plan on using after this hackathon is over.
What we learned
We learned how to take an idea to a MVP (minimum-viable-product). We also learned how to connect a mobile front-end to a back-end system using HTTP requests. Integrating the many APIs was also valuable experience we gained.
What's next for RunningMate
We would like to add even more customizable options to the initial screen. For instance, our app does currently work even for short distance sprints (100m, 200m, etc.). However, since our current options are designed around a long-distance run, the differences in distance that each person would have to run are often off by 10 meters or so, since the Google-Maps API cannot account for how straight the streets are and other factors that can affect the length of each "Mate's" run. While these disparities won't have an effect on most long-distance runs, they have a relatively larger impact on short-distance runs.
Also, we would like to add more health-tracking features to make our app more useful to people who are looking to stay healthy. For instance, we would like to add integration to heart-rate monitoring and step counting from health-tracking devices, such as a Fitbit or an Apple Watch.