Set an maker on a point in orbit

Description: Post requests, images, descriptions and reports about work in progress here.

Topic author
Topic author
Posts: 3
With us: 10 months 20 days

#1by www2 » 09.05.2017, 22:50

Hi i want to know how i can set an marker on a point of a planet orbit.
e.g. i want to have a marker were was earth in his orbit on may 25 2011 at 12:30 PM

Posts: 10117
With us: 15 years 2 months
Location: NY, USA

#2by selden » 10.05.2017, 10:30

Celestia doesn't explicitly include that particular functionality, but there are various ways to accomplish something similar.

For example, you ccould write Lua code to produce that result. Unfortunately, I don't think anybody has done it and published the procedure.

Here's an outline of one way it could be done:

One of Celestia's Lua functions is "getposition", which returns the coordinates of an object at a specific simulation time. See ... ethods/Celx_object#getposition

An SSC object can be positioned using a Lua function as a ScriptedOrbit. See and

An SSC object can be defined to act as the marker. Its SSC definition would have to include a ScriptedOrbit definition which calls the getposition function to place the "marker" object at the appropriate position.

There probably are easier ways to accomplish whatever it is that you actually want to do.

Some examples:

1. write a Cel or CelX script which alternates Celestia's simulation date between two (or more) values.
2. have two copies of Celestia open, one set at the current date and one set at the other date.
3. define multiple SSC "Earths", each at a different location (perhaps by specifying different MeanAnomaly values) along its orbit. You'd have to define them using an EllipticalOrbit specification which approximates the Earth's orbit instead of using the built-in CustomOrbit.

I'm sure there are others I haven't thought of.

Posts: 102
With us: 1 year 3 months

#3by Janus » 10.05.2017, 16:59

If all you are after is seeing where the earth was at that time, that is easy.
Freeze the time in the menu, then set it.

If on the other hand, you want to see a marker across time.
Then here is a tweak/hack for you.
It is an abuse of the database system, but it works.

I didn't do the math, it is beyond me at this time.
I merely lined things up and approximated.

www2 date.png

In I added the following to the end.

# Janus for CelestiaProject forum request from www2
RA 241.52
Dec -20.86
Distance 0.0000159325
SpectralType "M5.0V" # Copied from Proxima Centauri
AppMag 1

It is a star with no defined drift, so it is stationary.

When you run celestia, hit enter and type www2 to select it.
Ctrl-P then marks it, while C & F will center and follow it, or G can take you to it.

If you zoom in on the marker for www2, you will see it does not quite match the orbit of earth.
It is off by a few lunar orbit diameters.
The position of the earth is also a little off.

However, this provides everything you need to get it as precise as you would like.
The arc can be computed using day of year to degree conversions.
The exact distance can be computed as the length of the chord cutting across the arc of the earth orbit.
That is then redefined from light seconds or miles into light years.

If you are after a line, then define a number of these marked as www2-1, www2-2, etc.
Use distances like 1,2,5,10,20,50 so it keeps the same basic profile as you zoom out.
If want a proper line, simply add them to asterisms.dat using the same format as the others.
You can then turn constellations on and see it labelled as you like.

Hope this helps.


Edit: Screen layout differences are because I used my personal version of celestia.
I rearranged things some, and provided border offsets for presentation purposes.
For stars it does such things as give RA:Dec:Dist on screen.
The above being separate from the observer distance.

Topic author
Topic author
Posts: 3
With us: 10 months 20 days

#4by www2 » 14.05.2017, 16:06

Thanks Janus that did the trick.

For info: you can a custom stc file and you don't need edit

Posts: 102
With us: 1 year 3 months

#5by Janus » 14.05.2017, 18:47

I am glad it worked for you.

I am still learning to navigate the depths of Celestia.
My knowledge has some serious holes in it.
Knowing I can add a custom file fills one, thanks.


Return to “Add-on development”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest