goto for absolute not relative distances?

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
steve.wray
Posts: 17
Joined: 26.06.2002
With us: 22 years 3 months

goto for absolute not relative distances?

Post #1by steve.wray » 28.06.2002, 00:47

As far as I can tell, the celestia scripting language only allows one to travel to an object and stop at a distance from that object measured in terms of the radius of that object.

I've looked at hacking the source to introduce an alternative, but can't figure out how to compile on windows.

a) is there an existing way to goto a distance eg in AU from an object that I'm just missing?

b) should I come up with a patch for this, get it working on Linux then send the patch to someone who can compile it into a windows exe for me?

c) or what? Is there a Very Good Reason why goto *should* express distance terms of object radius?

Thanks!

Buzz
Posts: 264
Joined: 31.01.2002
With us: 22 years 8 months
Location: The Netherlands

Post #2by Buzz » 28.06.2002, 09:12

I've been playing with scripting too. The reason to express distances in radii (is that Latin?) is that the size of each object will be the same on screen if you set the distance to the same amount of radii. I made a script to look at the planets from the same distance so you can compare their sizes; this does require some calculation to express this distance in radii. If anyone is interested I will post the script.

Topic author
steve.wray
Posts: 17
Joined: 26.06.2002
With us: 22 years 3 months

Post #3by steve.wray » 28.06.2002, 09:33

The script would be a good start! Thanks!

However, from the source code it should be dead easy to
add the functionality we need.

All I have to do is find out how to compile celestia on windows.
My Linux box is a bit underpowered and has other important
things to do...

Buzz
Posts: 264
Joined: 31.01.2002
With us: 22 years 8 months
Location: The Netherlands

Post #4by Buzz » 28.06.2002, 09:52

Here is my very simple script:

******************************************************
{

# View the planets from a fixed distance from their centre of 2.5 Jupiter radii
# Calculated using radii in solarsys.ssc

select { object "Sol" }
goto { time 0 }
wait { duration 7 }

select { object "Mercury" }
goto { time 0 distance 73.15 }
wait { duration 7 }

select { object "Venus" }
goto { time 0 distance 29.49 }
wait { duration 7 }

select { object "Earth" }
goto { time 0 distance 27.99 }
wait { duration 7 }

select { object "Mars" }
goto { time 0 distance 52.59 }
wait { duration 7 }

select { object "Jupiter" }
goto { time 0 distance 2.5 }
wait { duration 7 }

select { object "Saturn" }
goto { time 0 distance 2.96 }
wait { duration 7 }

select { object "Uranus" }
goto { time 0 distance 6.81 }
wait { duration 7 }

select { object "Neptune" }
goto { time 0 distance 7.08 }
wait { duration 7 }

select { object "Pluto" }
goto { time 0 distance 156.99 }
wait { duration 7 }

}
***********************************************
Most planets become very small, because I chose Jupiter to just fill the screen. Another distance would require calculating everything again, so I like your idea to add the possibility to set a distance in AU or whatever! Can't help you with compiling on windows though :(

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 8 months
Location: Seattle, Washington, USA

Post #5by chris » 28.06.2002, 16:51

There's not a better way to do this right now, unfortunately. The scripting language in 1.2.5 will be much more flexible.

--Chris

Topic author
steve.wray
Posts: 17
Joined: 26.06.2002
With us: 22 years 3 months

Post #6by steve.wray » 28.06.2002, 22:15

chris wrote:There's not a better way to do this right now, unfortunately. The scripting language in 1.2.5 will be much more flexible.

--Chris


Excellent! Can I beta?

slashi
Posts: 18
Joined: 11.06.2002
With us: 22 years 3 months
Location: Ukraine, Odessa
Contact:

Post #7by slashi » 03.07.2002, 12:59

Isn't it a secret when we can expect next verion release?


Return to “Development”