Explanation of Universal coordinate system...

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
scratt
Posts: 36
Joined: 05.12.2005
With us: 18 years 11 months
Location: Thailand

Explanation of Universal coordinate system...

Post #1by scratt » 09.01.2006, 03:31

I am trying to create objects in Celestia which are eternal.

i.e. They exist as their own 'class' and have their own set of coordinates, which they can update themselves or have updated by other processes and are independant of orbits or planetary systems.

For example, at any time or date they will appear in a fixed location in space...

I pretty much understand how objects are identified and drawn and I guess the closest object I could derive them from would be stars.

To this end I have experimented with a few hacks, but would like to create a more elegant solution...

Has anyone got a good resource which explains, or gives some pointers on the Universal Coordinate system used, and how I might be able to implement this with minor changes to Celestia as a whole...

Any input would be appreciated as I am throwing lots of ideas around and would appreciate more experienced Celestia code mokeys throwing any suggestions they have which may save me repeating experiments that have already been done...

Thanks..
Extreme Sports Cafe - Remember, measure life by the moments that take your breath away, not by how many breaths you take...

cpotting
Posts: 164
Joined: 18.03.2004
Age: 63
With us: 20 years 8 months
Location: Victoria, BC Canada

Post #2by cpotting » 09.01.2006, 13:52

The Universal coordinate system is a right-handed 3-axis orthanormal system. That is there is an X-axis, a Y-axis and a Z-axis, just like you probably had to deal with at some point in high-school.

Positions along each axis are measured in microlight-years (~9466411842km). The origin (0,0,0) is centred on a point approximately 206AU away from Sol (in the direction of the autumnal equinox). There were programmatic reasons why it was positioned there - though I understand those reasons are no longer valid. At any rate that is where it is.

The positive segment of X-axis extends from the origin in the direction of the vernal equinox. The positive segment of the Y-axis extends toward the north ecliptic pole. The positive segment of the Z-axis extends in the direction of the winter soltice.

The X-Z plane is the same plane as the Earth's ecliptic plane.

So, if an object maintains the same position in the universal coordinate system, then that object will be "fixed" in space...
However, remember that is just a relative term. There is no such thing as a "fixed location". What it really means depends on a question of what Chris intended the universal frame of reference to mean:

Since the origin is fixed relative to Sol, one could interpret Celestia as a heliocentric model of the universe (one with the Sun always at the centre). In this case, fixing an object's universal coordinates means it doesn't move relative to Sol, but does move as Sol orbits the galaxy and the galaxy moves through the local group, and the local group drifts through the Virgo supercluster....

Or, since it is named "universal", it could be interpreted as meaning Sol would slowly drift away from the object, as would the galaxy, local group, etc.

But the argument is academic: Celestia does not support stellar or galactic drift, so a fixed location is fixed.
Clive Pottinger
Victoria, BC Canada

Topic author
scratt
Posts: 36
Joined: 05.12.2005
With us: 18 years 11 months
Location: Thailand

Post #3by scratt » 09.01.2006, 14:25

Thanks for the explanation...

So does that mean that if you want to resolve something to a finer resolution than ~9466411842km you need to have local coordinates around that point?
Extreme Sports Cafe - Remember, measure life by the moments that take your breath away, not by how many breaths you take...

GlobeMaker
Posts: 216
Joined: 30.10.2005
With us: 19 years

Post #4by GlobeMaker » 09.01.2006, 16:08

Yes. There are several coordinate systems used. A universal system and
then, when the camera arrives in a solar system, a new origin is defined
relative to a star or planet.

http://www.celestiaproject.net/forum/viewtopic ... sc&start=0

http://stevehollasch.com/cgindex/coding/ieeefloat.html

http://celestia.teyssier.org/source-doc ... rence.html

http://www.cprogramming.com/tutorial/3d ... nions.html

http://www.celestiaproject.net/forum/viewtopic ... ight+lines

http://www.doestimeexist.info/Time_expr ... _physi.htm

http://www.lepp.cornell.edu/~seb/celest ... les.html#4

Rassilon said: "When the engine reads from stars.dat and all the
ssc files it plots the position relitive to sol...or earth as the case
may be. So the further out the star the increased precision error
you will have, thus the jittering effect. "

Here is a text line with coordinates in base64 : x y z coordinates are given.
Also the orientation is ox oy oz ow, meaning 3 vector componets that define a direction
of an axis, and ow is a rotation about that axis. :

cel://Follow/Sol:Earth/2005-11-23T00:00 ... 6239&lm=12

Chris said:
"Orientations are recorded as floating point numbers, but positions
are not. Neither of the standard IEEE 754 floating point
types--32-bit single precision and 64-bit double precision--are
sufficient to represent positions throughout the universe to the
precision required by Celestia. Instead, Celestia uses it's own
128-bit fixed point numbers for coordinates. In a cel:// URL, the
bits appear in the standard base64 encoding where the characters
A-Z are digits 0-25, a-f are digits 26-51, 0-9 are digits 52-61,
+ is 62, and / is 63."

http://celestiaproject.net/forum/viewtopic.php ... e&start=15

http://www.faqs.org/rfcs/rfc1521.html
Table 1: The Base64 Alphabet

Four columns are formatted in a bad way next :
Value Encoding Value Encoding Value Encoding Value Encoding
0 A 17 R 34 i 51 z
1 B 18 S 35 j 52 0
2 C 19 T 36 k 53 1
3 D 20 U 37 l 54 2
4 E 21 V 38 m 55 3
5 F 22 W 39 n 56 4
6 G 23 X 40 o 57 5
7 H 24 Y 41 p 58 6
8 I 25 Z 42 q 59 7
9 J 26 a 43 r 60 8
10 K 27 b 44 s 61 9
11 L 28 c 45 t 62 +
12 M 29 d 46 u 63 /
13 N 30 e 47 v
14 O 31 f 48 w (pad) =
15 P 32 g 49 x
16 Q 33 h 50 y
Your wish is my command line.

Topic author
scratt
Posts: 36
Joined: 05.12.2005
With us: 18 years 11 months
Location: Thailand

Post #5by scratt » 09.01.2006, 16:19

Cool. Thanks... Lot's of reading there...

And a lot more work to do to achieve what I want to achieve!! :lol:
Extreme Sports Cafe - Remember, measure life by the moments that take your breath away, not by how many breaths you take...

cpotting
Posts: 164
Joined: 18.03.2004
Age: 63
With us: 20 years 8 months
Location: Victoria, BC Canada

Post #6by cpotting » 22.01.2006, 21:36

scratt wrote:So does that mean that if you want to resolve something to a finer resolution than ~9466411842km you need to have local coordinates around that point?


No. Decimal points can be used in the definition of coordinates.
Clive Pottinger
Victoria, BC Canada

neoniv
Posts: 7
Joined: 31.01.2006
With us: 18 years 9 months

Post #7by neoniv » 17.02.2006, 23:25

Clive:

I understand everything you say in your January............. 2006 Post - except the underlined part of the the end of your post which I have copied below. [I will pick up my comments after your quote below]

cpotting wrote:Since the origin is fixed relative to Sol, one could interpret Celestia as a heliocentric model of the universe (one with the Sun always at the centre). In this case, fixing an object's universal coordinates means it doesn't move relative to Sol, but does move as Sol orbits the galaxy and the galaxy moves through the local group, and the local group drifts through the Virgo supercluster....

Or, since it is named "universal", it could be interpreted as meaning Sol would slowly drift away from the object, as would the galaxy, local group, etc.


But the argument is academic: Celestia does not support stellar or galactic drift, so a fixed location is fixed.


So, my question is... two fold:

#1 are you speaking here (underlined above) about Celestia or about how the universe behaves in "real" space. If the later OK. If not then:

#2 If THE universal coordinate system of Celestia is Heliocentric... then how can - or how is there drift of the bodies (as noted in my underlined parts of your statement) accomplished? In other words, IF in Celestia the Sun / Solar System drifts in relationship to the Galaxy and Local Group (as it does in reality) then how is that done (if the coordinate system is heliocentric)? If the Sun and SS do "drift" against the galaxy and local groups does that not mean that there is a coordinate system which underlies the Helio Centric system and/or which contains the Helio Centric system which is drifting within this broader coordinate system which contains the Galaxy and LG?

Or stated another way. How can the sun and solar system drift within the Galaxy and LG if the whole coordinate system is Helio Centric?

#3 Have I missed something here? 8O

#4 Clarification would be most appreciated. :D

respect,
neoniv.

phoenix
Posts: 214
Joined: 18.06.2002
With us: 22 years 5 months
Location: Germany - Berlin

Post #8by phoenix » 18.02.2006, 07:55

neoniv wrote:
#1 are you speaking here (underlined above) about Celestia or about how the universe behaves in "real" space. If the later OK. If not then:

#3 Have I missed something here? 8O

#4 Clarification would be most appreciated. :D

yes, you missed his last words ;)

cpotting wrote:But the argument is academic: Celestia does not support stellar or galactic drift, so a fixed location is fixed.
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)


Return to “Development”