# Figure out the location of celestial objects relative to the Milky Way in x, y, z co-ordinates

Astronomy Asked on December 21, 2020

I am trying to place various celestial objects the correct distance from the Milky Way, using x, y, z co-ordinates.
So assuming the centre-of-mass of the Milky Way is at 0, 0, 0 – how can I figure out where to place a galaxy or star given it’s celestial coordinates?

I’m just an amateur, and pushing 60 years old, so please excuse me if I have something wrong here…

The spherical $$(r, l, b)$$ can be converted to rectangular $$(U, V, W)$$ as:

begin{align} U &= r cos b cos l \ V &= r cos b sin l \ W &= r sin b end{align}

Using $$(r, l, b) = (770 pm 40 ~text{kpc}, 121.2^circ, -21.6^circ)$$,

begin{align} U &= -371 mp 19 ~text{kpc} \ V &= ~~~ 612 pm 32 ~text{kpc} \ W &= -283 mp 15 ~text{kpc} end{align}

That's relative to the Sun. For a position relative to the center of our galaxy, subtract $$8 pm 0.5 ~text{kpc}$$ from $$U$$.

Answered by Mike G on December 21, 2020