UmbralRaptor changed the topic of #kspacademia to: https://gist.github.com/pdn4kd/164b9b85435d87afbec0c3a7e69d3e6d | Dogs are cats. Spiders are cat interferometers. | Космизм сегодня! | Document well, for tomorrow you may get mauled by a ネコバス. | <UmbralRaptor> … one of the other grad students just compared me to nomal O_o | <ferram4> I shall beat my problems to death with an engineer.
<egg|df|egg>
UmbralRaptor: ... so visiting and departing mercenaries are mostly getting crushed by the invaders, meanwhile the visiting scholar is happily strolling through their ranks to get in :D
<UmbralRaptor>
?
<egg|df|egg>
UmbralRaptor: and now the invaders decided they had enough and are heading back
* UmbralRaptor
? Johnson, Morgan, and Cousins in the UBVRI.
<egg|df|egg>
!u ?
<Qboid>
U+1F632 ASTONISHED FACE (?)
<egg|df|egg>
UmbralRaptor: arguably the visiting scholar is "overwhelmed by horror"
<egg|df|egg>
UmbralRaptor: but that's better than the visiting warriors who were overwhelmed by hammers
<UmbralRaptor>
I think that's nomal.
<UmbralRaptor>
*normal
<UmbralRaptor>
(pun intended)
e_14159 has quit [Ping timeout: 204 seconds]
e_14159 has joined #kspacademia
<egg|df|egg>
UmbralRaptor: Ꙩ_ꙩ a dwarf stabbed a goblin in the neck, and the *neck* sailed off in an arc
<Sojujiir>
The only soju available at my local liquor store is in plastic 2L bottles
<egg|df|egg>
Iskierka: cynodont!
<SnoopJeDi>
I will have apfelwein brewing by tomorrow night \o/
Sojujiir is now known as Snoozee
<Ellied>
the people on stackoverflow said to "not even think about" building an integrator for a photodiode. I did anyway, and it's *fantastic*. has probably the biggest dynamic range I've seen.
<UmbralRaptor>
o_O
ferram4 has quit [Ping timeout: 204 seconds]
APlayer has joined #kspacademia
<APlayer>
Hi!
<APlayer>
So, I was dorected here from #kspmodding - I've been looking for a place, like a PDF file or something, which lists and explains formulas on orbital mechanics and/or rocketry. And I mean somewhat deeper than vis viva, orbital period and such. I need equations to calculate off periapsis/apoapsis thrust, equations for conversion between the three types of anomaly, thrusting in any direction (not just prograde/retrograde) and possibly lots
<APlayer>
What I need this for is a tool I attempted to make a while ago, which would help plan spiralling extremely low thrust burns. It failed, but I feel like trying it again now. Does anyone know such a thing?
<UmbralRaptor>
Uh, mean/eccentric/true anomaly can be annoying since one of the steps needs an inverse trig function IIRC.
* UmbralRaptor
doesn't trust that there are analytic solutions in the low thrust regime.
<UmbralRaptor>
Oh, right. It's mean -> eccentric anomaly that goes horribly wrong.
<UmbralRaptor>
FOr sufficiently short burns outside of pro/retrograde, I suspect you could convert from orbital elements to velocity vectors, change the velocities, and convert back. Though I'd need to double check on how to do that properly in 3D. >_>;;
<UmbralRaptor>
(egg might well suggest Principia, because why not?)
<APlayer>
I don't need numerical solutions, I am fine with simulating some of the stuff in physics ticks. As for anomaly conversion, I did it with Kepler's equation, or whatever it is called. The one that you run a few times and it returns an approximate result.
<APlayer>
UmbralRaptor: I am not sure that is the correct page. :P
<UmbralRaptor>
>_>
<APlayer>
Really, I could probably find most of the stuff myself given enough Googling, but I found a big source of error and a larhe time sink is the fact that they are all in different places and I need to look through a few dozens of browser tabs to find the one page I need
<APlayer>
Also, I never really found out how to calculate changes in orbit when you're not thrusting at a special point like apoapsis or periapsis, and when you thrust is not exactly prograde or retrograde.
<APlayer>
And, referring to my original question, I don't need it to be all in one place, but it woild be nice to reduce the number of papers I need to look at and have three, four, maybe five which sum up everything I need. Kind of like an encyclopedia where I can look the stuff up.
<APlayer>
If there is none, then I am out of luck, will probably compile one myself.
BPlayer has joined #kspacademia
APlayer has quit [Ping timeout: 204 seconds]
BPlayer is now known as APlayer
BPlayer has joined #kspacademia
APlayer has quit [Ping timeout: 180 seconds]
BPlayer has quit [Read error: Connection reset by peer]
APlayer has joined #kspacademia
<egg|df|egg>
APlayer: principia has eggstensive libraries for the conversions of Keplerian elements
<egg|df|egg>
APlayer: what applications are you looking at?
<APlayer>
@egg|df|egg: So sorry, I had to leave and just pocketed my phone. I am checking here from time to time now.
<Soozee>
Unknown command, try @list
<egg|df|egg>
APlayer: did you get my messages about principia's libs for element conversion?
<APlayer>
I got your messages between 2h 16min and 2h 9min ago.
* egg|df|egg
is bad at subtraction
<APlayer>
Yes.
<APlayer>
I'd give you the time, but I doubt we live in the same time zone. :D
<egg|df|egg>
!wa time in Zurich
<Qboid>
egg|df|egg: current time in Zurich, Switzerland: 2:42:37 pm CEST | Saturday, June 3, 2017
<APlayer>
I got messages between 12:24 and 12:31
<egg|df|egg>
yup, that would be those
<egg|df|egg>
APlayer: afaik Germany is still north of Switzerland, so we're probably in the same timezone :-p
<APlayer>
Actually, I am in South Germany, so turns out we are near neighbours. :D
<egg|df|egg>
APlayer: I mean, at this time of the day if you talk to someone here there's a good chance it's CEST :-p
<APlayer>
Anyway, I am still on mobile internet and don't dare to check the links. As I understand, it's some sort of API or DLL?
<egg|df|egg>
it's code
<egg|df|egg>
but it shows the formulae used
<egg|df|egg>
so if you read it, you can see the formulae you need to get all elements from a minimal set
<egg|df|egg>
from any minimal set, which is why there are hundreds of lines of the stuff (combinatorial eggsplosion!)
<APlayer>
Ah. Because I envisioned a JavaScript solution.
<egg|df|egg>
APlayer: what's the application?
<egg|df|egg>
APlayer: anyway, you can just translate the C++ to JS if you want, the point is that this contains the formulae you want
<APlayer>
I once built a large Duna ship powered by ion engines, TheMartian style
<APlayer>
That should explain the application :P
<egg|df|egg>
oh but for that you *really* don't want the Keplerian approximation
<egg|df|egg>
you're going to have to integrate ODEs
<egg|df|egg>
otherwise your results will have nothing to do with reality
<APlayer>
It still has enough thrust for a Hohmann transfer, but the burn is spiralling and I need to know where to start it
<egg|df|egg>
yes, but that's not the point, the burn is not instant
<egg|df|egg>
which means you *have* to integrate
<APlayer>
The plan was to simulate the burn
<egg|df|egg>
yes
<egg|df|egg>
but that's *really not easy*
<APlayer>
I would split it in many tiny burns
<egg|df|egg>
you may think you can fudge it, but you can't
<egg|df|egg>
no seriously, don't do it by forward Euler
<egg|df|egg>
angry eggs will yell at you
<egg|df|egg>
:-p
<APlayer>
And approximate it as a set of many point burns
<APlayer>
Why would that fail?
<APlayer>
I mean, that's even how KSP does it :P
<egg|df|egg>
ja, ich habe das schon verstanden, das ist aber Euler, und Euler ist die schlimmste konsistente Methode
<egg|df|egg>
literally
<egg|df|egg>
you can't make anything worse and have it consistent :-p
<egg|df|egg>
APlayer: but fear not, the principia libraries have integrators!
<egg|df|egg>
many integrators!
<egg|df|egg>
so many integrators :D
<APlayer>
What's an ODE?
<Iskierka>
you could do the numeric solution of adding up a prograde burn to get an angle then aligning that with the transfer, rather than ODE, but it's still very involved
<kmath_>
<eggleroy> <Majiir> I really am imagining egg just drowning in a sea of papers https://t.co/P2iqkDT7CN
<APlayer>
egg|df|egg: Okay, I started my PC and ready to soak in whatever is to come. :D So, I looked up ODEs, now, how would I set up one such equation for my case? And what would integrating it yield?
<APlayer>
^
BPlayer has joined #kspacademia
<egg>
BPlayer/APlayer: so, what is it you are trying to do; are you just trying to simulate your flight, or to optimize it for something
<egg>
also you might want to wait til you're back on a more stable connection and on a desktop before delving too deeply into this :-p
<BPlayer>
I want to predict the trajectory of an extremely low TWR craft performing a spiralling burn to eject to a hohmann transfer.
<egg>
ok
<BPlayer>
I am now chatting from Webchat on my computer, it's alright.
<egg>
so you just want to predict, you don't have a specific target orbit?
<egg>
(if the latter, it becomes *really hard*)
<egg>
because you go from just an integration problem to an optimization problem (involving integration)
<BPlayer>
Well, to get a specific target orbit, which I eventually too want to make, I'd need a launch window planner. There are plenty of those, but they don't yield target orbits.
<BPlayer>
So, that's a story not for now.
<egg>
ok, so just simulating for now
<egg>
let's for a moment assume that there is only one body attracting you
<BPlayer>
Since this is KSP, there is indeed only one body attracting me.
<egg>
BPlayer: you know about principia, right :-p
<BPlayer>
But I don't use it. :D
<egg>
let's also assume that you always burn prograde
<BPlayer>
That's a thing I wouldn't want to do. Does it add great complexity if we burn normal/radial?
<egg>
uh, if you spend all your time burning normal (binormal is the term I'll use), you don't change your energy
<egg>
so you will not go anywhere
APlayer has quit [Ping timeout: 204 seconds]
<BPlayer>
But the transfers have a normal component to them. Plus my orbit is not quite perfect.
BPlayer is now known as APlayer
<egg>
ok, so the problem is here you're again talking about having a target orbit
<egg>
and that makes things hard
<APlayer>
Humm, well, if we say so
<egg>
so let's happily ignore the fact that you have a target orbit for now
<egg>
and just burn to see what happens
<egg>
then your position q varies as q"(t) = a_gravitational(q(t)) + a_engines(t,q'(t)); because a_engines depends on q'(t), you can't use RKN integrators that assume that q"(t) depends only on q(t); you need a general Runge-Kutta integrator
<APlayer>
This is the simple part of the problem. When ejection I just need to find how much I travelled around the planet and start by this much earlier
<APlayer>
Uhm... When ejecting*
<egg>
yeah I guess in the 2-body case that's the only thing you care about, so it's 1-dimensional root finding
<egg>
(but then the plane change makes this multidimensional and then *that* is a mess)
<egg>
so let's ignore the plane change happily
<APlayer>
However, when injecting at Duna, I would end up lowering my periapsis below the surface if I didn't account for that before starting the burn
<APlayer>
So I also need to find out how much my periapsis changes during such a burn.
<APlayer>
Also, you may ignore TWR change as the fuel is expended. It's minuscle.
<egg>
ahem. Zurück zur gewöhnliche Differentialgleichung
<APlayer>
Yes. :D
<egg>
a_gravitational(q(t)) is something you know how to compute, probably
<APlayer>
In what coordinate plane are we working?
<APlayer>
Cartesian?
<egg>
you choose :-p
<egg>
I don't care, I'm writing that coordinate-free :D
<egg>
a_engines(t,q'(t)) is easily computed by the rocket equation (there really is no point in ignoring the mass change, so might as well do things right)
<APlayer>
Well, how does q(t) work, let's start with that. In what for is q given?
<egg>
q is your position
<egg>
I don't care what coordinates you give it
<egg>
it is your position, it doesn't intrinsically have coordinates
<APlayer>
So, the second derivative of q(t) equals to the sum of the other two functions?
<egg>
yup
<egg>
the second derivative of the position is the acceleration
<egg>
and the acceleration comes from gravity and the rocket
<egg>
now, you plug that into a Runge-Kutta method
<APlayer>
Wait a second
<egg>
I have a sort of introduction to Runge-Kutta methods that you can read, it's kind of shitty, but better than nothing
<APlayer>
I assumed I was working with a Keplerian orbit at first. Which basically ignores gravitational acceleration, or, rather, it is accounted for in the very idea of it
<egg>
you could use Keplerian elements instead of q and q', but you basically would be unable to compute the effects of a burn without switching back to cartesian
<egg>
Keplerian elements are really inconvenient
<egg>
so as soon as you're doing something other than floating around in space, you switch to cartesian coordinates
<egg>
s/in space/in space with only one mass in the universe/
<Qboid>
egg meant to say: so as soon as you're doing something other than floating around in space with only one mass in the universe, you switch to cartesian coordinates
<APlayer>
Is a polar coordinate system a good choice?
<egg>
APlayer: I think it won't make your life easier
<egg>
but if you really want to, you can try :D
<APlayer>
So I better use a normal 2D cordinate system and simulate the very gravity acceleration by hand?
<APlayer>
The very basic* gravity acceleration
<egg>
well you can do it in 3d too, in fact if you want to add a radial or a normal component you will have to
<egg>
and yes
<APlayer>
Well, now that I think of it, it seems to make life... Well, acceptable.
<APlayer>
:P
<egg>
APlayer: which is why you *really* don't want to use Euler's method, otherwise your computation of gravitational acceleration will make things drift
<egg>
APlayer: have a look at that pdf I linked, it could really use some improvement, but it shouldn't require too much prior knowledge, and it should tell you what RK integrators are and very vaguely why they work
<APlayer>
Humm, thanks, will do. I need to go again for maybe half an hour, be back soon. Thanks a lot for the help so far!
<egg>
APlayer: sometimes there are big scary calculations, but as usual in such a text you can skip them and not be too worried about it
<APlayer>
egg: Okay, let me begin with what I did not understand right here: q"(t) = a_gravitational(q(t)) + a_engines(t,q'(t)) So, a_engines is a 3D function, depending on two inputs?
<egg>
yup
<egg>
actually it also depends on q(t) come to think of it
<egg>
hmm
<APlayer>
But why does the engine acceleration depend on time and the derivative of the position?
<egg>
it depends on time because of the rocket equation (your rocket gets lighter)
<egg>
it depends on velocity because you burn prograde
<APlayer>
So q(t) also includes the velocity.
<egg>
no, q is just the position
<egg>
q' is the velocity
<egg>
q" is the acceleration
<APlayer>
Makes sense. New to calculus here, sorry.
<egg>
(I call the position q and the momentum p because that's what is usual in classical mechanics)
<egg>
also the energy is called H
<egg>
because the Henergy depends on the qositions and the pomenta
<egg>
(no that makes no sense, welcome to mathematical notation)
<egg>
APlayer: one of my first courses at ETHZ started with "Sei W eine Gruppe. W wie 'Gruppe'."
<APlayer>
LOL
<e_14159>
o_O
<egg>
e_14159: it was the course on Coxeter groups
<APlayer>
No, I mean not that
<egg>
e_14159: Coxeter groups are called W pretty much always
<APlayer>
I mean it makes sense that if q is position, q' is velocity and q'' is acceleration
<egg>
yeah, I got that, but the notations never make sense :D
<e_14159>
Mathematical notation. It's as logical as language, but more modern.
<APlayer>
Didn't occur to me at first
<APlayer>
So, my acceleration is the sum of all partial accelerations. Makes sense too.
<egg>
bofh: any other fun examples of silly notation?
* egg
still thinks "Sei W eine Gruppe. W wie 'Gruppe'." is one of his favourites
<APlayer>
egg: But where does that get me?
<egg>
APlayer: well, now you need to write the computation q"(q(t), q'(t), t), and then plug that in a Runge-Kutta method
<egg>
APlayer: read the pdf, things should make more sense after that
<egg>
hopefully
<APlayer>
^ that's the key word
<egg>
possibly
<egg>
I cannot exclude that they make more sense after reading the pdf than before
<APlayer>
Also, one thing I noticed in such equations, people just get a "d" in there from somewhere. I assume it means "delta" for change in (...). But then they start doing maths with d and end up cancelling them out or doing stuff. How is that possible?
<egg>
there are many layers to answering this
<APlayer>
Well, simply, what is d?
<APlayer>
Or is that a limit for d -> 0?
<egg>
the first layer to answering this is that dx or df or whatever is just a difference that's very small; then you say "ah but really it's a limit"; then you say "I'm using d/dx as an operator on its own"; then you give a semantics to the operator d, and you can go back to dx as something meaningful, except by now it's a linear form
<egg>
APlayer: I think the easiest way to answer your question without getting into fairly elaborate concepts is to say "d on its own is meaningless"
<egg>
d/dx is an operator than you can apply to a function of x
<egg>
to get another function of x
<APlayer>
But I have equations with d. I need to know what it does...
<egg>
and there's also the integral, and there again unless you say "dx is a linear form", the easiest answer is that ∫dx is something that you apply to a function to get another one
<egg>
APlayer: it derives
<egg>
d/dx derives
<egg>
read it as ' if you want
<egg>
df(x)/dx is just another way of writing f'(x)
<egg>
the historical origin of the notation is that you can define f'(x) as the limit for Δx going to 0 of (f(x+Δx)-f(x))/Δx
<egg>
if you call (f(x+Δx)-f(x)) Δf, you get the limit as Δx goes to 0 of Δf/Δx
<egg>
and you replace the Δ by d to remind yourself that you've taken the limit
<egg>
that's the origin of the thing; then people have formalized "d" on its own in plenty of fun ways, but let's not squeeze two semesters of calculus and linear algebra into this conversation right now
<APlayer>
So, let's take a = (d^2 * s) / (d * t^2). What would the alternate notation as a' be?
<egg>
a = s"
<APlayer>
a = s'' / (t' * t) ?
<egg>
no, a is the second derivative of s
<egg>
a = s"
<egg>
it's written that way because it's (d/dt)((d/dt)(s))
<egg>
you take d/dt as a magical operator
<egg>
and then you write applying it twice as if you multiplied it by itself, which makes very little sense
<egg>
<e_14159> Mathematical notation. It's as logical as language, but more modern.
<APlayer>
Well, I did not quite understand, but let's postpone that. It's besides the point, I guess
<egg>
basically you have to read d^2/dt^2 as "d/dt, done twice"
<egg>
it's not a fraction, it's not a multiplication, there's no squaring going on
<egg>
it's just weird notation for saying "you're deriving twice with respect to t"
<APlayer>
So s * (d^2 / dt^2) = s''
<APlayer>
Okay, now it makes sense
<egg>
no, you have to write it on the left side
<egg>
it's not a multiplication
<egg>
it looks like it is, but it's not :-p
<egg>
(d^2 / dt^2) s(t) is the second derivative of s(t)
<egg>
the screwed-up thing is that s(t)(d^2 / dt^2) would mean something: it means "take whatever function you want, derive it twice in t, and *then* multiply by s(t))
<egg>
which is completely different
<egg>
APlayer: it's like when you write sin or cos or something like that, it's not a multiplication
<egg>
sin x isn't x sin
<egg>
it's the function sin applied to x
<APlayer>
Look. I really appreciate your efforts to explain this to me, but it really doesn't fit into my way-too-small head. :P I guess we may try later, but for now I just don't get it... :/
<egg>
e_14159: do you have any better eggsamples
<APlayer>
I may be confused by the fact that you can include it in a fraction and calculate with it, but it's not a multiplication
<egg>
d^2/dt^2 is just a Kreidehaufen that means "derive twice what's on the right", it's not a number or anything like that
<egg>
it's more like a function (except it's a function that takes a function, not a number)
<egg>
you have to read d^2/dt^2 as a single magical symbol, much like sin isn't s*i*n
<egg>
APlayer: ah yes, there's *also* the fact that instead of writing d^2/dt^2 f you can write d^2f/dt^2
<egg>
but that means the same thing
<egg>
but it's still not multiplication
<egg>
it's just confusing
<egg>
APlayer: never trust the weird Kreidehaufen to behave like numbers unless you know they do :-p
<APlayer>
But dt^2 in the above screenshot is dt * t
<egg>
(I guess the word Kreidehaufen makes sense only on a blackboard)
<APlayer>
Or I don't get it
<egg>
APlayer: no, it's not
<egg>
d^2/dt^2 is the second derivative, d/dt is the first
<APlayer>
So I have mistaken this as a substitution?
<egg>
it is a substitution, but the only rule you're using is that d/dt d/dt f(t) is d^2/dt^2 f(t)
<egg>
which is the definition of d^2/dt^2
<Iskierka>
(dt) and (dt^2) are their own thing that you can move around and substitute but only as a whole and only understanding what it actually means. Don't substitute things into it, it's not the same thing
<APlayer>
I think I understand now...
<APlayer>
And it is not only limited to dt but it may also be da, db or d-whatever?
<Iskierka>
yes
<APlayer>
And behaves the same then
<Iskierka>
you can use it in some intuitive ways: dy/dx * dx/dt = dy/dt. But you can't throw in anything you have for x into the x there, the dx is a different thing
<APlayer>
Okay, I think I got it. Thanks for your patience and sorry for the extra ration of stupidity today
<egg>
nah, the notation is a bit confusing at first, that's ok
<Iskierka>
they are suddenly going "yeah, we used letters all over and you could just algebra them, but this letter is a different letter and makes all the other letters different"
<egg>
yeah
<Iskierka>
(despite this it is still one of the best notations for it that explains a lot of more complex uses and behaviours)
<egg>
Iskierka: also the magical thing is that then the notation starts breaking down when you look at the operator (d/dx), but it starts working again when you realize d is a linear form
<APlayer>
egg: A variable in bold font is a vector, IIRC?
<egg>
well dx is a linear form
<egg>
APlayer: yup
<Iskierka>
sometimes they're underlined
<Iskierka>
I assume egg does bold though
<egg>
APlayer: I'm following Feynman's notation here, the idea is that you can pick this up after having read the two bits of Feynman I link and you can read it with no other requirement
<egg>
Iskierka: yeah, I'm bold
<APlayer>
egg: You mean the two links you sent me in the morning?
<APlayer>
Nearly forgot about them
<egg>
APlayer: no, I mean the stuff that's mentioned right at the beginning of the pdf
<egg>
the links I sent you this morning aren't very useful for any of this
<APlayer>
Ah
<egg>
the references to Lectures on Physics
BPlayer has joined #kspacademia
<APlayer>
Oh, my phone's joined again
<APlayer>
I'll never understand what it does. Kind of lives its own life and does things unexpectedly
BPlayer has quit [Ping timeout: 204 seconds]
<APlayer>
egg: Could you elaborate the very top of page 2, "Recall that if the RHS didn't depend on Y, the answer would be the integral, ..."?
<APlayer>
It may be something trivial, but I've never learned any integral maths yet. I know what an integral is, but not much more...
<egg>
(obviously that particular sentence isn't useful if you haven't done any calculus)
<egg>
but integral and derivative are the inverse of each other essentially
<APlayer>
They are?
<APlayer>
Well, yes, they are
<e_14159>
There's a joke on that.
<APlayer>
Wow, calculus is beautiful :D
<APlayer>
So the derivative of an integral is actually the input function?
<APlayer>
While the integral of a derivative is not necessarily, for any constants are "chopped off" in a derivative?
<Iskierka>
yes, as derivative contains only the slope and may lose the initial value
<Iskierka>
(well, will, but sometimes it's 0 and an easy assumption gets it back)
<egg>
e_14159: which joke?
<APlayer>
egg: Am I safe to skip anything between Euler's method and Runge-Kutta methods?
<egg>
well, if you skip those bits the general Runge-Kutta methods will feel like they fall out of the sky for no good reason
<egg>
APlayer: but again, the only important thing is to try and get the general idea, you don't have to follow every little calculation (in particular for a long calculation the only bit you need to look at is what you start with and what the end result is, you can come back for the gory details later :-p)
<APlayer>
Well, I trust they are better in some way or another. I guess not knowing why is the price to pay for not having to understand another 5 pages of complicated maths
<egg>
APlayer: try to at least make sense of the text
<APlayer>
Okay, will do
<e_14159>
egg: "Two male mathematicians are in a bar. The first one says to the second that the average person knows very little about basic mathematics. The second one disagrees, and claims that most people can cope with a reasonable amount of math. The first mathematician goes off to the washroom, and in his absence the second calls over the waitress. He tells her that in a few minutes, after his friend has returned, he
<e_14159>
will call her over and ask her a question. All she has to do is answer one third x cubed. She repeats "one thir -- dex cue"? He repeats "one third x cubed". Her: `one thir dex cuebd'? Yes, that's right, he says. So she agrees, and goes off mumbling to herself, "one thir dex cuebd...". The first guy returns and the second proposes a bet to prove his point, that most people do know something about basic math. He says
<e_14159>
he will ask the blonde waitress an integral, and the first laughingly agrees. The second man calls over the waitress and asks "what is the integral of x squared?".
<e_14159>
The waitress says "one third x cubed" and while walking away, turns back and says over her shoulder "plus a constant!" "
<e_14159>
More text than I expected; apologies.
<APlayer>
Wait a second... At http://imgur.com/a/DbzuH : Why does the integral side still have dt in it?
<kmath_>
YouTube - Robot Pro-Wrestling Dekinnoka!30 -Saaga VS Yogoroza-
<egg>
APlayer: it's part of the notation for the integral, the reason why it's here is the same as for the derivative (it's the limit of a discrete sum with small deltas)
<APlayer>
Uh, TBH I understood the Euler's method, but now I am totally stock at Taylor's Theorem
<APlayer>
stuck*
<APlayer>
The math's a bit too complicated for me
<APlayer>
Spooky action on a paper :P
<APlayer>
What is a vector with a "^" on it?
<Iskierka>
one that's at a birthday party
<APlayer>
:D
<APlayer>
No, seriously
<egg>
APlayer: that's a unit vector
<egg>
so the vector pointing in that direction, but with length 1
<APlayer>
Okay, thanks.
<egg>
so given a vector r, r hat would be r / norm(r)
<egg>
APlayer: what Taylor is saying is that you can approximate f(t+Δt) for small Δt if you know the derivatives of f at t, and the more derivatives you know, the better it gets (as Δt gets smaller)
<APlayer>
And why is ? ?(?0 + ∆?) ≈ ?̂1 ≈ ?1 true?
<APlayer>
Uh, I mean ?(?0 + ∆?) ≈ ?̂1 ≈ ?1
<APlayer>
Particularly, why is ?̂1 ≈ ?1?
<egg>
APlayer: oh wait no, the hat doesn't mean what I was saying
<egg>
APlayer: sometimes the hat is used to denote a unit vector, but here it's just a different vector
<egg>
I call it y_1 hat because it's a bit like y_1
<APlayer>
Oh
<APlayer>
Well, but you call it y_1 because it's a bit like y
<APlayer>
So why not y_2? :P
<egg>
I call it y_1 because it's our first step
<egg>
then you compute y_2 from y_1 etc., but I'm looking at the first step of the method
<APlayer>
Ah
<egg>
APlayer: rough idea of what Taylor is about: if I know where something is now, I can guess that it's still there the next second; if I also know that it's moving at 1m/s, I can guess that it's 1 m further; if I know that it's accelerating at 10 m/s^2 downwards, I can guess that it's an additional 5 m down, etc.
<APlayer>
Okay
<APlayer>
Got it
<APlayer>
Though I still don't get the maths
<APlayer>
And if I get what the midpoint method does, it is just Euler's method with half the time step, or what?
<APlayer>
Haha, egg, how many PhDs do you have? :P
<APlayer>
Uh, could you explain "The idea is that we want to use a weighted average (with weights b_j) of the derivative ? of ? at ? points between t_0 and t_0 + ∆? as our approximation *lambda*"
<APlayer>
No... Sorry, but the Runge-Kutta method is beyond what I can understand
<egg>
well Taylor says that this thing approximates f(x)
<APlayer>
And the greater n is, the better the approximation?
<egg>
yes, or rather, the faster it gets better as x goes to a
<APlayer>
And what is x?
<egg>
APlayer: no, midpoint is not Euler with half the step, that's still called Euler (with half the step :-p). It's Euler to get a first approximation of y_1/2, then you use *the derivative you got from that approximation* to produce your step
<egg>
APlayer: so you use Euler to get a shitty y_1/2, then you use the derivative at that shitty y_1/2 instead of the derivative at y_0 to get your y_1
<APlayer>
And Runge-Kutta approximates the best slope?
<egg>
you use Euler to get a shitty y_1; you use that shitty y_1 to get a shitty derivative; you use that shitty derivative to get another shitty y_1; you average both shitty y_1s
<egg>
and Runge-Kutta is generalizing that
<egg>
Heun and midpoint (and Euler) are all Runge-Kutta methods, but you can make better Runge Kutta methods
<egg>
by iterating many layers of less and less shitty derivatives :-p
<APlayer>
Well, at least I understood the visualization. Still not the math of it
<APlayer>
How can I get the derivative at this one point?
<egg>
well that's the only thing you have, the function that computes the derivative from the state
<egg>
that's what you start with when you have an ODE
<APlayer>
No, I can't put it all together
<APlayer>
Let me begin with the beginning
<APlayer>
So I have the function q''(t) = a_grav(g(t)) + a_eng(g(t), t)
<APlayer>
How do I even define that?
xShadowx has joined #kspacademia
<APlayer>
And then, how does this function become y' = f(t, y)?
<APlayer>
Well, no. Omit the first step, I think I am rather confused about the second one
<APlayer>
I guess the first step is that: a_grav just returns a vector based on relative angle and distance of the spacecraft to the center of gravity, a_eng returns a vector based on the heading and the mass of the spacecraft and q''(t) adds the two
<egg>
APlayer: it's explained at the beginning
<egg>
y is just a bigger vector, with q and q'
<egg>
APlayer: for some reason q is called s and q' is called v in there, probably for consistency with feynman's notations
<APlayer>
For some reason s is called q and v is called q' in here
<APlayer>
:P
<APlayer>
egg: Sorry, I am quite confused from all this maths at the moment, I really don't quite understand how your equation can be transformed to y' = f(t, y)
<egg>
well you just write y = (x, y, z, vx, vy, vz)
<egg>
where q = (x, y, z) and q' = (vx, vy, vz)
<egg>
x' = vx, y' = vy, z' = vz, and then vx', vy', vz' come from your equation for q"
<egg>
uh it's probably a bad idea to have a y inside my y
<egg>
>_>
<APlayer>
LOL
<egg>
but you get the idea, just ignore the y coordinate
* APlayer
suddenly gets two dimensional for ignoring a coordinate
<APlayer>
No, j/k. I see what you mean.
<APlayer>
Humm, but I still can't put it all together
<egg>
when you write q"=stuff(q,t), you're actually writing (x",y",z")=stuff(x,y,z,t); replace x" by vx' etc.
<egg>
and you have the bottom three entries of your equation, the top three being x' = vx, y' = vy, z' = vz
<APlayer>
bottom/top?
<egg>
uh, if you write your vectors vertically
<APlayer>
Ah
<egg>
x
<egg>
y
<egg>
z
<egg>
vx
<egg>
vy
<egg>
vz
<APlayer>
Got it
<APlayer>
So I can run the equation for each entry separately?
<APlayer>
For each vector entry, that is
<egg>
well no, because the right hand side for vx will depend on x
<egg>
and also on y, and z
<egg>
it's just a vector equation like the one for q", it's just that you have 6 entries instead of 3
<egg>
there's nothing magic about it
<APlayer>
Right now I am pretty blank. Let me just scribble down the facts I got today, get a night's sleep (and watch a SpaceX launch :P) over it, and I'll return tomorrow with hopefully more concrete questions
<APlayer>
I guess I took a bit too much for just a few hours of time to digest it
<APlayer>
Thanks a huge lot. I really appreciate your help and patience for what must seem like talking to a rock.
<soundnfury>
bofh: I feel like that's failing to respect some boundary sets.
<Ellied>
Uuuugh I hate it when devices work really well in a configuration you thought was going to be non-functional and you can't figure out why
<Ellied>
I have a relaxation oscillator setup where a capacitor charges from a photocurrent, and then a comparator drains the capacitor with a MOSFET when it reaches a threshold. For some reason, its frequency goes way *up* when I peg the threshold voltage to the positive rail.
<Ellied>
but only if the power supply rails are close to 0 and 5 volts respectively. Too high and it starts behaving as expected, e.g. never switching.
<Ellied>
I guess this must be some edge case of the op amp I'm using as a comparator (LF411)
<Ellied>
I am way below the ostensible minimum supply voltage after all
egg|phone|egg has quit [Read error: Connection reset by peer]
* egg
back
<Qboid>
egg: Agathorn left a message for you in #RO [03.06.2017 18:40:02]: "RSSTimeFormatter uses the string format that is supposed to use the local cultrue for date display, but it appears that doesn't work and perhaps Unity always uses Invariant culture. Sorry about that, I didn't know"
<Qboid>
egg: Agathorn left a message for you in #RO [03.06.2017 18:40:13]: "I'll see about maybe making a settings option for it in the future"