I am in the middle of building a very small tracking app so that friends can share their live tracking location with each other.

I'd like your opinion / feedback on my design of this feature.

01 - when the sender sends their live tracking to their friend (reciever) on the app, their $sent_location is stored in the DB.
02 - if the sender moves 50m their $live_location is then updated to the DB but ONLY if it 7 seconds has elapsed since the last update of $live_location (so there must be a 7 second gap in between DB updates AND the update query will ONLY be triggered if the user has moved 50m)
03 - the receivers map refreshes / checks every 5 seconds to see their $live_location

So if the sender is sitting at home and they don't move 50m, the receiver will see the sender's $live_location as at home... then the $live_location will only be updated if the sender moves 50m (this will cut down on the amount of queries to the DB)

I'd love to hear your opinion on the design of this function and if you have better ways to implement it, thanks in advance for your help.