0

I'm using a poliastro orbit and I want to find the distance from a satellite to a lat long coordinate on earth with height h above sea level.

From the twobody orbit, I am using https://docs.poliastro.space/en/stable/api.html#high-level-api

r (Quantity) – Position vector wrt attractor center.

I am planning to convert lat long coordinates to a position vector with respect to the center of the earth so I can simply use the magnitude of the differences between the vectors to get the distance. (unless there is an easier way?)

Converting from longitude\latitude to Cartesian coordinates

I tried using the conversions mentioned here but this presents it in a different format.

How can I convert lat, long, h coordinates into a position vector with respect to the center of the earth? Thanks.

code_vader
  • 256
  • 1
  • 8
  • [Show us](https://stackoverflow.com/help/minimal-reproducible-example) the code you've written so far, even if it is not yet working properly. Writing unit test(s) for your code wouldn't hurt. Are you _sure_ you were correctly handling lat / long degrees vs. radians ? – J_H Jun 13 '23 at 05:48

0 Answers0