boogabooga
Bug Crusher
- Joined
- Apr 16, 2011
- Messages
- 3,010
- Reaction score
- 16
- Points
- 63
I’m building a spreadsheet simulation of a multi-stage rocket launch from surface to orbit accounting for variable thrust, drag, gravity, mass loss, the rotation of the earth, etc. My goal is to create a simulation that can be used to prototype pitch and thrust profiles that can be used for example to write multistage guidance files, LaunchMFD vehicle-specific pitch profiles, to help find minPitch for Velcro Rockets, to write LUA launch scripts, or to help developers build their own autopilots. I hope to remove some of the “guess-and-check” time that goes into experimenting within Orbiter.
The pitch is relative to the surface, as I understand most Orbiter pitch programs to be- I think that this is called “local horizontal.” So, I’m integrating the forces on the vehicle and keeping track of the state of the rocket- altitude, horizontal velocity, and vertical velocity, as a function of time. Obviously, the problem that arises is that the earth is actually round. The type of analysis that I am doing lends itself to analysis in a frame of reference that rotates at the same rate as the rocket. I’m trying to do this:
So I’m using the horizontal velocity as the tangential velocity, with which I can calculate the rotational velocity (omega) of the frame. To calculate state in the rotating frame, I’m trying to add the so-called “fictitious forces,” centrifugal, Coriolis, and Euler. [ame="http://en.wikipedia.org/wiki/Rotating_reference_frame"]Rotating reference frame - Wikipedia, the free encyclopedia[/ame] Now, I would have thought that the analysis of a rocket launch in the rocket’s frame of reference would be an intuitive analysis, and I expected there to be examples on the internet. I was wrong. I have only found examples of rotating frames using solid circular disks or spheres (such as Earth). Most of what I found regarding spaceflight was for perfectly circular orbits, which isn’t too much of a problem, or chastising arguments that the “fictitious” forces “do not exist” and I should be considering the real centripetal force only in an inertial reference frame. O.K. I am not interested in switching frames of references, or converting my state into orbital elements, or anything like that. I am interested in correctly accounting for the “fictitious” forces that exist in my rotating reference frame. These are the forces as I understand them:
The centrifugal force is easy enough. I use the current horizontal (tangential) velocity squared divided the current radius. The acceleration multiplied by the time-step is applied to the vertical (radial) velocity. I’m fairly convinced that this part is correct.
However, when free from external forces, the tangential velocity does not change. This is where the Coriolis force comes in. Since my frame of reference rotates with the spacecraft, the only velocity in the rotating frame is vertical (I think). (What I call the tangential velocity is really just determining the angular velocity of the frame). So, I multiply -2 times the current angular velocity (rad/sec) times the current vertical (i.e. radial) velocity. (The angle between the rotation axis and the radial direction is 90 deg, so sin(90) = 1 in the vector cross product). The acceleration multiplied by the time-step is applied to the tangential velocity, since this is the mutually perpendicular to the rotation axis and the radial.
Coriolis + centrifugal effects produce a very “orbit-like” result: the path has a clear apoapis and a periapsis, it decelerates when vertical velocity is positive and vice versa, etc. But, the “orbit” is not quite correct.
What I think is happening is that the Coriolis force is acting in the tangential direction, so it is slowing/speeding the rotation of the reference frame. This is where the Euler force should come in (I think). I’ve tried first order and second order backward differencing schemes to calculate the instantaneous change in angular velocity with time. I multiply this by the current radius, since (I think) that this is the displacement vector in the rotating frame. Again the radial direction is 90 deg to the rotation axis so sin(90) = 1 in the cross product. When the resulting Euler acceleration is applied to the tangential direction, the results are terrible. The “orbit” seems to be unbounded. I’m not sure if my problem is conceptual, numerical, or some other error. Perhaps the feedback of the Euler force influencing the future Euler force is a problem? Or perhaps I'm not applying the Coriolis force correctly since I am actually accelerating in the radial direction and not moving at a constant velocity. Has anyone worked with such a thing, or no where I can find a worked example?
Thanks.
The pitch is relative to the surface, as I understand most Orbiter pitch programs to be- I think that this is called “local horizontal.” So, I’m integrating the forces on the vehicle and keeping track of the state of the rocket- altitude, horizontal velocity, and vertical velocity, as a function of time. Obviously, the problem that arises is that the earth is actually round. The type of analysis that I am doing lends itself to analysis in a frame of reference that rotates at the same rate as the rocket. I’m trying to do this:
So I’m using the horizontal velocity as the tangential velocity, with which I can calculate the rotational velocity (omega) of the frame. To calculate state in the rotating frame, I’m trying to add the so-called “fictitious forces,” centrifugal, Coriolis, and Euler. [ame="http://en.wikipedia.org/wiki/Rotating_reference_frame"]Rotating reference frame - Wikipedia, the free encyclopedia[/ame] Now, I would have thought that the analysis of a rocket launch in the rocket’s frame of reference would be an intuitive analysis, and I expected there to be examples on the internet. I was wrong. I have only found examples of rotating frames using solid circular disks or spheres (such as Earth). Most of what I found regarding spaceflight was for perfectly circular orbits, which isn’t too much of a problem, or chastising arguments that the “fictitious” forces “do not exist” and I should be considering the real centripetal force only in an inertial reference frame. O.K. I am not interested in switching frames of references, or converting my state into orbital elements, or anything like that. I am interested in correctly accounting for the “fictitious” forces that exist in my rotating reference frame. These are the forces as I understand them:
The centrifugal force is easy enough. I use the current horizontal (tangential) velocity squared divided the current radius. The acceleration multiplied by the time-step is applied to the vertical (radial) velocity. I’m fairly convinced that this part is correct.
However, when free from external forces, the tangential velocity does not change. This is where the Coriolis force comes in. Since my frame of reference rotates with the spacecraft, the only velocity in the rotating frame is vertical (I think). (What I call the tangential velocity is really just determining the angular velocity of the frame). So, I multiply -2 times the current angular velocity (rad/sec) times the current vertical (i.e. radial) velocity. (The angle between the rotation axis and the radial direction is 90 deg, so sin(90) = 1 in the vector cross product). The acceleration multiplied by the time-step is applied to the tangential velocity, since this is the mutually perpendicular to the rotation axis and the radial.
Coriolis + centrifugal effects produce a very “orbit-like” result: the path has a clear apoapis and a periapsis, it decelerates when vertical velocity is positive and vice versa, etc. But, the “orbit” is not quite correct.
What I think is happening is that the Coriolis force is acting in the tangential direction, so it is slowing/speeding the rotation of the reference frame. This is where the Euler force should come in (I think). I’ve tried first order and second order backward differencing schemes to calculate the instantaneous change in angular velocity with time. I multiply this by the current radius, since (I think) that this is the displacement vector in the rotating frame. Again the radial direction is 90 deg to the rotation axis so sin(90) = 1 in the cross product. When the resulting Euler acceleration is applied to the tangential direction, the results are terrible. The “orbit” seems to be unbounded. I’m not sure if my problem is conceptual, numerical, or some other error. Perhaps the feedback of the Euler force influencing the future Euler force is a problem? Or perhaps I'm not applying the Coriolis force correctly since I am actually accelerating in the radial direction and not moving at a constant velocity. Has anyone worked with such a thing, or no where I can find a worked example?
Thanks.