![]() |
![]() |
|
|
|
|
Modeling Time to Cover Distance with variable acceleration
Quote:
) |
||
|
__________________
Crash-Riding: Degrading Music One Hit At A Time- My Blog about musical things. Go here if you want to see what I think about musical things. *Evil Laugh* Hello Goblin Pathfinder! My name is Mophia! The personal blog. Go here for various wierd things, including announcements and special inside information about I:NJAC! *Really Evil Laugh* |
||
|
||
| Sponsored Links |
|
|
|
|
|
|
Member
Pilot Name: Jonboy
Join Date: Aug 2004
Posts: 314
![]() |
Re: Modeling Time to Cover Distance with variable acceleration
The force is in newtons.
The UMEC forums has them all. UMEC - View topic - Velocity Calculator program (plus theory) Yeah. A ship speed calculator tool would be nice for this site. |
|
|
||
|
|
|
Re: Modeling Time to Cover Distance with variable acceleration
T = 1 / x * acosh [ ½ * exp [ 2 * ln ( 2 ) + D * x / q ] – 1 ]
Ok, I’m guessing that this is the appropriate equation, but I’d appreciate a bit of help figuring out what the terms actually are. ‘T’ would be the time obviously, and I’m guessing the ‘D’ is where we would be putting the distance covered. I have no idea what the ‘x’ and the ‘q’ are supposed to be, and I’m guessing that the ‘acosh’ is something to do with cosine. Either that, or when Fido typed this equation, he should have used some spaces. I think I ‘get’ everything else, though I need to investigate how to program in natural logs and natural bases and all that jazz. Thanks for the link Jonboy, I think you’ve gotten me pointed in the direction I needed. ![]() *edit* Further reading of Fido's post, I noticed a couple more equations that define 'x' and 'q' x = 2 * k * q / M q = sqrt ( T / k ) ‘T’ I’m pretty sure is the thrust, and ‘M’ would probably be the mass, but I am now left just needing to know what the ‘k’ is all about. |
||
|
||
|
|
|
Re: Modeling Time to Cover Distance with variable acceleration
If you are going to copy past from another site or application you need to drop it in notepad first so it loses all the formating. Black text is just not readable here.
|
||
|
__________________
Currently working hard to break the server... >> Help support JSR through our Amazon store |
||
|
||
|
|
|
Member
Pilot Name: Jonboy
Join Date: Aug 2004
Posts: 314
![]() |
Re: Modeling Time to Cover Distance with variable acceleration
k is the drag factor (according to Muffy).
acosh is the inverse hyperbolic cosine (Inverse hyperbolic function - Wikipedia, the free encyclopedia). Which is on the standard windows calculator (check 'inv' and 'hyp' and press 'cos'), and should be in any spreadsheet program you would use for doing these calculations. I'm gonna give thanks to BaadFood here. I think it was he who figured it all out. Fido also put in some work. |
|
|
||
|
|
|
Re: Modeling Time to Cover Distance with variable acceleration
Well Jonboy, I actually am using VisualBasic, so I may need to do some additional research in how to implement it with that, but I'm gonna at least do some plug and crunch with what you've given me to test it out. Thanks for the help so far all.
![]() |
||
|
||
|
|
|
Re: Modeling Time to Cover Distance with variable acceleration
In the built in functions of vb, ln is apparently log, and log is apparently log10. Kind of an interesting way to do it, but, whatever. They also don’t have acosh (inverse hyperbolic cosine), but it can apparently be derived with what they have. What I found from Microsoft says that
acosh(n)= Log(n+ Sqrt(n*n-1)). That log would be ln when using a calculator or whatever (unless I misunderstood what they said). In this equation n would be equal to: [ ½ * exp [ 2 * ln ( 2 ) + D * x / q ] – 1 ] All the stuff that followed the acosh in the equation up there basically. To clarify the variables one more time: T = Time k = drag factor M = Mass T(The other T) = Thrust D = Distance x and q are calculated based on the inputs of the variables. I tried to implant this equation in two ways. One was to substitute everything in as one big equation. The other was to divide each of the parts of the equations into sub functions. The first method, I started out with the three equations: T = 1 / x * acosh [ ½ * exp [ 2 * ln ( 2 ) + D * x / q ] – 1 ] x = 2 * k * q / M q = sqrt ( T / k ) And did the substitutions. x = 2 * k * sqrt ( Th / k ) / M Then into the big equation Ti = 1 / (2 * k * sqrt ( Th / k ) / M) * acosh [ ½ * exp [ 2 * ln ( 2 ) + D * 2 * k * sqrt ( Th / k ) / M / sqrt ( T / k ) ] – 1 ] Then, cuz VB doesn’t have acosh itself as a function, I had to use the method they gave to calculate it. acosh(n)= Log(n+ Sqrt(n*n-1)). Then substitute the ‘n’ [ ½ * exp [ 2 * ln ( 2 ) + D * x / q ] – 1 ] Log([ ½ * exp [ 2 * Log ( 2 ) + D * x / q ] – 1 ]+ Sqrt([ ½ * exp [ 2 * Log ( 2 ) + D * x / q ] – 1 ]* [ ½ * exp [ 2 * ln ( 2 ) + D * x / q ] – 1 ]-1)). Then add the stuff that’s in front of that part of the equation for the whole kit and caboodle: Ti = 1 / (2 * k * sqrt ( Th / k ) / M) * Log([ ½ * exp [ 2 * ln ( 2 ) + D * x / q ] – 1 ]+ Sqrt([ ½ * exp [ 2 * log ( 2 ) + D * x / q ] – 1 ]* [ ½ * exp [ 2 * log ( 2 ) + D * x / q ] – 1 ]-1)). Recall that in vb, log is really ln. This method ended up resulting in the time that it would take to cover the distance flying at top speed the entire time. The other method, I would’ve thought would yield the same result, but actually gave a time significantly greater than actual. The other method, I set up separate functions to handle each of the subsections of the equation. First, I had the function that calculated q, then x (which uses q). Then I set up a function to calculate the n for inside the acosh deal. then I set up a function to calculate the acosh, which, again was Log(n+ Sqrt(n*n-1)). Then I simply calculated the 1/x*a (a= the acosh(n)). So, I’m not sure if this equation isn’t actually the right one, or if I’m just making some kinds of algebraic mistakes. Theoretically, both methods should’ve yielded the same answer, but I could have mis-parenthesized and screwed up the order of operations in one, the other or both. Maybe I should experiment more with my original looping method. I could probably come up with a sample rate that closely approximates what actually happens, but then I’m afraid that that won’t hold up if I change the value of the input variables. It would seem rather stupid of me to set up a program that has to use a different sample rate for every possible scenario that I’d be calculating with the program. Istanbul |
||
|
||
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|