okay, sorry I misunderstood what you were saying. The thing is there has to be a public announcement of the location, it's the nature of carpool. Atleast it has to show up after the GPS coordinates are registered. Or did I get you wrong?
Ok let me reframe the question
There are 2 ways of connecting riders with drivers
1. Simple way
We get location of moving vehicle from IOT device
Push it on server
Map the incoming ride requests with drivers and they can go about managing their rides, like it happens on all ride hailing apps
Pros : Easy to implement.
Cons : Location of moving vehicle is saved on server atleast for a while
2. Secure way
Instead of location we get the zone (geofenced say radius of 5-10 km) where in the vehicle is in
Push it on server
Map the incoming ride requests with drivers in same zone
Share public key of passenger with the vehicle IOT device
IOT device then shares the encrypted location back to passenger device
Hence this location can only be decrypted at the passenger end
This way it becomes more trustless so commuters don't give a second thought before sharing the ride
Pros : End to end encryption brings extra level of security and trust
Cons : How do we get Zone ID
I do understand the later approach will have overheads and still is not 100% secured but atleast has an extra security over former.
So the problem is as to how to get the zone id of moving vehicle ? what would be the best approach for calculating zone ID ?
and a generic question for community also arises : Is it actually needed ? May be we are overthinking