Displaying velocity in joystick mode

General discussion about Celestia that doesn't fit into other forums.
Topic author
Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 18 years 1 month
Location: Out there...

Displaying velocity in joystick mode

Post #1by Reiko » 12.01.2007, 23:37

I notice when you get to about 100c the velocity counter switches to AU/s. Is there a way to keep it in percentages of C?
Also is there a way for me to make hot keys at what speed I want?

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: Displaying velocity in joystick mode

Post #2by Chuft-Captain » 13.01.2007, 14:27

Reiko wrote:I notice when you get to about 100c the velocity counter switches to AU/s. Is there a way to keep it in percentages of C?
Not that I know of.
Reiko wrote:Also is there a way for me to make hot keys at what speed I want?


You can use F1 to F7 but they're fixed at the following speeds:

Code: Select all

F1: 0
F2: 1000 m/s
F3: 1000 km/s
F4: 1.0c
F5: 10.0c
F6: 1.0 AU/s
F7: 1.0 ly/s


I suspect you want to set a speed of your own choosing. The only way I know of doing this is with the CelX command "setspeed".

Code: Select all

-- SetSpeed script

myCustomSpeed= function()

  mly_conversion = 1.0563664635456286120030821283171e-10
  mps = 50000.0
  obs = celestia:getobserver()
  obs:setspeed( mps * mly_conversion )
  celestia:flash("Speed Set to: "..obs:getspeed()/mly_conversion.." m/s", 2)
 end

myCustomSpeed()


I think that the mly conversion may have changed in version 1.5.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Topic author
Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 18 years 1 month
Location: Out there...

Post #3by Reiko » 13.01.2007, 17:37

I'm a star trek nerd and was wanting to have keys that represented warp drive speeds. Warp 1-9 etc.

I didn't realise how slow warp drive was until I left the solar system at warp 6. :P

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #4by Vincent » 14.01.2007, 10:18

CC, Reiko,

Chris has added event handling to Celx a while ago. You can use it to associate any key to the function of your choice. For example, using CC's example, you can write several CustomSpeed functions with different values for mps, and then associate them to different keys.

See http://celestiaproject.net/forum/viewtopic.php?t=9813 for more information.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Post #5by Chuft-Captain » 14.01.2007, 11:36

Here's one I prepared earlier :wink:... This uses a slightly older technique than that described by Vincent, however this means it will also work in 1.4.x versions.

Code: Select all

-- setCustomSpeedfunction script

setCustomSpeed= function()

  obs = celestia:getobserver()
  mly_conversion = 1.0563664635456286120030821283171e-10
  mps = 188.4955592  --(metres/second)
  obs:setspeed( mps * mly_conversion ) -- LY/s
  celestia:flash("Custom Speed = "..obs:getspeed()/mly_conversion.." ms", 2)
 end

keymap = { d = setCustomSpeed}

celestia_keyboard_callback = function(key)
     f = keymap[key]
     if f then
        f()
        return true
     end
        return false
 end

celestia:requestkeyboard(true)
repeat
     wait(60)
until false

To use this, just save the code above to a file name such as setCustomSpeed.celx.
Then run it from the File->Open Script menu in Celestia.
Thereafter, whenever you press the lowercase "d" key, it will set your speed to whatever you've entered on the line mps = 188.4955592
(until you press ESC, exit, or run another script)
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Topic author
Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 18 years 1 month
Location: Out there...

Post #6by Reiko » 14.01.2007, 13:29

Thank you guys!
Warp 5 here I go! :D

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Post #7by Chuft-Captain » 15.01.2007, 03:17

May you "boldly go at speeds no one has gone before". :lol:
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
LordFerret M
Posts: 737
Joined: 24.08.2006
Age: 68
With us: 18 years 3 months
Location: NJ USA

Post #8by LordFerret » 15.01.2007, 05:35

Reiko -

Don't know if you've seen this, but I'll post it for you anyway. :D

Warp Drive

Topic author
Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 18 years 1 month
Location: Out there...

Post #9by Reiko » 15.01.2007, 07:13

LordFerret wrote:Reiko -

Don't know if you've seen this, but I'll post it for you anyway. :D

Warp Drive


Thanks! but I have seen that and go by the TNG warp chart. I like to use warp speeds to show other star trek fans how silly it is that they go from star A to star B in a flash. :)

Avatar
LordFerret M
Posts: 737
Joined: 24.08.2006
Age: 68
With us: 18 years 3 months
Location: NJ USA

Post #10by LordFerret » 16.01.2007, 06:10

I thought the second chart shown in that link was the TNG chart (Michael Okuda's new formula)? Is there a different / newer one?

Topic author
Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 18 years 1 month
Location: Out there...

Post #11by Reiko » 16.01.2007, 14:58

LordFerret wrote:I thought the second chart shown in that link was the TNG chart (Michael Okuda's new formula)? Is there a different / newer one?

Yeah you are right. That last chart is the one I have. :)

Captain Nephilim
Posts: 23
Joined: 22.10.2005
With us: 19 years 1 month
Location: Missouri

Post #12by Captain Nephilim » 26.01.2007, 17:46

A while back, for my own geeky fun, I created a table showing real world speeds compared to warp speeds, for reference in Celestia. I think my numbers are right, and no doubt someone will correct me if not.

The warp factor values are based on Okuda's numbers from the Next Generation.

Image
-------------------------
---------------------------------
-----Cpt----------------------------------
---------Nephilim--------------------------------------
--------------------------------
--------------------
----------

starfleetengineer
Posts: 41
Joined: 18.01.2007
With us: 17 years 10 months

Post #13by starfleetengineer » 27.01.2007, 01:37

No significant stellar motion can be observed in Celestia until approx WARP 9.9999998. ( = 70,220,261.5 x C = 2.23 ly/s )

... and I should know, because I'm a startfleet engineer :)


PS.
at WARP 9.99999985 (=805,579,078.5 x C = 25.5 ly/s) ...things start to get interesting
at WARP 9.9999999 (=242,037,562,178 x C =7670 ly/s ) ... say goodbye to the MilkyWay :lol:

Avatar
LordFerret M
Posts: 737
Joined: 24.08.2006
Age: 68
With us: 18 years 3 months
Location: NJ USA

Post #14by LordFerret » 27.01.2007, 06:14

starfleetengineer...

Is that to say Okuda's new formula as used and shown in the chart available at Wikipedia is the correct and current accepted definition?

Topic author
Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 18 years 1 month
Location: Out there...

Post #15by Reiko » 27.01.2007, 10:05

LordFerret wrote:starfleetengineer...

Is that to say Okuda's new formula as used and shown in the chart available at Wikipedia is the correct and current accepted definition?


It is. I looked in my star trek encyclopedia which is like a star trek bible :D
The okuda chart is what is used however they ignored it in star trek enterprise. Nobody knows what they used in that show.

starfleetengineer
Posts: 41
Joined: 18.01.2007
With us: 17 years 10 months

Post #16by starfleetengineer » 27.01.2007, 11:00

I use a formula by Martin Shields.

Captain Nephilim
Posts: 23
Joined: 22.10.2005
With us: 19 years 1 month
Location: Missouri

Post #17by Captain Nephilim » 27.01.2007, 19:30

On another Star Trek/Celestia note: if you turn on constellation borders in Celestia, you'll see a sphere centered on Sol with a radius of 10 light years. According to a widely accepted definition, in Star Trek a "sector" is a cube 20 light years on a side. So the space inside the drawn constellation borders in Celestia is roughly equivalent to Sector 001 in the Star Trek universe. I often leave the constellation borders turned on while gallivanting about the galaxy, as a reference point.
-------------------------

---------------------------------

-----Cpt----------------------------------

---------Nephilim--------------------------------------

--------------------------------

--------------------

----------

Avatar
LordFerret M
Posts: 737
Joined: 24.08.2006
Age: 68
With us: 18 years 3 months
Location: NJ USA

Post #18by LordFerret » 28.01.2007, 05:06

starfleetengineer wrote:I use a formula by Martin Shields.


:!: Care to share it here?

starfleetengineer
Posts: 41
Joined: 18.01.2007
With us: 17 years 10 months

Post #19by starfleetengineer » 31.01.2007, 13:00

LordFerret wrote:
starfleetengineer wrote:I use a formula by Martin Shields.

:!: Care to share it here?


http://flare.solareclipse.net/cgi2/ulti ... 002585;p=0

Avatar
LordFerret M
Posts: 737
Joined: 24.08.2006
Age: 68
With us: 18 years 3 months
Location: NJ USA

Post #20by LordFerret » 31.01.2007, 22:29

starfleetengineer wrote:
LordFerret wrote:
starfleetengineer wrote:I use a formula by Martin Shields.

:!: Care to share it here?

http://flare.solareclipse.net/cgi2/ulti ... 002585;p=0


Thanks! :D


Return to “Celestia Users”