Adding barycenters to existing stars...

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
Topic author
PlutonianEmpire M
Posts: 1374
Joined: 09.09.2004
Age: 40
With us: 20 years 2 months
Location: MinneSNOWta
Contact:

Adding barycenters to existing stars...

Post #1by PlutonianEmpire » 23.12.2004, 02:20

I'm having problems with adding a barycenter and a companion star to Deneb. The problem is that I'm trying to get Deneb on top of the barycenter, so I can have the companion orbit Deneb. But Deneb won't move, and Deneb III won't appear. Can anyone help? Here's the code.

Code: Select all

Barycenter "Deneb Barycenter" {
   RA 310.35797279
   Dec 45.28033423
   Distance 3227.7227722772277227722772277228
}

102098 # Deneb {
   SpectralType "A2I-a"
   AbsMag -8.73

   OrbitBarycenter "Deneb Barycenter"

   EllipticalOrbit {
      Period          1.000
      SemiMajorAxis   0.0000000000000000000000000000000000000000001
      Eccentricity    0.000
      Inclination       0.000
      AscendingNode   0.000
      ArgOfPericenter 0.000
      MeanAnomaly     0.000
   }
}

200020 "Deneb III" {
   SpectralType "M8V"
   AbsMag 10.000

   OrbitBarycenter "Deneb Barycenter"

   EllipticalOrbit {
      Period            654.0
      SemiMajorAxis     286.635
      Eccentricity        0.050
      Inclination       180.000
      AscendingNode      84.000
      LongOfPericenter   52.000
      MeanLongitude      35.000
   }
}


EDIT: Interestingly, it worked perfectly when I turned jupiter into a star...

Code: Select all

Barycenter "The Sun" {
   RA 0
   Dec 0
   Distance 0.000
   #Distance 0.00326167
}

0 "Sol:Sun" {
   SpectralType "G2V"
   AbsMag 4.83

   OrbitBarycenter "The Sun"

   EllipticalOrbit {
      Period          1.000
      SemiMajorAxis   0.0000000000000000000000000000000000000000001
      Eccentricity    0.000
      Inclination       0.000
      AscendingNode   0.000
      ArgOfPericenter 0.000
      MeanAnomaly     0.000
   }

   RotationPeriod      609.12  # 25.38 days
   Obliquity             7.25  # correct orientation relative to ecliptic
   EquatorAscendingNode 75.77  #
   RotationOffset       23.00  # standard meridian
}

200019 "Jupiter" {
   SpectralType "DAC9"
   #SpectralType "M0VII"
   AbsMag 15.812

   OrbitBarycenter "The Sun"

   CustomOrbit "vsop87-jupiter"
   EllipticalOrbit {
      Period           11.8622
      SemiMajorAxis     5.2034
      Eccentricity      0.0484
      Inclination       1.3053
      AscendingNode   100.556
      LongOfPericenter 14.7539
      MeanLongitude    34.404
   }
}
Terraformed Pluto: Now with New Horizons maps! :D

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

Post #2by selden » 23.12.2004, 04:34

You don't need a barycenter: one star can orbit around another.

Specify the central star's name in the OrbitBarycenter declaration.

Also, you don't need to specify a HIP number for an imaginary star any more.

This should work:

Code: Select all

Star "Deneb III" {
  OrbitBarycenter "Deneb"

  SpectralType...
   EllipticalOrbit...

etc


I suspect the problem is all the 0s you've specified in the orbit parameters for your version of Deneb.
EllipticalOrbit { Period 1e30 SemiMajorAxis 1e-30 }
should work.
Selden

Guest

Post #3by Guest » 23.12.2004, 06:36

Thanks. It works now. :)

Avatar
Topic author
PlutonianEmpire M
Posts: 1374
Joined: 09.09.2004
Age: 40
With us: 20 years 2 months
Location: MinneSNOWta
Contact:

Post #4by PlutonianEmpire » 23.12.2004, 06:38

Hmm... site seems to have trouble keeping me logged in, even though when I've been here for a few hours already...
Terraformed Pluto: Now with New Horizons maps! :D


Return to “Development”