 18

Community Reputation

0 Neutral

• Rank
Bottle Rocketeer
1. reflections [1.3+] WindowShine-v16 - Gold foil update (26 December 17)

I get this, too. Also the backside of panels are not reflective. Blue sides of smaller panels and the windows/helmets work, etc.
2. [1.4.x,1.3.x,1.2.2] kRPC: Remote Procedure Call Server (v0.4.7, 27th July 2018)

So I have been working on a mission control-esque display using kRPC. Shows the vessels pitch, yaw and overall displacement relative to the velocity or prograde vector. Also can rotate the vector to match in game, give or take (some math is definitely a bit broken) It's coming along quite nicely so far. kRPC has proven to be easy to code with.
3. And here comes Pablo with an even older one. I am from Orbiter, been playing since Harv posted a link to KSP on O-F. So I have been playing since the first day of public release. I remember us trying to set altitude records in the first couple days. Pretty sure I held the record for awhile. The game got pretty angry when I was escaping kerbins SOI, very jittery.
4. [1.4.x,1.3.x,1.2.2] kRPC: Remote Procedure Call Server (v0.4.7, 27th July 2018)

Glad it will be useful. Your documentation has been coming along nicely, which has been super helpful.
5. [1.4.x,1.3.x,1.2.2] kRPC: Remote Procedure Call Server (v0.4.7, 27th July 2018)

Awesome, that did it. Thanks a bunch for the help! Here is my code snippet for finding pitch and yaw relative to the vessels velocity vector, in case anyone else wants this down the road. Save them the headache of flipping triangles and axes like I did all day. import krpc, math conn = krpc.connect(name='Pitch/Yaw') vessel = conn.space_center.active_vessel while True: # x north # y normal to surface # z forward direction = vessel.direction(vessel.orbit.body.reference_frame) velocity = vessel.velocity(vessel.orbit.body.reference_frame) # x yaw # y pitch # z roll # direction unit vector, with corrected axes x0 = direction y0 = direction z0 = direction # calculate unit vector of velocity magnitude = math.sqrt( velocity**2 + velocity**2 + velocity**2 ) v = (velocity/ magnitude, velocity/ magnitude, velocity/ magnitude) # velocity unit vector, with corrected axes x1 = v y1 = v z1 = v # calculate pitch pitch = math.acos((x0*x1 + y0*y1 ) / (math.sqrt(x0**2 + y0**2) * math.sqrt(x1**2 + y1 **2))) * (180 / math.pi) # pitch is positive if velocity is below attitude, negative if above (this is arbitrary) if x0 > x1: pitch = -pitch # calculate yaw yaw = math.acos((y0*y1 + z0*z1 ) / (math.sqrt(y0**2 + z0**2) * math.sqrt(y1**2 + z1 **2))) * (180 / math.pi) # yaw is positive if velocity is left of attitude, negative if right (this is arbitrary) if y0 < y1: yaw = -yaw print "pitch: {:+07.2f} yaw: {:+07.2f}".format(pitch, yaw) Spacial reasoning is the hardest thing I encountered working on this so far, understanding which axis was the one I wanted to work with, etc, and especially knowing which reference frame I required.
6. [1.4.x,1.3.x,1.2.2] kRPC: Remote Procedure Call Server (v0.4.7, 27th July 2018)

Yeah, the numbers do work out when when in a complete orbit. I also want to be able to calculate my attitude against prograde during ascent and descent, and I get numbers that don't match when in the atmosphere/suborbital: prograde: (0.6492723060508789, -0.00322239392899013, 0.7605492020722537) direction: (0.8629220494448264, -0.004159275196002663, 0.5053202365175846) I also tried that with surface reference frame, and similar results. I thought flight().velocity might be a solution for this suborbital problem, but all I can ever get that method to return is (0.0, 0.0, 0.0) What I am trying to do is have a 2D display of the vessel's attitude, one relative to the surface (where flight().pitch, .heading etc will work out-of-the-box) and then another that is relative to the vessels trajectory, so you can see a capsules orientation during reentry, for example.
7. [1.4.x,1.3.x,1.2.2] kRPC: Remote Procedure Call Server (v0.4.7, 27th July 2018)

Also, question. I think I am misunderstanding the unit vectors from the reference frames. I am trying to find the angle of pitch and yaw of a vessel from it's prograde vector. I am using vessel.direction(vessel.orbital_reference_frame) and vessel.flight(vessel.orbital_reference_frame).prograde. If a vessel is pointing prograde, I would expect the values of vessel.direction and flight.prograde to be nearly identical if in the same reference frame, but they are not.
8. [1.4.x,1.3.x,1.2.2] kRPC: Remote Procedure Call Server (v0.4.7, 27th July 2018)

As a heads up, it looks like you just moved where you host your docs, and the generation for the docs gives incorrect method names. Like the reference frames are all CamelCase, like vessel.SurfaceReferenceFrame, but in actuality they are snake_case vessel.surface_reference_frame. Poking at your code it looks like you have a method to change from CamelCase to snake_case, so your docs generator is pulling out unusable method names.
9. Wikis are pretty good for this though. Mod devs can go and add their new mod to the wiki right away. More than one person has access to the list to update it (what if the maintainer goes on vacation, or computer breaks, etc?) I think a page on the KSP wiki is the best way to keep a mod list neat and always up to date, while in this early stage of KSP.
14. 