Tags

    5/3/2021

    Comments

    5/4/2021 15:34:56 HST Gregorian Calendar
    This day I had took the Calc BC AP test in the morning so was not operating at standard capacity. This day I tried to continue with OpenCV in c++, but eventually gave up since there is like zero resources online, it is akin to doing tensorflow in c++. I switched back to python which I barely know, and then had to continue on the problem where the steroscopic thing doesn't actually work, Im still pretty sure its the camera calibration. To calibrate the camera it is the same way with the chessboard algorithm for the camera distortion and stuff, but I don't really remember what happened after I started doing it other than I never got it to work.

    5/6/2021 17:34:04 HST Gregorian Calendar
    This day I had took the US History AP test in the morning so was not operating at standard capacity. I gave up on the soft body simulation with springs for now, and repurposed the code to simulate n body gravitational systems, which was easy it only look about an hour. Then I wanted to have it calculate the conics for a 2 body system from a initial condition because I wanted to simulate trajectory of sub-orbital ICBM's and so a feedback loop like PID or something to guide them. I still don't know physics and eventually ended up on the "Orbital Equation" Wikipedia page (https://en.wikipedia.org/wiki/Orbit_equation), where it says that it is for a super small body and a really big one, and that the acceleration on the bigger body is negligible. The equation for the conic is in polar form and is r = (L^2 / (m^2 * u)) * (1/(1 + e*cos(theta))) where r is a function of theta and everything else is constants. Theta is the angle from the periapsis, I assume periapsis is what I think it is from kerbal space program. m is mass of smaller body, u is the standard gravitational parameter, which is equal to the gravitational constant times the mass of the bigger body, which is easy since in my code the gravitational constant = 1. Then L is the angular momentum which the page says is m*r^2 *theta, only problem is that theta is unknown since you need to know the periapsis position, which you need to solve the conic to get in the first place, but some other Wikipedia page says its equal to r*m*v, where v is the velocity perpendicular to the center of the system, in this case since one body is way larger it's just assumed the center of the system is the larger body. Assuming the equation for L is correct, the only variable left is e, which is the eccentricity of the orbit. It says that e = sqrt(1 + (2*E*L^2)/(m^3 * u^2)), where E is the "energy of the orbit". I have no idea what the "energy of the orbit" means or how to get it, but some other page called "Orbital eccentricity" has a similar equation but just different letters, and it says E is called the "orbital energy", and actually links to another page called "Specific orbital energy", where it says E = (v^2 / 2) - (u/r), where u = gravitational constant * (m1+m2) but m1 is so small it stays the same as the previous u, and v = the orbital speed. Then it says that orbital speed (in another page) at an instant, v = sqrt(u* (2/r - 1/a)), where a is the length of the semi major axis, but to get the semi major axis you need to know the equation, which you need to know e, which need E, which needs v, which needs the semi major axis? So I guess 2 body problem isn't actually solved? THer is an alternate equation for E which is -u/2a, but a is still the semi major axis.

    So this week Wikipedia didn't tell how to do the 2 body problem.