stars.dat : star coordinates

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #21by selden » 28.11.2005, 11:23

Clive,

My understanding is that positions and orientations are recorded in Cel:// URLs as floating point numbers. I was writing about the "gibberish" letter combinations, which are dumps of most, but not all, of Celestia's state flags.
Selden

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #22by chris » 28.11.2005, 17:36

selden wrote:Clive,

My understanding is that positions and orientations are recorded in Cel:// URLs as floating point numbers. I was writing about the "gibberish" letter combinations, which are dumps of most, but not all, of Celestia's state flags.


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.

--Chris

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

Post #23by cpotting » 01.12.2005, 18:08

chris wrote: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.

--Chris


Thanks Chris. I'll have to tuck that bit of knowledge away. It may come in handy sometime when writing a script.
Clive Pottinger
Victoria, BC Canada


Return to “Development”