HIP 500000 Addon Trouble

General discussion about Celestia that doesn't fit into other forums.
Topic author
SloJoe
Posts: 7
Joined: 04.11.2003
With us: 21 years
Location: Atascadero, CA USA

HIP 500000 Addon Trouble

Post #1by SloJoe » 26.11.2003, 18:19

I've just started getting into the wonderful Celestia universe but am having a bit of trouble expanding beyond the basic distribution. I've read Selden's excellent white paper "A (not so) Brief Introduction to Celestia Addons (3rd edition)" and attempted to create the first, simplest addon, HIP 500000, as described. However, when I run Celestia (celestia-win32-1.3.1pre11), hit Enter and begin typing, the following happens:

H (a modest list of objects beginning with H appears)
HI (the list shrinks to one entry, but not HIP 500000)
HIP (no items in the list)
HIP 500000 ENTER (nothing happens: if I began with Earth selected, Earth remains selected.)

I've triple-checked the file structure (the only difference is that the Celestia folder includes the version number in its name) and the code (copied and pasted from the white paper). I'm at a loss as to where to go from here. Any ideas would be very much appreciated.

SloJoe

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #2by selden » 26.11.2003, 18:59

SloJoe,

Your symptoms mean that Celestia does not recognize the star definition.
(Celesta doesn't list the possible matches for HIP numbers. There are just too many of them.)

My guess is that there's something wrong with the .STC file.
What program did you use to create the file? Notepad? Wordpad?

Have you tried using the downloadable version?
Selden

Topic author
SloJoe
Posts: 7
Joined: 04.11.2003
With us: 21 years
Location: Atascadero, CA USA

Post #3by SloJoe » 26.11.2003, 19:26

Hi Selden,

I copied and pasted what you had in your white paper into Notepad and saved the file. When it didn’t work, I checked it against what was in the white paper, including spaces and punctuation, and saw no differences.

I haven’t tried the downloadable version. I will do so tonight.

I was wondering if the version of Celestia I’m using might require something different in the star definition. I tried the .STC file with and without the star name but neither worked.

Thanks,
SloJoe

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #4by selden » 26.11.2003, 19:53

Hmmm.
I just now tried cut-and-paste into Notepad and it worked for me with pre11.
On the other hand, cut-and-paste into Wordpad caused Celestia pre11 to go into a CPU-bound loop and never even open a window. :(

Unfortunately, it isn't always obvious when there's something wrong with a file. Some binary codes that cause Celestia to choke are invisible when a file is displayed in a window, for example.

Also, there still are some circumstances when Celestia encounters a problem and gives up on a catalog file but doesn't generate any error message. Some errors in STC files aren't listed in Celestia's "log console". (I just added a description of one to the Bug forum.)

*sigh*
Selden

Topic author
SloJoe
Posts: 7
Joined: 04.11.2003
With us: 21 years
Location: Atascadero, CA USA

Post #5by SloJoe » 26.11.2003, 23:10

Sounds like a good reason to use the download. Is there a cleaner text editor for Windows that I should be using?

Thanks,
SloJoe

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #6by selden » 26.11.2003, 23:16

Notepad is as good as any.
I use Emacs and Wordpad depending on the circumstances.
Selden

Topic author
SloJoe
Posts: 7
Joined: 04.11.2003
With us: 21 years
Location: Atascadero, CA USA

Post #7by SloJoe » 27.11.2003, 02:33

Well I just tried the download file hip500000.stc and it didn't work either. Think I'll try re-installing Celestia

SloJoe

Guest

Post #8by Guest » 27.11.2003, 03:54

Re-installing Celestia didn't help. I guess it's time to move on. Maybe some other addon will work...

SloJoe

Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 22 years 8 months
Location: Darmstadt, Germany.

Workaround to HIP 500000 Addon Trouble.

Post #9by Spaceman Spiff » 29.02.2004, 20:35

Greetings SloJoe and Selden,

SloJoe, you are right - some other add-on will work. Try downloading the 'Nearby Stars' zip file that granthutchison has provided via selden's Celestia website: http://www.lns.cornell.edu/~seb/celestia/hutchison/nearstars1.zip, and work from that.

I had the same problem as you when trying out Selden's HIP 500000 tutorial, using Celestia 1.3.1. In Win2000Pro, I tried using both Notepad and Wordpad, but to no avail. I tried creating .stc files from scratch, I tried copying and pasting from the webpage, I even saved the HIP500000.stc file direct to HDD. Nothing worked: either Celestia's process would start but hang before a window opened, or it would run but the star wouldn't be found. It was almost time to use the Destructo-ray.

Instead, I found the Nearby Stars .stc file to use as a base. After downloading, Unzip it, Open it, and Save As... to the filename you want. Then delete all but one entry to use as a template. I even managed to recreate the HIP 500000 star. Note, I only altered the names and numbers as necessary, I didn't bother typing all the orginal comments and hash characters (###) as in Selden's example.

Please do let us know if it worked!

Selden, maybe a reference to a .stc template created from the nearstars.stc file would help first-timers struck by SloJoe's finding would help... Fortunately, the .scc files seem much more immune.

Ch'rs,

Spiff.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #10by selden » 29.02.2004, 21:16

Spiff,

There has to be something different about what you're doing that I simply don't realize and that you're not mentioning. It has to be one of those "Of course, you have to..." that we're both overlooking. Those example files work fine for me and for many other people.

I do all my Celeestia development and testing on a system running Windows XP Pro.
Selden

Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 22 years 8 months
Location: Darmstadt, Germany.

Post #11by Spaceman Spiff » 03.03.2004, 19:41

Greetings Selden,

yes, I know there must be something else and I don't mention it. I just don't know what it is, though.

Finding this little whoopsie will take great powers of concentration and a methodical approach. I'll have another go at the weekend, see what I can turn up.

In the meantime, what I was suggesting was a workaround: if you slightly modify that HIP 500000 tutorial so that newbies could know about downloading a prepared HIP500000.stc created from the working .stc for nearby stars, then newbies wouldn't be scratching their heads about why 'nothing' works. They can at least see it work, and then edit and save themselves.

The issue is more puzzling for me, because I learnt about .stc files from T Guilpain's site months ago. I tried creating a .stc from scratch then, and nothing happened. I thought TG's instructions were wrong, but now I see it may be an Op Sys issue (by the way, dear readers, the Spectral Type info from stars.dat doesn't apply to .stc files as TG's site suggested, but it's not a critical fault).

Finally, I suspect there's a second problem in addition to the problem of Notepad and Wordpad having (or not having?) hidden characters when .stc files are created anew. I've tried adjusting SpectralType and AppMag for an experimental star, and found the result isn't as expected. For example, taking Xi UMa B at 25.754ly from SpectralType "G0V", AppMag 4.87 to SpectralType "O5V", AppMag 0.87 produces a star with capped luminosity of 2.36 times Sun, capped SpectralType "G0V" and distance 259.07ly. The AppMag dropped to 8.40 to be consistent, but it's not what I entered!

Ch'rs,

Spiff.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #12by selden » 03.03.2004, 20:16

Spiff,


I'm planning to include a zip file RSN.

Your description of your problems with AppMag, etc confuse me, though.
I have no problems defining and seeing stars with the various characteristics you mention.

Maybe it'd help if you could paste the STC files that you are using into your message along with exactly what you see on the screen and what you think you should be seeing.

Tomas' description of the STC format is rather confusing because it references a description of the binary stars.dat file, which is irrelevant, except in so far as it gives an indication of what star types Celestia actually recognized at the time he wrote the document. It's somewhat out of date now, unfortunately.

To first approximation, you can specify any legal spectral class and luminosity type. Celestia will ignore what it doesn't recognize.

I made a list of the spectral classes and luminosity types that Celestia does recognize on my "cryptic notes" page. It's also out of date in that it doesn't include the Carbon star designations that Celestia now recognizes, but I think it's OK otherwise. http://www.lns.cornell.edu/~seb/celestia/celestia_notes.html#6.0
Selden

Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 22 years 8 months
Location: Darmstadt, Germany.

Post #13by Spaceman Spiff » 07.03.2004, 13:55

Greetings Selden!

re: SloJoe's trouble. I've done it! I've found what the trouble is: we have a compound of three problems:

1. All .stc files must end with a blank line.

2. Whether you use Notepad or Wordpad, the encoding chosen must be for ANSI text, not Unicode, etc.

3. Whether you download and/or copy the text for the example .stc file HIP 500000 from your browser, mozilla based browsers (e.g., netscape) may add as little as zero CRs to your clipboard depending on precisely how far you dragged the cursor down to highlight following blank lines, IE browsers will add two CRs, regardless of whether you didn't drag the cursor to down to highlight following blank lines. In both cases you cannot easily see if you have highlighted any final blank lines. Why is this important? See problem 1.

These explain all the missing star problems reported by SloJoe and myself, and why people get mysteriously different results.

After discovering these problems, I noticed that all the working .stc files I had (including granthutchison's nearstars.stc) did have the final blank line all along.

To help people stop falling foul of this browser 'feature', you might edit the notes in section 2.1 about the need for the final blank line, ANSI text encoding, and to beware browser limitations with copying text from webpages. I'm not sure if you can 'force' a final blank line into HTML due to browser limitations, so my proposals for workarounds are left useless. Pfff...

The same goes for .scc files! Which means my original comment that .scc files are much more immune to problems is not necessarily true.

Finally, I suspect there's a second problem in addition to the problem of Notepad and Wordpad ...


This "second" problem I raised is a separate issue which I'll deal with elsewhere, elsewhen.

Meantime, detailed ramblings:

I note you give two example versions for HIP500000.stc: one inline for Cel. v.1.3.0 without the name "Intro", and another in the 'sidebar' for Cel. v.1.3.1 with the name "Intro". Both show 12 non-blank lines of text. It makes no difference to these problems which you use, and I tried both with Celestia v.1.3.1.

When you copy the green text in a mozilla based browser and paste into Notepad or Wordpad, you will not necessarily get a 13th blank line. When you copy this with a IE browser, you will get a 13th and 14th blank line.

Even if you follow the HIP500000.stc link, you will still have the same behaviour between browsers: both mozilla and IE browsers will appear not to let you highlight a 13th line, but IE will add two lines into the clipboard. Again, this shows up when you paste into Notepad and Wordpad and move the cursor to the end of file.

When you initially Save As... the file in Notepad, you have a choice of four encodings:
- ANSI
- Unicode
- Unicode bigendian
- UTF-8

Choose "ANSI". Notepad will then annoy you by appending .txt to the filename. For example, if you Save As... to HIP500000.stc, you'll find HIP500000.stc.txt instead. Rename the file to HIP500000.stc before running Celestia, or it won't find the file.

If you use Wordpad instead, you get five choices:
- Word for Windows 6.0
- Rich Text Format (RTF)
- Text Document
- Text Document - MS-DOS Format
- Unicode Text Document

Choose "Text Document". You can choose "Text Document - MS-DOS Format" as well - it seems to work the same as "Text Document". Do not choose any other encoding. In both cases, Wordpad appends .txt to the file name, so you'll have to edit the filename after first creation.

If you run Celestia and it finds a .stc file encoded in ANSI, but it does not have a final blank line, it hangs before it can open a window. You have to go to the Task Manager to end the process (test OS was Win 2000 Pro). It seems Celestia needs .stc files to end with a double CR to know the end of file. Sensible, really.

If you saved the file as Unicode (or similar), Celestia will run but the star isn't found at the console. It makes no difference if the file has the necessary final blank line. That's because (I presume) Celestia ignores non-ANSI files altogether.

Only when a .stc file is encoded in ANSI text, and has a double CR ending that creates a final blank line, will Celestia succeed in creating the file contents.

Spiff.

P.s., has anyone told SloJoe?

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #14by selden » 07.03.2004, 14:51

Spiff,

Thanks for taking the time to track down the problems!

Which version of Celestia were you using to make the tests?

My personal opinion right now is that some of the things you've found are bugs in the version of Celestia you were using.

1. it shouldn't matter how many line terminators there are after the last "}". 0 should work as well as several.

2. it shouldn't matter which character encoding is used. The newest Celestia prereleases include UTF8 support, although it isn't clear to me where it's expected to work and where it isn't. It certainly is supposed to work in SSC Locations files, though. I'd expect that to imply that it's supposed to work in the other catalog files, too (STC and DSC).

I'll paraphrase your discoveries and add them to the Web page.

Thanks, again.
Selden

Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 22 years 8 months
Location: Darmstadt, Germany.

Post #15by Spaceman Spiff » 07.03.2004, 19:53

I used Celestia v.1.3.1 to try out both the name and noname versions of HIP500000.stc. I've noticed people referring to 'pre11' or whatever, but my About... doesn't mention a pre, so I guess that means I have v.1.3.1. 'final'. I also note talk of a v.1.3.2, but don't know about getting 'advance copies'...

I didn't think of the line terminators and encoding issues as being Celestia bugs, but just application peculiarities. Still, if Celestia really is supposed to cope with all combos, that would be great for all!

Until then, notes it is for the 'workaround'...

Spiff.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #16by selden » 07.03.2004, 20:16

Spiff,

Chris sometimes makes Windows prereleases available in http://www.shatters.net/celestia/files/
He usually announces them in the Users forum, but not always. Of course, there usually are even more bugs in those versions of Celestia.

Linux users are expected to be able to rebuild Celestia from source (on SourceForge) if they want to try out the latest code changes.

New versions for MacOS only happen when a "final" version has been announced.
Selden


Return to “Celestia Users”