Help Wanted for Planetary Definition Standard
Posted: 30.08.2002, 01:16
Anybody interested in working on an XML format for .scc-file-like information to be published as a planetary definition standard, please contact SpaceGear.Org.
Real-time 3D visualization of space
https://celestiaproject.space/forum/
dtessman wrote:Anybody interested in working on an XML format for .scc-file-like information to be published as a planetary definition standard, please contact SpaceGear.Org.
Code: Select all
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="./test.xsl" ?>
<catalog>
<body name="Planet X" parent="Tau Ceti">
<geometry radius="2440"/>
<elliptical
period="0.2408 y"
semi-major-axis="0.3871au"
eccentricity="0.2056"
inclination="7.0049"/>
<customorbit name="jupiter"/>
<rotation period="1047.51" obliquity="7.01" axis-longitude="228.31"/>
<surface albedo="0.4" color=" rgb(100%,90%,45%)">
<texture type="base" image="venus.jpg"/>
</surface>
<rings inner-radius="3200km" outer-radius="4000km">
<texture image="uranus-rings.png"/>
</rings>
<atmosphere height="12km" lower-color="#ffffff" upper-color="#808080"/>
</body>
</catalog>
Have you looked at expat? (http://expat.sourceforge.net/). It is what I used for CStarsConv. It usually loads as a DLL, but I converted it to a standard library. I included it in the CStarsConv source.chris wrote:I've already got an XML format for Celestia . . . The XML parser isn't included with the Celestia distribution right now because I haven't had a chance to get libxml support working across all platforms (actually, the problem has more to do with the various incompatible versions of libxml installed on Linux machines.) Here's a sample .ssc file:
chris wrote:How does this look?...
Sum0 wrote:Well, will XML have any advantage over the current system? In particular, it doesn't look as if it'll be easy to code...
Code: Select all
<Orbit Data 2.02> // Anything set to False will disable that object and all it properties
<Planet value="True">
<Parent value="Sol"/> // I am including this so a person does not have to set moons up inside the planet tages, it will work either way
<Name value="Earth"/>
<PlanetTexture value="True"/>
<Texture value="earth.png"/>
<BumpMapTexture value="earthbumpmap.png"/>
<NightTexture value="earthnight.jpg"/>
<Color value="True" red="0.85" blue="0.85" green="1"/>
<SpecularColor value="True" red="0.5" blue="0.5" green="0.55"/>
<SpecularPower value="25.0"/>
<HazeColor value="True" red="1" blue="1" green="1"/>
<HazeDensity value="0.3"/>
</PlanetTexture>
<PlanetData value="True"> // This is all about the planet itself
<Radius value="6378"/>
<Mass value="5.97E+24"/>
<RotationPeriod value="23.9344694"/>
<Epoch value="280.5"/> // offset at default epoch J2000
<Obliquity value="-23.45"/>
<Albedo value="0.30"/>
</PlanetData>
<Atmosphere value="True">
<Height value="60"/>
<Lower value="True" red="0.5" blue="0.5" green="0.65"/>
<Upper value="True" red="0.3" blue="0.3" green="0.6"/>
<Sky value="True" red="0.3" blue="0.6" green="0.9"/>
<CloudHeight value="7"/>
<CloudSpeed value="65"/>
<CloudMap value="earth-clouds.png"/>
</Atmosphere>
<EllipticalOrbit value="True">
<Period value="1.0000"/>
<SemiMajorAxis value="1.0000"/>
<Eccentricity value="0.0167"/>
<Inclination value="0.0001"/>
<AscendingNode value="348.739"/>
<LongOfPericenter value="102.947"/>
<MeanLongitude value="100.464"/>
</EllipticalOrbit>
<RingData value="True"> //rings are allways above the euqator
<Inner value="74658"/>
<Outer value="140000"/>
<RotationPeriod value="696"/>
<Texture value="saturn-rings.png"/>
<Color value="True" red="1" blue=".88" green=".82"/>
</RingData>
</Planet>
Matt wrote:Lets see if we can work together to come up with a single standard.
Anonymous wrote:I have been working with a few people over on the VegaStrike Project http://sourceforge.net/projects/vegastrike/ trying to come up with a standard that is XML compatible and easy to read. This is what we have come up with. It is still being developed, but I would like to see if we can get both projects to use the same files for the data.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<StarSystemDefinition id="http://www.zelestra.com/sol/ssd.xml"
modified="2002-07-19T18:55:45Z">
<Name>Sol</Name>
<Epoch>2000-01-01T12:00:00Z</Epoch>
<Planet id ="4">
<Name>Mars</Name>
<Orbit>
<SemiMajorAxis>1.52366231</SemiMajorAxis>
<Eccentricity>0.09341233</Eccentricity>
<Inclination>0.049</Inclination>
<AscendingNode>49.57854</AscendingNode >
<LongitudeOfPeriapsis>336.04084</LongitudeOfPeriapsis>
<MeanLongitudeAtEpoch>355.45332</MeanLongitudeAtEpoch>
<Period>1.434</Period>
</Orbit>
</Planet>
</StarSystemDefinition>
chris wrote:How does this look? ...
Code: Select all
<elliptical
period="0.2408 y"
semi-major-axis="0.3871au"
eccentricity="0.2056"
inclination="7.0049"/>
dtessman wrote:Prevents adding metadata to the value such as a units designation.
by using <Period>02.408</Period> you can do this:
<Period unit="year">0.2408</Period>
or
<Period unit="days">87.94</Period>
Yes, XML is verbose by design.chris wrote:Sounds reasonable, though the XML format is getting quite verbose . . . I suppose that's not such a terrible thing though. What tools do you use to avoid having to hand edit the files?