How can I calculate the distance of a position on earth to a satellite (for example a GPS satellite)? The satellites position is exactly known by its ephemeris data.

In a related question I've asked how to obtain those positions from the ephemeris: How to calculate position of GPS Satellite with transmitted ephemeris data?

  • $\begingroup$ Depends on the ephemeris data. Could you post it? Where did you get it from? $\endgroup$
    – Mefitico
    Commented Oct 26, 2019 at 18:07
  • $\begingroup$ Yeah, the data struct looks like this: rootOfA;deltaN;week;toc;af0;af1;af2;e;toe;omega;crs;cus;cuc;cis;cic;crc;i0;iDot;omega0;omegaDot;m0;tgd; it's transmitted by the satellite and i'm fetching the data via the ublox ubx-raw protocol $\endgroup$
    – cy8berpunk
    Commented Oct 26, 2019 at 22:58
  • $\begingroup$ Could you please edit your question to add these details? What you've posted also looks like a header, please give actual numbers as well. And preferably, the source. $\endgroup$
    – Mefitico
    Commented Oct 26, 2019 at 23:11
  • $\begingroup$ By "ephemeris data" do you mean the ephemeris that the GPS satellite transmits encoded in it's broadcast to Earth along with other data? Message format If you need very accurate results, you'll have to look carefully into things like coordinate frames and how time is treated. This won't be an easy task at all. I recommend you do some reading first, and then ask a more specific question when you find something specific that you need help with. This question may be considered too broad. $\endgroup$
    – uhoh
    Commented Oct 27, 2019 at 0:47
  • $\begingroup$ ok, thx I wil do that $\endgroup$
    – cy8berpunk
    Commented Oct 27, 2019 at 9:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.