Page 1 of 1

Interstellar travel calculator

Posted: 28.03.2017, 16:25
by john71
I found this nice online javascript program:

http://nathangeffen.webfactional.com/spacetravel/spacetravel.php

Is it possible to integrate something like this into Celestia?

I mean

1.) mark a destination star or planet (automatic distance input)

2.) input spacecraft mass, acceleration, maximum speed, fuel energy conversion rate

3.) output fuel mass and traveling time.

Can it be done?

Posted: 28.03.2017, 22:01
by selden
In principle a Lua function could do it, either as a CelX script or invoked by a ScriptedOrbit.

Posted: 30.03.2017, 15:29
by john71
Do you know any similar script I can download?

The only slightly similar one I found is "Two Objects Relative Info" CELX. This script displays relative Distance, Latitude and Longitude, as well as speeds: Total, Radial, Transversal and Angular for any 2 objects.
http://www.celestiamotherlode.net/creators/SU(3)xSU(2)xU(1)/2ObjectsRelativeInfov2.zip

Posted: 30.03.2017, 15:39
by selden
Here's an external calculator written in javascript. Maybe someone could translate it into Lua.

http://nathangeffen.webfactional.com/spacetravel/spacetravel.php

Posted: 31.03.2017, 13:27
by john71
Lol I meant similar CELX script. I want to reverse engineer a slightly similar one, it is quicker than starting from scratch...