I have a .dat file that I know contains binary data of GPS coordinates. My end goal is to do a distance comparison of the locations in there to a set of reference coordinates.
I'm new to accessing .dat files in C but from what I've learned is that you can't just open it and read it to figure out the data structure but you should be able to decipher it if you have some idea of the data that's stored.
I do have some code to start opening and reading through the file but not much more.
What I'm not sure is how to go about it as I need to know what method and what functions are really at play here. My guess would be to set up some kind of basic structure, latitude and longitude. Then I would read a set amount of bytes and populate my latitudes and longitudes until I've read the whole file.
The above sounds easy in principle but I have no idea how much data to read for each entry as I don't know the precision. And how do I turn that binary data into an actual coordinate values if I don't know the the coordinate precision.
Am I thinking in the right direction? If so what would I need to understand next to solve this? If not how should I actually be looking at it?