Welcome, Guest

Author Topic: ANOTHER xml problem  (Read 14420 times)

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
ANOTHER xml problem
« on: February 17, 2010, 04:22:24 PM »
Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<System xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Body>
<Object>Sun</Object>
</Body>
<Body>
<Object>Pi 1</Object>
<Mass>15.7079633 earths</Mass>
<Orbit>body=Sun; a=3141592.65358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
<Body>
<Object>Pi 2</Object>
<Mass>12.5663706 earths</Mass>
<Orbit>body=Pi 1; a=314159.265358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
<Body>
<Object>Pi 3</Object>
<Mass>9.42477796 earths</Mass>
<Orbit>body=Pi 3; a=31415.9265358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
<Body>
<Object>Pi 4</Object>
<Mass>6.28318531</Mass>
<Orbit>body=Pi 3; a=3141.59265358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
<Body>
<Object>Pi 5</Object>
<Mass>3.14159265</Mass>
<Orbit>body=Pi 4; a=314.159265358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
</System>

deoxy99

  • Universe Sandbox 1 Beta Team
  • *****
  • Posts: 872
  • ✨ the name's verb ✨
Re: ANOTHER xml problem
« Reply #1 on: February 17, 2010, 05:38:03 PM »
What is wrong?

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: ANOTHER xml problem
« Reply #2 on: February 17, 2010, 07:30:13 PM »
Only a sun shows up.

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: ANOTHER xml problem
« Reply #3 on: February 17, 2010, 11:19:36 PM »
I don't have time to check this tonight, but don't forget that you can always look through the Sandbox Log.txt file (in the (My) Documents\Universe Sandbox\Logs folder) and see if there are any errors listed there.

While this probably isn't the problem, Universe Sandbox doesn't deal with more than 16 digits of precision. So any number that's longer than 16 digits will be rounded to 16 digits (the decimal place can be anywhere however).

So...
3141592.65358979323846264338327950288419
Will become this...
3141592.65358979

And this...
.00000000000012345678901234567890123456789
Will become this...
.0000000000001234567890123456


Oh...
<Object> must be something in the Universe Sandbox database (like Earth or Mars or Ceres).
Then use <Name> to change the label.

<Object>Pi 1</Object>
<Mass>15.7079633 earths</Mass>

Should become something like this...

<Object>Neptune</Object>
<Name>Pi 1</Name>
<Mass>15.7079633 earths</Mass>

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: ANOTHER xml problem
« Reply #4 on: February 18, 2010, 03:56:04 PM »
I forgot.  ;D

It crashed when I load it now.

Is it too much calcualtions?

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<System xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Body>
<Object>Sun</Object>
</Body>
<Body>
<Settings>timestep=0 days</Settings>
</Body>
<Body>
<Name>Pi 1</Name>
<Mass>15.7079633 earths</Mass>
<Orbit>body=Sun; a=3141592.65358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
<Body>
<Name>Pi 2</Name>
<Mass>12.5663706 earths</Mass>
<Orbit>body=Pi 1; a=314159.265358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
<Body>
<Name>Pi 3</Name>
<Mass>9.42477796 earths</Mass>
<Orbit>body=Pi 3; a=31415.9265358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
<Body>
<Name>Pi 4</Name>
<Mass>6.28318531</Mass>
<Orbit>body=Pi 3; a=3141.59265358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
<Body>
<Name>Pi 5</Name>
<Mass>3.14159265</Mass>
<Orbit>body=Pi 4; a=314.159265358979323846264338327950288419 km; i= 3.14159265358979323846264338327950288419</Orbit>
</Body>
</System>
« Last Edit: February 18, 2010, 04:10:16 PM by NeutronStar »

Dan Dixon

  • Creator of Universe Sandbox
  • Developer
  • *****
  • Posts: 3244
    • Personal Site
Re: ANOTHER xml problem
« Reply #5 on: February 18, 2010, 05:27:26 PM »
Try adding an <Object>Earth</Object> tag for each body.

It shouldn't crash though, that's my fault. :)