Add-On Object Orbits

Post requests, images, descriptions and reports about work in progress here.
Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Re: Add-On Object Orbits

Post #1by selden » 27.07.2012, 13:52

pla879 wrote:I am not sure which category these questions falls into however, since this is on an Add-On I am working on I figured I would ask the question here. Question is - On some of the objects in my add-on I was possibly wanting them orbiting in a clockwise direction vice counterclockwise which Celestia uses. Any idea how I could do that? I am sure you can in Celestia however, I am still looking through the Celestia notes/documentation on how to do so but haven't found it yet. Please assist.
One way to do it is to change the inclination of the orbit by 180 degrees.
Also, another question. I want to add a name to a star and also know it could be done via STC file however, all the information ;

RA
Dec
Distance
SpectralType
AppMag

Are they required? Can I just put another name in the STC and make no entries on the above characteristics? Would that leave the star as is and just change the name? Upon reading on STC information I might have overlooked or misunderstood all the variables, please assist.

Much Thanks,

Pla879 :?:
The procedure is described in the Celestia Wikibook. See http://en.wikibooks.org/wiki/Celestia/S ... ming_Stars
Selden

Avatar
Goofy
Posts: 280
Joined: 30.08.2011
With us: 13 years 3 months
Location: Italy

Re: Add-On Object Orbits

Post #2by Goofy » 27.07.2012, 16:34

selden wrote:
pla879 wrote:... I was possibly wanting them orbiting in a clockwise direction vice counterclockwise which Celestia uses. Any idea how I could do that? I am sure you can in Celestia however,
One way to do it is to change the inclination of the orbit by 180 degrees.

Beg your pardon, Selden, it can be equally obtained putting a "-" minus before the "period" value in .ssc :wink:
Example:

Code: Select all

   Period            11.8622
   Period           -11.8622

My little cent.
Bye

Goofy :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

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

Re: Add-On Object Orbits

Post #3by selden » 27.07.2012, 18:36

While Celestia will reverse the orbital direction if you specify a negative period, a negative period is not appropriate if you want to use astronomically correct terms. Using a different inclination would provide an astronomically correct result.
Selden

Avatar
Goofy
Posts: 280
Joined: 30.08.2011
With us: 13 years 3 months
Location: Italy

Re: Add-On Object Orbits

Post #4by Goofy » 28.07.2012, 17:48

selden wrote:While Celestia will reverse the orbital direction if you specify a negative period, a negative period is not appropriate if you want to use astronomically correct terms. Using a different inclination would provide an astronomically correct result.
Thank you Selden, understood.
Bye

Goofy :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

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

Re: Add-On Object Orbits

Post #5by selden » 28.07.2012, 20:58

Phil,

Unfortunately, Celestia does not provide a way to modify the name of a star. I wish it did! As a result, you have to redefine it completely.

RA and Dec are acronyms for Right Ascension and Declination, which are used to specify the position of an object on the sky. RA is measured along circles of latitude, circling the North and South Poles on the sky. If you watch the stars at night, you'll see them moving along those circles while the Earth rotates. Traditionally, RA has been measured in units of time (Hours, Minutes and Seconds) as a result of this movement, so one complete rotation (circle) is 24 Hours. Unfortunately, Celestia measures RA in Degrees, so if you're provided RA in Hours, you have to convert it to Degrees for Celestia to understand it. 1 hour = 15 degrees, so after you've added in the minutes and seconds, multiply the hour value by 15 to get the value that Celestia wants.

Celestia uses the standard definition for Declination, and measures it in Degrees from the projection of the Earth's equator on the sky, toward the poles. + is toward the North pole, - toward the South pole. The poles themselves are at +90 and -90 degrees.

To find the RA and Dec of a star, I normally use the Simbad astronomical service. It can tell you the RA and Dec of any cataloged "fixed" object. If you use it's "Basic Search" ( http://simbad.u-strasbg.fr/simbad/sim-fbasic ) just type in the name of the star you're interested in -- 84 Her

It'll return an informational page showing (among other things) the RA and Dec of the star.
Simbad wrote:Basic data :
* 84 Her -- Star
with radius arcmin

Other object types: * (*,AG,BD,GC,GCRV,GEN#,GSC,HD,HIC,HIP,HR,PLX,PPM,ROT,SAO,SKY#,TYC,UBV,uvby98,YPAC,YZ) , IR (IRAS,2MASS) , UV (TD1)
ICRS coord. (ep=J2000) : 17 43 21.56416 +24 19 40.1638 ( Optical ) [ 2.55 1.49 90 ] A 2007A&A...474..653V

ICRS is the modern coordinate system used to specify stars' positions. The six numbers 17 43 21.56416 +24 19 40.1638 are the star's RA (in hours, minutes, and seconds) and Declination (in degrees, minutes and seconds).

In fractional Hours, the RA is 17 + 43/60 + 21.56416/3600 = 17.72266
Multiply by 15 to get Degrees: 17.72266 *15 = 265.8399

In fractional Degrees, the Dec is 24 +19/60 + 40.1638/3600 = 24.32782

Here's the resulting STC entry for 84 Her:

Code: Select all

Star 86731 "84 Her:MyStarName"
{ RA  265.8399
  Dec  24.32782
  Distance 127.41
  AbsMag 2.77
  SpectralType "G2III"
}


Note that you do not have to provide the other catalog ids as part of the name.
Selden

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

Re: Add-On Object Orbits

Post #6by selden » 30.07.2012, 11:08

You're very welcome.

Inclination and Period work the same for a rotation (in a UniformRotation block) as for an orbit (in the main definition).
Selden

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

Re: Add-On Object Orbits

Post #7by selden » 04.08.2012, 19:54

You asked
Can I make an object (ship/station etc) rotate in the opposite dorection by using a negative value?
and my answer is "yes".

When defining rotations of objects, you should use a UniformRotation block. For example:

Code: Select all

  UniformRotation {
    Period 5
    Inclination 180
 }

and

Code: Select all

  UniformRotation {
    Period -5
    Inclination 0
 }

are functionally equivalent, but I'd prefer the first because negative periods are not physical.
Selden


Return to “Add-on development”