Okay, so I’ve been messing around with this idea of tracking how people move around during big events, you know, like festivals or concerts. The goal? To help the guys running these things figure out where the crowds are, how they’re moving, and all that jazz. It’s been a wild ride, let me tell you.
Getting Started
First off, I had to decide how the heck I was going to track people without being all creepy about it. I thought about cameras, but that seemed like a privacy nightmare. Plus, processing all that video? No thanks. Then it hit me: Wi-Fi! Everyone’s got their phones on them, right? And those phones are constantly pinging Wi-Fi networks.
So, I grabbed a couple of cheap Wi-Fi routers that could run custom firmware. After some serious Googling, I found this open-source firmware called OpenWrt. Seemed like the perfect fit. I flashed the firmware onto the routers – which was a bit nerve-wracking, not gonna lie. One wrong move and I could’ve bricked them.
Setting Up the System
With the routers ready, I set them up in my backyard to mimic a small event space. Then, I wrote some simple scripts to capture the MAC addresses of devices connecting to the routers. Every device has a unique MAC address, so I figured I could use that to track movement. Sort of.
Now, I needed a way to store and analyze this data. I went with a Raspberry Pi as a central server. It’s cheap, it’s small, and it’s powerful enough for what I needed. I installed a basic database (SQLite – didn’t need anything fancy) to store the MAC addresses and timestamps.
The Real Test
To test this whole setup, I invited a bunch of friends over for a BBQ. I told them I was working on a “project” and needed their help. They were cool with it, as long as the beer kept flowing. As they moved around, I tracked their phones’ MAC addresses popping up on different routers. It was working! I could see general patterns of movement, like when everyone rushed to the food table or gathered around the fire pit.
Making Sense of It All
The raw data was just a bunch of numbers, so I whipped up some Python scripts to visualize it. I created heatmaps showing where people congregated the most, and some basic line graphs to show how the crowd moved over time. It was pretty basic, but it gave a good idea of what was happening.
This little experiment has been fun. I can see how something like this could be useful for event organizers. They could use this kind of data to optimize layouts, manage crowds better, and maybe even improve safety.
What’s Next?
I still have more to do on this project. It would be fun to improve on this project.
- Make it more accurate: Right now, it’s just general areas. Maybe I can triangulate positions better.
- Make it anonymous: I need to figure out a way to do this without storing actual MAC addresses. Maybe hashing or something.
- Make it look nicer: The visualizations are pretty rough. I need to work on my front-end skills.
Anyway, that’s my story so far. It’s been a fun learning experience, and I’m excited to see where it goes. I just wanted to share it with all of you.