<p>Earth's position as seen from the Sun is directly opposite the Sun's position as seen from Earth, at the same distance.
In <a href="https://en.wikipedia.org/wiki/Ecliptic_coordinate_system#Spherical_coordinates" rel="nofollow noreferrer">ecliptic coordinates</a>,
<span class="math-container">$$ \begin{align}
l_\oplus &amp;= \lambda_\odot \pm 180^\circ \\
b_\oplus &amp;= -\beta_\odot \\
r_\oplus &amp;= \mathit{\Delta}_\odot
\end{align} $$</span></p>
<p>The heliocentric position of the Sun is always at the origin (<span class="math-container">$r=0$</span>) by definition.</p>

CC BY-SA 4.0
2020-10-23T23:47:17.987Z
so, when i calculate geosentric, just skip L+180 and get heliocentric.
faizin F6
CC BY-SA 4.0
2020-10-22T14:58:30.447Z
2020-10-22T17:36:36.957Z
2020-10-22T17:36:36.957Z
Mike G
<p>For some reason, I just saw this question only now… Maybe I’m too late, but anyway: Here goes…</p>
<p>To convert from heliocentric to geocentric and vice versa is more than just adding 180° to the longitude, because you’re also changing point of view. You have to first convert your spherical heliocentric (or geocentric) positions into rectangular positions. This is done with the following formulas:</p>
<p><span class="math-container">$ X = R\ \text{cos}\ B\ \text{cos}\ L\\
Y = R\ \text{cos}\ B\ \text{sin}\ L\\
Z = R\ \text{sin}\ B $</span></p>
<p>Where <em>R</em> is the distance to the object (which is lacking from your table; hopefully, you have the data somewhere else), <em>B</em> is its latitude, and <em>L</em> is its longitude.</p>
<p>Then you need to somehow find the heliocentric position of the Earth or the geocentric position of the Sun. Let’s call those <span class="math-container">$X_0$</span>, <span class="math-container">$Y_0$</span>, and <span class="math-container">$Z_0$</span>.</p>
<p>Then the geocentric (or heliocentric) position is found by <span class="math-container">$X_h = X + X_0$</span>, <span class="math-container">$Y_h = Y + Y_0$</span>, <span class="math-container">$Z_h = Z + Z_0$</span>, which you can convert to longitude, latitude, and distance once again by:</p>
<p><span class="math-container">$ r = \sqrt{X_h^2 + Y_h^2 + Z_h^2} \\
l = \displaystyle \text{atan2}\ \frac{Y_h}{X_h} \\
b = \displaystyle \text{asin}\ \frac{Z_h}{r} = \text{atan2}\ \frac{Z_h}{\sqrt{X_h^2 + Y_h^2}} $</span></p>
<p>Where atan2 is the second arctangent function that’s available in most programming language, and which gives you the proper quadrant.</p>
<p>Hope this helps.</p>

CC BY-SA 4.0
2021-03-31T00:36:47.017Z
2021-03-31T00:36:47.017Z
Pierre Paquette
<p>I have Sun data (lon+lat+distance) in geocentric coordinates:</p>
<p><a href="https://i.sstatic.net/t2c23.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/t2c23.jpg" alt="this from app Ephemeris Meeus algorithm" /></a></p>
<p>but I want to visualize in heliocentric way. How to calculate that?</p>

<the-sun><coordinate>
How to calculate geocentric transformation to heliocentric coordinates?
faizin F6
# How to calculate geocentric transformation to heliocentric coordinates?

(Asked by: username_0 on 2020-10-22)

I have Sun data (lon+lat+distance) in geocentric coordinates:

[![this from app Ephemeris Meeus algorithm](https://i.sstatic.net/t2c23.jpg)](https://i.sstatic.net/t2c23.jpg)

but I want to visualize in heliocentric way. How to calculate that?

**Tags:** the-sun, coordinate


---

## 2 answers

### Answer by username_1 on 2020-10-22. Score: 2

Earth's position as seen from the Sun is directly opposite the Sun's position as seen from Earth, at the same distance.
In [ecliptic coordinates](https://en.wikipedia.org/wiki/Ecliptic_coordinate_system#Spherical_coordinates),
$$ \begin{align}
l\_\oplus &= \lambda\_\odot \pm 180^\circ \\
b\_\oplus &= -\beta\_\odot \\
r\_\oplus &= \mathit{\Delta}\_\odot
\end{align} $$

The heliocentric position of the Sun is always at the origin ($r=0$) by definition.

> **Comments:**
> **username_0**: so, when i calculate geosentric, just skip L+180 and get heliocentric.  

---

### Answer by username_2 on 2021-03-31. Score: 2

For some reason, I just saw this question only now… Maybe I’m too late, but anyway: Here goes…

To convert from heliocentric to geocentric and vice versa is more than just adding 180° to the longitude, because you’re also changing point of view. You have to first convert your spherical heliocentric (or geocentric) positions into rectangular positions. This is done with the following formulas:

$ X = R\ \text{cos}\ B\ \text{cos}\ L\\
Y = R\ \text{cos}\ B\ \text{sin}\ L\\
Z = R\ \text{sin}\ B $

Where *R* is the distance to the object (which is lacking from your table; hopefully, you have the data somewhere else), *B* is its latitude, and *L* is its longitude.

Then you need to somehow find the heliocentric position of the Earth or the geocentric position of the Sun. Let’s call those $X\_0$, $Y\_0$, and $Z\_0$.

Then the geocentric (or heliocentric) position is found by $X\_h = X + X\_0$, $Y\_h = Y + Y\_0$, $Z\_h = Z + Z\_0$, which you can convert to longitude, latitude, and distance once again by:

$ r = \sqrt{X\_h^2 + Y\_h^2 + Z\_h^2} \\
l = \displaystyle \text{atan2}\ \frac{Y\_h}{X\_h} \\
b = \displaystyle \text{asin}\ \frac{Z\_h}{r} = \text{atan2}\ \frac{Z\_h}{\sqrt{X\_h^2 + Y\_h^2}} $

Where atan2 is the second arctangent function that’s available in most programming language, and which gives you the proper quadrant.

Hope this helps.


---

