Cham wrote: The plug-in checks the Class of the object AND its size.
Does the "Mass" statement get ignored completely?
Cham wrote:The SSC code above is not well designed for Celestia 1.6, since the Class isn't defined. So, in this case, the plug-in assumes that the object is a planet (exactly as Celestia 1.6) ! You really need to add a Class in the SSC code. In the case shown above, your component should be described as what it is, actually : a "spacecraft" or a "component".
Agreed - As I said, it's currently undergoing conversion from circa.1.3/1.4 to 1.6 code, so the posted code is a WIP, but what you suggest regarding Class definition is already planned.
Cham wrote:Chuft-Captain wrote:I suspect that the "2 millions of solar masses is caused by the "Period 1e12" statement.
Actually it's the reverse ! For a given distance, a large mass implies a faster revolution, since [tex]T \propto \frac{1}{\sqrt M}[/tex]. Or for a given period, [tex]M \propto a^3[/tex]. So larger is the size of the orbit, larger is the mass which makes the objet revolves for the given period. This is exactly the case of your component, since the plug-in says it's revolving with a period of 24 hours only (1 day !). For a distance of 4.50 AU to its central mass, the central mass must be huge to make the object revolving in that short period of time !
Hang on though Cham, the 24 hours is the "Rotation Period" of the Rung, NOT an "orbital" period. Each Rung rotates about it's own axis to provide a 24 hour day-night cycle. (like the Earth rotates about it's axis)
This however has nothing at all to do with it's Orbit, so IMHO has not a lot to do with Keplers Laws.
In fact, as the Rung's position is fixed to the Ladder...
Code: Select all
OrbitFrame { BodyFixed { Center "Sol/Ladder Section 109" }}
FixedPosition [ 0 0 0]
... it effectively has the same
orbital period (relative to Sol) as the Ladder (1e12 years).
But, more correctly, it has a fixed orbit (with infinite or zero period) relative to the Ladder.
Cham wrote:The origin of this weirdness is that your component (Rung Section 109) is fixed in a frame which is rotating with a period of 24h, while its "parent" is Sol (that's from your SSC). Like what I've said, the only way to get relevant values in the plug-in is to define the object's Class according to what it should be : a "component", i.e. a part of the Ladder Section 109 (since the Rung Section 109 is defined relative to it, in the SSC code above).
I'm planning to change the Parent to be the Ladder. The use of Sol as the Parent is a hangover from 1.3/1.4.
Notwithstanding this fact, I think your addon should be using the OrbitFrame Center if it's available rather than the lexical "parent" to determine the Orbital parameters (and then it wouldn't matter iwhether I changed the Parent, or left it as "Sol".)
I may be over-stating, but in 1.6 the lexical parent becomes effectively irrelevant as far as the orbit is concerned when an OrbitFrame defines the orbit. (as is the case in the Pluto-Charon system.)
Cham wrote:Believe me, I know EXACTLY how SSC is working in Celestia 1.6, especially since I made several complicated addons myself, with reference points, barycenters, ScriptedOrbits, etc. AFAIK, the plug-in was made to take care of most (if not all) of the SSC possibilities (assuming that addons creators are making their SSC correctly, for Celestia 1.6).
It may be difficult to cover all the possibilities that the Reference Frames provide for, but recognizing the difference between OrbitFrames and BodyFrames would be a good start. It definitely shouldn't be assuming that the 24 hour period has anything to do with it's orbit in this example.
Perhaps some of these issues will sort themselves out when my upgrade is complete, but there seems to be a little confusion in your script wrt. RotationPeriod vs OrbitalPeriod, BodyFrame vs OrbitFrame.
Hope this feedback is useful.
Cheers
CC