So it’s understandable that the majority of videogames that involve space travel tend to gloss over its most rudimentary aspects in the interest of fun after all, who wants to be held back from kicking ass and exploring the galaxy as Commander Sheppard in Mass Effect when they don’t know how to execute a proper lift-off sequence from the surface of a planet? Kerbal Space Program dares to be different, however. It will probably still be hard for most regular human beings to wrap their heads around even 50 years from now. That will rotate the velocity vector without changing its magnitude.Do you ever wonder why people still use that tired old phrase “It’s not rocket science” when they’re trying to explain that something is simple to understand? Well, the short answer is that it’s completely relevant today: rocket science is hard. If that's the case, try using TransformDIrection instead of TransformVelocity. I guess what you are wanting is the velocity vector in Kerbin's reference frame, but orientated in the surface velocity reference frame. Because you're converting to a reference frame that moves with the vessel. I haven't run your code, but I'm guessing you are getting zeroes? If you have your velocity vector in Kerbin's reference frame (_frame) and you convert it to a velocity vector in any of the vessels reference frames, it will become zero. Item3 should then be away from and towards the surface of the planet. If you have observed that Item1 is east/west and Item2 is north/south your vessel must be near the equator, and 90 degrees away from the prime meridian. So Item1 is in the direction of x, Item2 y, and Item3 z. Vessel.Velocity() should return a vector in this reference frame (red line is the prime meridian, blue is the equator): Your friendliness and openness to suggestions paired with the good documentation and fantastic API make this one of the best, if not the best, modding project I have ever worked with :-D On a side note: The way you support this project is awesome. (And any other reference frame I found on "vessel" -) ) but I could not produce the expected result. Velocity ( referenceFrame ), referenceFrame, vessel. Now I'm trying to convert this to the speed from the viewpoint of my vessel (Forward/Backward, Left/Right, Up/Down). Item3 is a bit confusing, as it does not seem to match Flight().VerticalSpeed - but this could be my mistake. Item1 is my West/East velocity, Item2 is North/South. I now have (partially) usable results from Vessel.Velocity(). I don't want to pollute the issue on Github so I'd like to ask my question here: Like I said, way underwear imaging the complexity, but was looking into it: Like a few lines to open the port and make sure you're talking to an arduino in the begining then just a series of repeated actions to grab data from the game package it and send it over a COM port. I was breifly looking into this and am probably way underestimating the complexity but using pyserial it seemed like it would be fairly straightforward to add to a script written to monitor/control a ship. Then we can support more than just protobuf over TCP/IP - including things like serial IO, or SOAP over HTTP which would be really useful for web clients. The plan is to make it so that you can drop your own custom DLL into the gamedata folder to add additional server protocols, in much the same way that you can drop custom "service DLLs" in to add new remote procedures to the server. It's on the todo list! I've been planning on making the server protocol extensible for a while but haven't gotten around to it yet.
0 Comments
Leave a Reply. |