Establishing true (ie present) positions of cosmic bodies

I may be missing some terminology to ask this question properly, but I've been looking for an explanation for how one might determine the actual current position of a star vs its apparent observable position. I.e. We see an object 5ly away where it was 5 years ago. With relatively "close" objects I imagine it is easy enough to establish the current and projected position with some degree of accuracy just by measuring relative velocities and trajectories. However what about more distant objects? Say an individual star with the M4 globular cluster. We are seeing a 7000 year old image of said star. My guess would be that one would need a pretty deep simulation of the surrounding space to calculate its present day position with any accuracy. Does such a thing exist?

Clarification: this is not a "what would the sky look like if we could see all the stars in their current positions" question. (As I understand it, they would for the most part appear the same from our point of view.) I'm more interested in the means used to determine the orbits of distant bodies and the degree of accuracy to which that can be calculated.

Through gravitational equations, accumulated observations and spectroscopic analysis, we are able to acquire a reasonable idea of the relative positions of the stars, their velocities and where they are headed.

We are seeing a 7000 year old image of said star. My guess would be that one would need a pretty deep simulation of the surrounding space to calculate its present day position with any accuracy. Does such a thing exist?

There are computer based simulations online, as well as computer and smart phone apps and for large scale modelling of stellar, galaxy and dark matter, supercomputers with hundreds of thousands of data points are frequently used.

An example of such a computer simulation of two stars approaching and the tidal effects is shown below. I appreciate that you are looking for simulation of star movements, but this may provide you with an idea of what the some of programs and applications listed above are capable of. Any Google search for stellar simulations should help you in this area.

One of the most important technique in stellar orbital predictions is analysis of the light coming from stars using the Doppler shift effect.

By studying the charactistic lines of different elements within the star, we can judge, compared to laboratory experiments, how far the star is moving away (red shifted) or towards (blue shifted) us.

From Doppler Effect

The Doppler effect for electromagnetic waves such as light is of great use in astronomy and results in either a so-called redshift or blueshift. It has been used to measure the speed at which stars and galaxies are approaching or receding from us; that is, their radial velocities. This may be used to detect if an apparently single star is, in reality, a closebinary, to measure the rotational speed of stars and galaxies, or to detect exoplanets. (Note that redshift is also used to measure the expansion of space, but that this is not truly a Doppler effect.[10])

The use of the Doppler effect for light in astronomy depends on our knowledge that thespectra of stars are not homogeneous. They exhibit absorption lines at well defined frequencies that are correlated with the energies required to excite electrons in variouselements from one level to another. The Doppler effect is recognizable in the fact that the absorption lines are not always at the frequencies that are obtained from the spectrum of a stationary light source. Since blue light has a higher frequency than red light, the spectral lines of an approaching astronomical light source exhibit a blueshift and those of a receding astronomical light source exhibit a redshift.

Among the nearby stars, the largest radial velocities with respect to the Sun are +308 km/s (BD-15°4041, also known as LHS 52, 81.7 light-years away) and -260 km/s (Woolley 9722, also known as Wolf 1106 and LHS 64, 78.2 light-years away). Positive radial velocity means the star is receding from the Sun, negative that it is approaching.

Caluating orbits : Keplers Laws

I'm more interested in the means used to determine the orbits of distant bodies and the degree of accuracy to which that can be calculated.

Obviously, the more accurately the orbital parameters we measure, the better we can predict the motions of the stars and any gravitational influences that may affect both them and any planetary systems.

Illustration of Kepler's three laws with two planetary orbits.

(1) The orbits are ellipses, with focal points ƒ1 and ƒ2 for the first planet and ƒ1 and ƒ3 for the second planet. The Sun is placed in focal point ƒ1.

(2) The two shaded sectors A1 and A2 have the same surface area and the time for planet 1 to cover segment A1 is equal to the time to cover segment A2.

The same (blue) area is swept out in a fixed time period. The green arrow is velocity. The purple arrow directed towards the Sun is the acceleration. The other two purple arrows are acceleration components parallel and perpendicular to the velocity.

(3) The total orbit times for planet 1 and planet 2 have a ratio $a_1^{3/2}$ : $a_2^{3/2}$.