NEW addon : The volcanoes of the World

Post requests, images, descriptions and reports about work in progress here.
BillC
Posts: 19
Joined: 09.07.2003
With us: 21 years 2 months
Location: Woonsocket RI

Re: NEW addon : The volcanoes of the World

Post #41by BillC » 10.09.2008, 21:46

Very cool Vincent - it had occurred to me that scripted surface feature changes could affect all surface features, and not just volcanoes.

The Smithsonian database has a numbering system for the volcanoes - it would be better to identify the unnamed ones with this number or some other non-arbitrary identifier like latitude. I'll put together new files.
BillC

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 7 months

Re: NEW addon : The volcanoes of the World

Post #42by ElChristou » 10.09.2008, 21:56

Sounds that we will have a top level addon here! Many Tx to all the actors here! :)
Image

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 6 months
Location: Hamburg, Germany

Re: NEW addon : The volcanoes of the World

Post #43by t00fri » 10.09.2008, 22:35

Since I suggested a number of the features, many thanks from me, too!

Fridger
Image

BillC
Posts: 19
Joined: 09.07.2003
With us: 21 years 2 months
Location: Woonsocket RI

Re: NEW addon : The volcanoes of the World

Post #44by BillC » 11.09.2008, 16:08

Here's a new set of files:

volcanoes.zip


This folder contains volcanoes_locs.ssc, volcanoes_bases.ssc, and the 7 colored cmods. For both SSC files I have included unique ID's in the names of the "unnamed" volcanoes.
BillC

BillC
Posts: 19
Joined: 09.07.2003
With us: 21 years 2 months
Location: Woonsocket RI

Re: NEW addon : The volcanoes of the World

Post #45by BillC » 18.09.2008, 21:34

I've got earthquakes for you now, finally!

The National Geophysical Data Center (part of NOAA) has a database (http://www.ngdc.noaa.gov/hazard/earthqk.shtml) of almost 6000 significant earthquakes dating back to 2150 BC. It's updated regularly (most recent one is 9/11/2008!) The database is a bit of a mess, especially concerning placenames; I pretty much had to go through it with a fine-toothed comb. The locations are problematic as well - some are missing, some are imprecise, and there is no consistency about the difference between the epicenter and where the quake was felt. Finally, some quakes are measured in terms of intensity, others in magnitude, and there is no correspondence between the two scales. So I did the best I could. I gave each quake a unique name, and used color-coded stars to mark them. Color is on the same time scale as the volcanoes, and size is based on magnitude. I also culled the list to quakes larger than magnitude 7, so there are 2115 quakes in the list.

earthquakes.zip


Files include: earthquakes.ssc, and the 7 different colored star CMODs. Enjoy!

Image

PS If anyone wants the whole file of 6000 quakes, I can generate it easily enough. It slows my Celestia down to a glacial crawl!
BillC

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 6 months
Location: Hamburg, Germany

Re: NEW addon : The volcanoes of the World

Post #46by t00fri » 18.09.2008, 23:11

Excellent!

As soon as I have a little extra time I'll start playing with your new add-on.

Fridger
Image

BillC
Posts: 19
Joined: 09.07.2003
With us: 21 years 2 months
Location: Woonsocket RI

Re: NEW addon : The volcanoes of the World

Post #47by BillC » 19.09.2008, 01:39

One thing I've noticed right away is that it is difficult to select or right-click on the earthquake stars. This is a shame, because I went through a lot of trouble to get InfoURL's for each earthquake! So I fooled around with the CMODs and figured out how to put a little cross at the center of each star. This makes it considerably easier to click on the star. When I post an update, this will be included.
BillC

BillC
Posts: 19
Joined: 09.07.2003
With us: 21 years 2 months
Location: Woonsocket RI

Re: NEW addon : The volcanoes of the World

Post #48by BillC » 11.10.2008, 14:01

I have finally figured out the script I want for toggling the indicators. So now, I'm getting ready to put together a final add-on package for the Motherlode that will encompass Martin's tectonic plates + our volcanoes + my earthquakes.

About the script: used as is, it simply toggles the earthquake indicators off or on whenever the script is called from Celestia's file menu. I'm using Vincent's concept to isolate the quakes from the other surface features. Each quake has a unique name.

But with a simple edit, the script becomes a way to assign a key of your choice to do the toggling. You call the script once from Celestia, and for the rest of your session, that key will toggle the earthquakes. If you already have a table of key assignments called keyhandlers, this script will simply add this new key assignment to your existing list. Otherwise, it will create a new table called keyhandlers, add this key assignment to it, and then register the table. Scroll down past the earthquake list to see this feature.

Please note - the script below is not complete! I've truncated the list of earthquakes to save space. The script below is for illustration purposes only. The complete script can be downloaded here:
toggle_quake_indicators.zip


Code: Select all

-- Title: Toggle Earthquake Indicators

-- Script by Bill Calhoun, based on a concept by Vincent
-- Oct 2008

-- Each time this script is called, it will toggle the Earthquake Indicators either off or on.
-- If you remove the comment indicator ("--") in front of all the lines below, and then call the script, it will
-- enable a key of your choice to do the toggling, so you don't have to call the script again until
-- the next time you launch Celestia.
-- The toggle key is set to "A" (shift-a), but you can change it below.

-- Please note that if you already have created a table called keyhandler (from another script), this script will
-- simply add this new key toggle to that table.  Otherwise, it will create a new table called keyhandler.
-- This new key toggle will overwrite any pre-existing key toggle using the same key.


earthquake_list =
{
"Al-Karak (2150 BC)", "Ugarit (2000 BC)", "W Turkmenistan (2000 BC)", "Crete (1890 BC)", "Ariha (Jericho) (1566 BC)", etc, etc, (2000+ entries!), "Padang (2008 AD)", "Xinjiang Province (2008 AD)", "Loyalty Islands (2008 AD)", "Sichuan Province (2008 AD)"
}

-- function toggle_quakes()
   for k,eq in pairs(earthquake_list) do
     earthquake = celestia:find("Sol/Earth/"..eq)
     earthquake:setvisible(not earthquake:visible())
   end
   if earthquake:visible() then
     celestia:print("Earthquake Indicators activated", 2)
   else
     celestia:print("Earthquake Indicators deactivated", 2)
   end
-- end

   function handlekey(k)
     handler = keyhandlers[k.char]
     if (handler ~= nil) then
       handler()
       return true
     else
       return false
     end
   end

-- if (keyhandlers == nil) then
--   keyhandlers = { ["A"] = toggle_quakes }       -- replace A with the toggle key of your choice
--   celestia:registereventhandler("key", handlekey)
-- else
--   rawset(keyhandlers, "A", toggle_quakes)     -- replace A with the toggle key of your choice
-- end


I've written similar toggle scripts for the volcano indicators and the tectonic plates. When I wrap all this up, I'll open a new thread and make the package available there, and on the Motherlode. Thanks everybody for your help!
BillC


Return to “Add-on development”