开发者

How to get GPS distance while protecting the fixes

I am currently making a mobile app where the server 开发者_Python百科needs to calculate the distance between clients. If possible, I would like to respect the users' privacy and not transmit the precise GPS fix to the server.

Is there any way I could modify the GPS fixes so that the server would not know where the clients are, but would still be able to calculate an accurate distance between two of them?


If it isn't possible for the clients to communicate with each other directly, then no, not directly.

To calculate the distance between two points, you need to know where those two points are in relation to each other. The coordinates give you that. You could instead send back relative positions to something else, but the server would still need to know what that something else is.

You could fuzz the data, but then you hurt accuracy.

Would it instead be possible for the two units to use some sort of pre-shared key to unlock/decode/decrypt the locations? The server would then just relay data between the clients, but only the clients would be able to decode the coordinates from the other, and could calculate distance themselves. I think this is your best bet.

Also, +1 for actually wanting to preserve user privacy!


Would seem to me that both cleints sending their exact coords to the server and having the distance calculated there would be the best option for privacy (and maybe also performance)

i.e. Client A and Client B send their coords to Server. Server calculates the distance between the two points and send back the distance to both clients.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜