# How to get ephemeris data for location?

How can I obtain ephemeris data which fits to a specific location? Differently phrased: I need ephemeris data of satellites which orbited a specific location. Is there a document where I can look up references?

Right now I am looking in ftp://cddis.gsfc.nasa.gov/gnss/data/daily/2019/ but the subfolders only contain weirdly named broadcast files which don't make much sense to me.

The reason I need these ephemeris files is that I want to test gps-sdr-sim with a USRP I got. I know that those ephemeris broadcast files contain data to every other satellite in orbit (but not in the same file as I understand).

I tried multiple ephemeris files with gps-sdr-sim but none of the data transmitted worked for the location I am in.

Any help would be appreciated.

The merged broadcast ephemeris is in the YYn directory where (YY is the 2 digit year, n means navigation e.g. 19n) and you are looking for the brdcDDD0.YYn.Z where DDD is the day number (of the year) and YY is the 2 digit year as before. These are compressed RINEX files; gunzip etc will be able to uncompress them. The RINEX format is pretty well documented and I've written Python code to read them.
The other files in those directories are the received GPS signals from the various GNSS monitoring sites. You may be able to make progress by using the map on the Archive Explorer to find a site near you, noting its code and then downloading its data file. For me the nearest is VNDP (Vandenberg AFB) and so for 2019-Jan-01 I would download vndp0010.19n.Z from ftp://cddis.gsfc.nasa.gov/gnss/data/daily/2019/001/19n/. Otherwise I think you would be looking at having to do your own visibility code to work out what satellites were visible from your location at the specific time (since the satellites have a ~12 hour orbital period and come and go)
You may want to look at RTKlib (binaries available there at github also) which has a lot of tools for processing these sorts of data and has rtkget which can automate the download of the various types of files from CDDIS etc.