Relative velocity/speed

All about writing scripts for Celestia in Lua and the .cel system
Topic author
amaury
Posts: 32
Joined: 05.03.2006
With us: 18 years 8 months
Location: paris

Relative velocity/speed

Post #1by amaury » 13.03.2006, 12:06

Hi,

does anyone know how i could calculate the relative velocity (or speed, to make things simpler) of an object relative to another object ?

I guess the orbital elements of both are enough, but i am not too much into formulas... :)

Any hint ?

thankx
Amaury

Topic author
amaury
Posts: 32
Joined: 05.03.2006
With us: 18 years 8 months
Location: paris

Post #2by amaury » 13.03.2006, 12:07

forgot to mention that both objects would be orbiting the sun...

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

Post #3by Chuft-Captain » 13.03.2006, 13:02

I think you're going to have to study up on keplerian mechanics and vector maths. Objects in Celestia are in elliptical orbits, so they're not always moving at the same orbital velocity.
You'll need to work out the velocity and direction of each object at a point in time, each expressed as a 3-dimensional vector, then you should be able to subtract one vector from the other to give the relative velocity.
Here's a reference for the Vector math:
http://www.sparknotes.com/physics/vecto ... tion1.html
You should also find what you need on the keplerian stuff at that site as well.

I don't know of any way in Celestia to just plug in orbital elements and get out relative velocity, so you might have to do the math (I suggest a spreadsheet, once you've worked out the formulae you need, to make it easier on yourself.)

Sorry I can't be more help, but that's how I'd attack it. If anyone knows a better way, jump in!

:)
"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
amaury
Posts: 32
Joined: 05.03.2006
With us: 18 years 8 months
Location: paris

Post #4by amaury » 13.03.2006, 18:14

Thanks a lot ! I'll check it out right away!!

Topic author
amaury
Posts: 32
Joined: 05.03.2006
With us: 18 years 8 months
Location: paris

Post #5by amaury » 29.07.2006, 18:21

I finally managed to find time to dig into vectors and stuff.

It took me a while, but i think i now have a relative velocity (Vinfinity) display script. I checked solar planets velocities and some asteroid-Earth close approaches and it seems accurate.

If anyone thinks it is not right, please tell me, my understanding of motion physics is limited.

There you go:

relative velocity calculator (largely based on Toti's orbitalspeeds.celx script, and still beta)

amaury

symaski62
Posts: 610
Joined: 01.05.2004
Age: 41
With us: 20 years 6 months
Location: france, divion

Post #6by symaski62 » 29.07.2006, 23:14

windows 10 directX 12 version
celestia 1.7.0 64 bits
with a general handicap of 80% and it makes much d' efforts for the community and s' expimer, thank you d' to be understanding.


Return to “Scripting”