If you Python then the script linked from another topic: Random GNSS enquiry may be a good starting point.