Jump to content

Search the Community

Showing results for tags 'calculus'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Kerbal Space Program 1
    • KSP1 The Daily Kerbal
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International
  • KerbalEDU
    • KerbalEDU
    • KerbalEDU Website

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


About me


Location


Interests

Found 3 results

  1. I'm trying to write a python script (using the kRPC mod) to do a suicide burn. However, so far I always reach a velocity of 0 a few hundred meters above the ground and then proceed to plummet to my death. My assumption is that the problem is a mathematical one, as the code is fairly simple. So I'd be very grateful if someone could check my math. Alternatively, if anyone has a different solution for what I'm trying to accomplish, I'd be happy to hear that to. For simplicity's sake I assume that my spacecraft is always pointing straight up and falling straight down. I also assume that there is no atmosphere and thus no drag. So here is what I have come up with: (Handwritten version of math) t: Time since start of the burn in seconds (s) Fe: Thrust of the spacecraft's engines in Newton (N) M0: Wet Mass of the spacecraft at the beginning of the burn in Kilogram (Kg) g: Surface gravity of the body I'm landing on in meters per second squared (m/s^2) W: Weight of the spacecraft in Newton (N) W = M0 * g F: Net thrust of the engine when decelerating the spacecraft in Newton (N) F = Fe - W K: Fuel consumption of the engine in Kilograms per second (Kg/s) a(t): Acceleration (or deceleration, depending how you look at it) of the spacecraft after t seconds, taking into account the decreased mass due to fuel being burned. In meters per second squared (m/s^2) a(t) = F / (M0 - K * t) Tb: Duration of engine burn in seconds (s) Dv(Tb): Speed change of spacecraft for a burn of Tb seconds in meters per second (m/s) Dv(Tb) = Integral from 0 to TB [a(t)] dt = Integral from 0 to Tb [F / (M0 - K * t)] dt = (F/K) * ln(1 + Tb * (K/M0)) Up until this point everything is based on this reddit comment. However, I am not sure if the integration for Dv(Tb) is correct. If I do it myself I get a different result, but the dimensional analysis for my result doesn't work out, so I've been sticking to this one. v0: velocity of spacecraft at the beginning of the suicide burn in meters per second (m/s) To calculate Tb, let Dv(Tb) = (F/K) * ln(1 + Tb * (K/M0)) = v0 and solve for Tb: Tb = (e^((v0 * K) / F) - 1) * (M0 / K) Da(Tb): Distance the spacecraft falls during burn of Tb seconds in meter (m) Da(Tb) = Integral from 0 to Tb [-v0 + Dv(Tb)] dt = Integral from 0 to Tb [-v0 + (F/K) * ln(1 + t * (K / M0))] dt Because I couldn't find an analytical solution for Da(Tb) I decided to solve it numerically every tick. I now run the above calculations every tick (multiple time per second) and then check if the resulting Da(Tb) is close to (within 10m) of the current altitude of my spacecraft. If it is I know I have to start the suicide burn. However, as mentioned above, it always starts a few hundred meters to early. It shouldn't be relevant, but this is the spacecraft I'm using to test my code. In case the above is to confusing to follow, here are my handwritten notes. They should contain the same information as above but more neatly formatted. Beware my handwriting though Also, is there a way to insert latex formulas in my post? I think that would have helped a lot. And this is a copy of my code so far, if anyone is interested: So, again, if anyone is willing to check my math, I'd be very grateful.
  2. Can anyone recommend some good resources on the mathematics of orbital mechanics? I'm comfortable calculating Hohmann transfers (including alignment angle, dV budget, etc.), I can calculate dV for stages and total craft, but I'm having a hard time figuring it out past there. I'd love to be able to calculate the dV required for plane changes the new trajectory from a gravity assist the launch window for non-Hohmann transfers porkchop plots map out a spiral transfer for low thrust engines and plan re-entry trajectories. I expect some of these problems have known simple solutions, and some will require numerical integration. I'm comfortable setting up and solving either method. My background: I'm a chemical engineer. I'm comfortable solving ODEs (ordinary differential equations) and PDE (partial differential equations). I don't usually work in multi-dimensional calculus, but I do understand the basics of dot and cross products. There was a point in time in college where I was better with those. My trig is pretty good, but my calculus in cylindrical or polar coordinates isn't great. I usually use MathCAD for complex problem solving but don't have access to it right now. So I usually set up Eularian integrators in excel when I can't work out exact solutions. With a little work I could make it run Runge-Kutta instead. I've read the wikibooks articles on orbital mechanics, as well as these links http://hyperphysics.phy-astr.gsu.edu/hbase/kepler.html http://www.braeunig.us/space/orbmech.htm http://ocw.mit.edu/courses/aeronautics-and-astronautics/16-07-dynamics-fall-2009/lecture-notes/MIT16_07F09_Lec14.pdf http://www.bogan.ca/orbits/kepler/orbteqtn.html
×
×
  • Create New...