Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

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

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

seturl seturl { url <urlstring> } 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. url <urlstring> Defines the celURL to be used. No default. celURL strings do have a specific Celestia recognizable format: The string always start with "cel://"; Then: "Follow", "SyncOrbit", "Chase", "PhaseLock" or "Freeflight" Followed by the object between two "/" caharacters (e.g. "/Sol:Earth/"); --OR-- only one "/" character in case of "Freeflight". Date in the format: yyyy-mm-dd The year may be preceded by a "-" character, to indicate a year BC. Time starting with character "T" and ending with character "?" in the format: hh:mm:ss.sssss TDB-time, which is slighty different from UTC-time.For more information on TDB, UTC, and how time is used in Celestia, see Celestia/Time Scales. The observer's position (x,y,z) in space in the current reference frame: "x=" ,followed by X-position (e.g. "AKknXYYNARE") "&y=" ,followed by Y-position (e.g. "ACb9ForuURI") "&z=", followed by Z-position (e.g. "AJLCIRc5vuz//////////w") The observer's orientation (ow, ox, oy, oz): "ow=" ,followed by the OW-component of the rotation (e.g. "0.429893") "&ox=" ,followed by the OX-component of the rotation (e.g. "0.319956") "&oy=" ,followed by the OY-component of the rotation (e.g. "-0.786188") "&oz=" ,followed by the OZW-component of the rotation (e.g. "-0.307779") Then other options are possible in a row, like: "&track=" objectname "&select=" objectname "&fov=" Field of View in degrees "&ts=" timescale "&ltd=" light time delay (0 = off, 1 = on) "&p=" paused (0 = off, 1 = on) "&rf=" renderflags. The rf number is made by the sum of these individual flags:1 = stars2 = planets4 = galaxies8 = constellation lines16 = clouds32 = orbits64 = celestial grid128 = night lights256 = atmospheres512 = smooth lines for orbits1024 = eclipes shadows2048 = light travel ???4096 = ring shadows8192 = constellation boundaries16384 = auto magnitude32768 = comet tails65536 = marks131072 = partial trajectories (not implemented yet)262144 = nebulae524288 = open clusters1048576 = globulars2097152 = cloud shadows4194304 = galactic grid8388608 = ecliptic grid16777216 = horizontal grid33554432 = ecliptic "&lm=" labelflags. The lm number is made by the sum of these individual flags that indicates the labels that are shown:1 = stars2 = planets4 = moons8 = constellations16 = galaxies32 = asteroids64 = vessels128 = localities256 = comets512 = nebulae1024 = open clusters2048 = local names for constellations4096 = dwarf planets8192 = minor moons16384 = globulars "&tsrc=" ??? "&ver=3" for celestia 1.6 and above (at this time) Note: celURLs for Celestia version and version are of type "ver=3" (last parameter in <urlstring>), 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( <urlstring>, 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 <urlstring> }}]]) 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