Move from one location on earth to another

All about writing scripts for Celestia in Lua and the .cel system
Topic author
rjara
Posts: 5
Joined: 17.10.2008
With us: 16 years 1 month

Move from one location on earth to another

Post #1by rjara » 17.10.2008, 14:36

Hi All, I'm new to Celestia...

I've been searching the forum for hours and have not found the info i looking for. :(

All i want to do is have a scrip rotate earth... let sat we start by viewing Australia then the script moves/rotated earth to view say West Africa as it does i'll record to avi.

I'm trying to make a video showing earth rotating from one place to another...etc.

I sure this is a simple script but as a newbie I cant figure it out...help!

In Advance thanks. :D
Rick

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: Move from one location on earth to another

Post #2by BobHegwood » 17.10.2008, 19:18

Just go to the Motherlode repository for scripts and download and look at a few of them.
They are located HERE.

You have a choice of either CEL scripts or CELX scripts. If you are just learning this stuff,
I would suggest getting a CEL script to start with. CELX is so damned confusing (at least to me)
that *I* can learn nothing from it. :wink:
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Topic author
rjara
Posts: 5
Joined: 17.10.2008
With us: 16 years 1 month

Re: Move from one location on earth to another

Post #3by rjara » 17.10.2008, 21:41

Thanks... any script in particular you might care to point me too.

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: Move from one location on earth to another

Post #4by BobHegwood » 17.10.2008, 21:45

rjara wrote:Thanks... any script in particular you might care to point me too.

Try either the Venus or Mercury Tours... They are mine, and I recommend them ONLY
because they were written by me. A Brain-Dead Old Geezer. :wink:
In other words, if I can do it, then you should be able to. :)

If you just want a script to see how it is done, you can also try one of the smaller, script
only tours, like the one for the Earth or for Mars.
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Topic author
rjara
Posts: 5
Joined: 17.10.2008
With us: 16 years 1 month

Re: Move from one location on earth to another

Post #5by rjara » 17.10.2008, 22:00

Cool, I'll check them out thanks.

Topic author
rjara
Posts: 5
Joined: 17.10.2008
With us: 16 years 1 month

Re: Move from one location on earth to another

Post #6by rjara » 18.10.2008, 03:19

Ok looking at your script bob...

question...how do i get the longitude and latitude to use in the command below for a specific location?

Code: Select all

gotolonglat {time 8.0 distance 5.0 longitude -25.0 latitude -10.0

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: Move from one location on earth to another

Post #7by BobHegwood » 18.10.2008, 09:19

rjara wrote:Ok looking at your script bob...

question...how do i get the longitude and latitude to use in the command below for a specific location?

Code: Select all

gotolonglat {time 8.0 distance 5.0 longitude -25.0 latitude -10.0

Assuming that this is from the Earth Tour script, then the location's Longitude and Latitude
came from the earth_locs.ssc file which is located in the Celestia\data folder. Simply open
with a text editor and search for the location you are interested in.

If the code came from the Mars Tour, then you would look in the corresponding mars_locs.ssc
file.

Hope that helps a bit.

EDIT:
One other piece of advice for you here. You can also find both CEL and CELX scripting guides which
(although they are somewhat outdated) can still be of great use to newcomers. See HERE.
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Topic author
rjara
Posts: 5
Joined: 17.10.2008
With us: 16 years 1 month

Re: Move from one location on earth to another

Post #8by rjara » 18.10.2008, 15:41

ok i think i got something i can play with and modify/build as i learn more...

i'm using this site http://nedwww.ipac.caltech.edu/forms/calculator.html to convert google earth equatorial cordinates to ecliptic

:D

Code: Select all

{
select {object "Sol/Earth"}
center {time 5.0}
wait {duration 5.0}
#follow {}
#goto {time 8.0 distance 5.0}
wait {duration 8.0}
print {text "Australia" row -4 column 1 duration 10.0}
gotolonglat {time 8.0 distance 3 longitude 128 latitude -25}
wait {duration 8.0}
print {text "West Africa" row -4 column 1 duration 10.0}
gotolonglat {time 8.0 distance 3 longitude 12  latitude 4}
wait {duration 10.0}
}


Return to “Scripting”