Help Wanted for Planetary Definition Standard
Help Wanted for Planetary Definition Standard
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.
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years
- Location: Seattle, Washington, USA
Help Wanted for Planetary Definition Standard
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.
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:
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>
How does this look? I know bruckner expressed some interest in an XML format . . . how interested is everyone else?
--Chris
Looks Great!
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?...
Look'n good! I would suggest the use of ISO standard element and attribute naming conventions.
- Elements name are in UpperCamelCase
Attributes are in lowerCamelCase
No Dashes, Periods, or Underscores
Limit use of abbreviations and acronyms
If acronyms are used then they should be all upper case
I would like to work together with you on getting something like this published as a standard. Please let me know if this is something you would be willing to partner on.
---
Dave
SpaceGear.Org
Open Standards for Space Flight Simulation(tm)
Well, will XML have any advantage over the current system? In particular, it doesn't look as if it'll be easy to code...
"I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
Help Wanted for Planetary Definition
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...
If you use a parser library, XML is actually easier to code. There is also a formal descriptive language (XML Schema), so there is no abiguity as to what goes where and what is allowed. There is a growing "instant familiarity" factor because it is a standard. There is an ever growing base of tools for the XML creator, parser, and designer. Especially scripting based translation tools, that allow XML to be tweaked into all sorts of things, including HTML pages. Basically you are leveraging the work of lots of other coders by using XML.
My favorite part is that because XML is standard, the resulting file format (schema) can be standardized and then easily merged into larger networks of interelated documents.
Standardization means that a program such as Jim Burrows's StarGen could be tweaked once to produce a star system file that can be used directly by Celestia, be the part of SGO's Star System Definition standard, be used by a program like Unistellar's E-10 project, etc.
-----
Dave
Spacegear.Org
Open Standards for Space Flight Simulation(tm)
Oh the irony!
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.
If you haven’t guessed I’m trying to group like fields into sub categories. Lets see if we can work together to come up with a single standard.
-Matt-
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>
If you haven’t guessed I’m trying to group like fields into sub categories. Lets see if we can work together to come up with a single standard.
-Matt-
Oh the irony!
Matt wrote:Lets see if we can work together to come up with a single standard.
Matt,
Sounds good. Send whatever you got in the way of documentation over my way (dtessman@zelestra.com) and lets start a dialog on this. I would like to help where I can.
--------------
Dave
SpaceGear.Org
Open Standards for Space Flight Simulation(tm)
Oh the irony!
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.
What the hell...the font on that site are all squares?? Whats this project anyways?
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!
Here is a small sample piece of the StarSystemDefinition format (work in progress).
Numbers are not representative and lots of stuff yet to be defined.
----
Dave
SpaceGear.Org
Open Standards for Space Flight Simulation(tm)
Numbers are not representative and lots of stuff yet to be defined.
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>
----
Dave
SpaceGear.Org
Open Standards for Space Flight Simulation(tm)
More comments on XML SCC
chris wrote:How does this look? ...
Chris,
Unit designations should be separate from the data and putting the data as attributes prevents qualifiers from being put on the data.
So
Code: Select all
<elliptical
period="0.2408 y"
semi-major-axis="0.3871au"
eccentricity="0.2056"
inclination="7.0049"/>
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="day">87.94</Period>
Thats why Name is pulled out as an element in the Star System Registry. So that one could eventually add a locale.
<Name locale="Klingon">Garnash</Name>
Please check out
http://www.spacegear.org/publications/xmlschemastandards/
For a (very) brief word on Elements vs. Attributes, etc.
Last edited by dtessman on 03.09.2002, 04:28, edited 1 time in total.
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 23 years
- Location: Seattle, Washington, USA
More comments on XML SCC
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>
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?
My main concern is that Celestia's planet description contains a lot of fields for rather ad hoc visual decoration (the haze stuff comes to mind.) I suppose these could all go inside a render element or something, to distinguish them from the physical data. Anyhow, I'll be looking at this a lot more seriously once 1.2.5 is done.
--Chris
-
- Posts: 104
- Joined: 07.06.2002
- With us: 22 years 8 months
- Location: Redmond, WA
Chris,
You should check out XML Spy Suite at http://www.xmlspy.com. It's a pretty good XML editing suite. It allows you to view an XML document in a collapsible tree format. Very helpful for those "verbose" XML files. Keep in mind that XML is meant to be more descriptive than pretty.
- a b i o g e n e s i s -
You should check out XML Spy Suite at http://www.xmlspy.com. It's a pretty good XML editing suite. It allows you to view an XML document in a collapsible tree format. Very helpful for those "verbose" XML files. Keep in mind that XML is meant to be more descriptive than pretty.
- a b i o g e n e s i s -
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?
The only place where I said enough is enough and used a lot of short abbreviations was the Star System Registry (SSR). With 100,000 stars, every ten characters adds a meg! It does compress nicely however. The stars.dat database converted to SSR winds up ballooning to about 10 Meg. However the it gets compressed down to about the size of stars.dat again (2 Meg) when compressed. An example of stars.dat as an SSR is located at http://www.zelestra.com/ssr.xml.gz. If was created with CStarsConv. The SSR schema is located at: http://www.spacegear.org/schemas/. Its purpose is to be an implementation independent import/export format of star system coordinates, so it is not intended to be permanently stored on the client anyway.
I usually hand-edit these documents or use specific parser programs like CStarsConv. I am most often putting together examples for design work so hand cranking is the norm. I have seen XMLSpy, but have not actually used it, I will have to take a serious look at it soon.