Can you adjust what is displayed?

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Topic author
Posts: 1
Joined: 17.03.2019
With us: 1 year 4 months

Can you adjust what is displayed?

Post #1by LawrenceKS » 17.03.2019, 16:30

I'm looking for planetarium software that is capable of displaying only certain stars that are chosen, such as only displaying stars in the sky that are closer than 100 light years away or stars with the same spectral class as the sun (G), or any other criterion chosen from a star's characteristics. So far I've struck out with other Linux-compatible software and while I haven't succeeded with Celestia either, it seems possible that I'm just haven't figured it out yet. Anyone have any success doing this? To clarify, I don't want to display all the other stars in a database; just the ones I choose. Thanks in advance for your considered response! (con=toward sidere=the stars)

Posts: 517
Joined: 13.08.2016
With us: 4 years

Post #2by Janus » 18.03.2019, 01:16

I am not sure the main line can do what you describe, but I have some tools I just got done bringing forward that will.
I do some of the same sort of stuff when I am charting exploration or migration paths between stars.
Sometimes it helps to only see what you are concentrating on.

Since it appears you are on Linux, You will need to use wine, Win in a VM, or compile yourself.
Start with a copy of the current source from Github since it has up to date data.
Put the archive somewhere and extract.
Grab the archive from comment #8 in betwixt to get the needed functions.
I can post the source to my mods if needed for you to compile yourself.
Extract into the celestia directory.
Save this script in the scripts directory. {It is a crude script cribbed from some of my own tinkering.}


Code: Select all

-- Janus
-- Demonstration of selected stars only.

MarkWht = "#FFFFFF";
MarkRed = "#FF0000";
MarkOrn = "#FFAA00";
MarkGrn = "#00FF00";
MarkBlu = "#0000FF";
MrkBlue = "#000080";
MarkYel = "#FFFF00";
MarkYlw = "#C0C0FF";
MarkGrb = "#00FFFF";

local target1 = celestia:getselection();
local target1name = target1:name();
target1:mark(MarkRed, "triangle", 7)
local target2dex = celestia:betwixdex(target1name)
local target2 = celestia:getstar(target2dex)
local target2name = target2:name();
local dist = celestia:betwixt(target1name, target2name)
celestia:print("Nearest neighbor is:" .. target2name .. " @" .. dist .. " LY",5)

local lightyears = dist + dist + 1
-- local neighbors = celestia:benear(target1name, lightyears)
local neighbors = celestia:benear(target1name, 100)
local neighborcount = #neighbors; -- should still be getn, note to self to fix this in lua source.
celestia:print("Neighbor count is " .. neighborcount, 5)

for loopcount = 1, neighborcount do

   local neighbor = celestia:getstar(neighbors[loopcount])
   local neighborname = neighbor:name()
   neighbordist = celestia:betwixt(target1name, neighborname)
   celestia:print("Stellar neighbor " .. loopcount  .. " of " ..  neighborcount .. " is a " .. neighbor:spectraltype() .. " : " .. neighborname .. " @" .. neighbordist .. " LY",0.25)
   startype = string.sub(neighbor:spectraltype(), 1, 1)

   -- You can use sub string functions to get subclass or sequence.
   -- For instance, A9 is the smallest A, while and A0 is the largest.
   -- starsequence = string.sub(neighbor:spectraltype(), 2, 2)
   -- Then modify marker size according to sequence number. {starsize = 10 - starsequence}
   -- if startype == "A" then neighbor:mark(MarkBlu, "circle"   , starsize) end
   if startype == "G" then neighbor:mark(MarkYel, "circle"   , 2) end
   if startype == "F" then neighbor:mark(MarkWht, "circle", 2)  end
   if startype == "A" then neighbor:mark(MarkBlu, "circle"   , 2) end


Start by turning off all display options in render:View options, except markers.
Launch celestia, hit enter, type "SOL" and enter, then 'C' for center and 'F' for follow.
Then run the above script, it will take a while, it marks over 2,000 stars. {15-30 Minutes depending.}
The basic idea of how to modify is included in the script.
It is crude because I cribbed it in a hurry from other sources.

When it is done it will resemble this:
G stars are yellow
F stars are white
A stars are blue.

100LY only.png

Your display may be different since as you can see, the FOV is set to 61' for a wider view.


Return to “Help Central”

Who is online