A question of mathematics

James.Denholm

Addon ponderer
Joined
Feb 8, 2008
Messages
811
Reaction score
0
Points
0
Location
Victoria, Australia
I need some help. Specifically, I need some formulas. If you know your maths, read on.

First of all:

Formulas relating to the Energy Project, which is a launch vehicle by Kulch.
I know that these would be better placed at the main Orbiter forums, but M6 doesn't have a good track record, if you know what I mean. NOTE: If you know of a better launch vehicle, please tell me.

1: Is their a formula to figure out the Minimum Point-of-Release Distance (in degrees) in relation to the orbit altitude (set in the launch dialog)? (See Fig1, Min PoRD = Minimum Point-of-release Distance)

2: Is there a formula to work out the time from launch to release? Or is it the same for all launches?

Secondly:

General Formulas

1: Is there a way of working out if a radius from a certain point (Point 1 in Fig2) crosses an orbit (Target Orbit in Fig2)?

2: Is there a way of working out the altitudes and co-ordinates of those 2 (or more) points (X Point 1 & 2 in Fig2)?

3: Is there a way of working out how many degrees it is from a certain point (X Point 1 or 2 in Fig2) to a major part of the orbit (say, the apoasis or pheparsis (sorry, can't spell))?

4: Is there then a way of working out how far back (in degrees) a craft would be, x seconds before reaching a certain point (X Point 1 or 2 in Fig2)? In other words, how would I figure out the average speed (degrees per second) of a craft over a section of it's orbit, from, say, Point X - 90 degrees to Point X?

5: How do I figure out the Relative Velocity of two vessels that don't have orbits at the same inclination? (This question doesn't matter so much)

For those confused, don't worry.

For those who answer, thanks.
 

Attachments

  • Fig1.jpg
    Fig1.jpg
    44.3 KB · Views: 19
  • Fig2.jpg
    Fig2.jpg
    36.4 KB · Views: 18

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,658
Reaction score
6
Points
38
Location
Hildesheim, Germany
Website
www.enderspace.de
1: Is their a formula to figure out the Minimum Point-of-Release Distance (in degrees) in relation to the orbit altitude (set in the launch dialog)? (See Fig1, Min PoRD = Minimum Point-of-release Distance)

I don't know how much you know, but this one is fairly complicated. You have changing vessels' acceleration due to mass decrease, pressure acting on engines and atmospheric drag/lift. As a consolation, I'll point you to two projects in development:

http://www.orbitersim.com/Forum/default.aspx?g=posts&t=18127
and
http://www.orbitersim.com/Forum/default.aspx?g=posts&t=18037


2: Is there a formula to work out the time from launch to release? Or is it the same for all launches?

See above. It's not the same. At launches for different inclinations the vessel has to counter
more/take more advantage of its initial velocity, that is body's rotation, which takes some small time. Add gravity that you need to counter during this countering and it's enough complicated. In practice it can be a difference of about roughly 30 seconds max

Secondly: General Formulas 1: Is there a way of working out if a radius from a certain point (Point 1 in Fig2) crosses an orbit (Target Orbit in Fig2)?

There's a way of calculating intersection of 2 orbits. Note that when you're sitting on a pad, then you also have some sort of orbit, so it can be calculated. Partially, this is what Launch MFD does, but I failed to get these calculations exactly right. The idea is to calculate normals of your orbit and the target's by using state vectors, and then calculating their cross product, which in fact is their intersection:

Code:
        h_tgt.x = pos_tgt.y * vel_tgt.z - pos_tgt.z * vel_tgt.y;
        h_tgt.y = - pos_tgt.x * vel_tgt.z + pos_tgt.z * vel_tgt.x;
        h_tgt.z = pos_tgt.x * vel_tgt.y - pos_tgt.y * vel_tgt.x;
        
        h_ves.x = pos2.y * vel2.z - pos2.z * vel2.y;
        h_ves.y = - pos2.x * vel2.z + pos2.z * vel2.x;
        h_ves.z = pos2.x * vel2.y - pos2.y * vel2.x;
        
        intersect.x = h_tgt.y * h_ves.z - h_tgt.z * h_ves.y;
        intersect.y = - h_tgt.x * h_ves.z + h_tgt.z * h_ves.x;
        intersect.z = h_tgt.x * h_ves.y - h_tgt.y * h_ves.x;


2: Is there a way of working out the altitudes and co-ordinates of those 2 (or more) points (X Point 1 & 2 in Fig2)?

You must workout the state vectors that you get for coordinates. There's no such thing as altitude of intersection since these are infinite planes artificially bound with your orbits' trajectories . It's closer to your first question.

3: Is there a way of working out how many degrees it is from a certain point (X Point 1 or 2 in Fig2) to a major part of the orbit (say, the apoasis or pheparsis (sorry, can't spell))?

Of course. From target's state vectors, you can calculate Keplerian elements and derived elements (see OrbiterSDKs API Reference, page 6). From the intersection data you can get the longitude, by calling this function, found in Orbiter's Scenario Editor (I think it's not right to paste the function's definition)

Code:
Crt2Pol (intersect);
Among three values in polar coordinates it calculates is:
Code:
double lng    = atan2 (pos.z, pos.x);
Now you just subtract longitude of periapsis or periapsis +- 180 (apoapsis) from lng and you got the difference. In Launch MFD I subtract longitude of ascending node from the longitude of intersection, to get radians left before the satellite crosses our position. Normally the lng is just an absolute number.

4: Is there then a way of working out how far back (in degrees) a craft would be, x seconds before reaching a certain point (X Point 1 or 2 in Fig2)? In other words, how would I figure out the average speed (degrees per second) of a craft over a section of it's orbit, from, say, Point X - 90 degrees to Point X?

I don't know, but I think that the state vectors are the key. For changing environment (velocity), numerical integration would be necessary I think, what you'd need is A - a starting point, B - ending point, and a function which describes the velocity change. State vectors again but I haven't figured how to do it yet.

5: How do I figure out the Relative Velocity of two vessels that don't have orbits at the same inclination? (This question doesn't matter so much)

Dunno. I bet on state vectors.

If you're interested in math only, then you got what you wanted. If you mean launching ships in Orbiter, then try [ame="http://www.orbithangar.com/searchid.php?ID=2802"]Launch MFD[/ame]

[EDIT]
If you want to know more about launching vessels in practice (in Orbiter) then I recommend reading Launch MFD docs. I see that you hunger for knowledge :)
 
Last edited:

n0mad23

Addon Developer
Addon Developer
Joined
Feb 10, 2008
Messages
1,078
Reaction score
17
Points
0
Location
Montesano
Website
soundcloud.com
Enjo -

I was going to take a stab at this one, but you've done a better job at it than I could have. I was convinced when you wrote, " no such thing as altitude of intersection since these are infinite planes artificially bound with your orbits' trajectories ." No kidding.

So, when you do figure out the equations for question #4, would you post it? I had exactly the same reaction, but stopped myself from digging up the texts as I've got papers to grade and have to do a priority check.

Well done.
 
Top