Celestia/Celx Scripting/CELX Lua Methods/CEL command seturl

seturl
seturl { url  } 

Move the camera to the location of a saved "location URL" (or Cel://URL), which you previously captured to the clipboard using the [Ctrl + C] or [Ctrl + Ins] keys.

Note: celURLs for Celestia version and version  are of type "ver=3" (last parameter in ), and not fully compatible with urlstrings of earlier version types. So the results of the CEL: seturl command and the CELX equivalents may vary when using "ver=2" urlstring types in Celestia version and version, compared to earlier versions of Celestia.

CELX equivalent for Celestia version and later :

Based on the celestia:seturl method.


 * Get an observer instance and make the observer goto the a specified celURL. If no observer is precised, the command applies to the current active one.

obs=celestia:getobserver celestia:seturl( , obs)

CELX equivalent for Celestia version and earlier :

For Celestia version and earlier, there’s no CELX equivalent for this CEL command available. The following CELX coding can be used to integrate the CEL: seturl command within a CELX script for these Celestia versions.

Based on the celestia:createcelscript and celscript:tick methods.


 * Define the following function at the beginning of your CELX script:

function CEL(source) local script = celestia:createcelscript(source) while script:tick do       wait(0) end end


 * Within your CELX script you can now call the CEL: seturl command as follows:

CEL({seturl {url  }})

Example: Position yourself on top of Mount Everest and watch a very special sunrise.

CEL:

seturl {url "cel://SyncOrbit/Sol:Earth/2009-07-21T22:47:04.72721? x=N1WRszkGAg&y=R5015O+GFA&z=h+mfTNDb2P///////////w&ow=0.551145&ox=0.273737&oy=- 0.643962&oz=0.454554&select=Sol&fov=29.1666&ts=50.0&ltd=0&p=0&rf=20227&lm=1243136&tsrc=0&ver=3" } wait { duration 180 }

CELX equivalent with celestia:seturl method for Celestia version and later :

obs=celestia:getobserver celestia:seturl("cel://SyncOrbit/Sol:Earth/2009-07-21T22:47:04.72721? x=N1WRszkGAg&y=R5015O+GFA&z=h+mfTNDb2P///////////w&ow=0.551145&ox=0.273737&oy=- 0.643962&oz=0.454554&select=Sol&fov=29.1666&ts=50.0&ltd=0&p=0&rf=20227&lm=1243136&tsrc=0&ver=3", obs) wait(180.0)

CELX equivalent with celestia:createcelscript and celscript:tick methods for Celestia version and earlier :

function CEL(source) local script = celestia:createcelscript(source) while script:tick do       wait(0) end end CEL({seturl {url "cel://SyncOrbit/Sol:Earth/2009-07-21T22:47:04.72721? x=N1WRszkGAg&y=R5015O+GFA&z=h+mfTNDb2P///////////w&ow=0.551145&ox=0.273737&oy=- 0.643962&oz=0.454554&select=Sol&fov=29.1666&ts=50.0&ltd=0&p=0&rf=20227&lm=1243136&tsrc=0&ver=3" }}) wait(180.0)

Back to CEL command index