-
Posts
11 -
Joined
-
Last visited
Reputation
0 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I said some bullexcrementss. The code that I showed works very well. It just that I didn't know how to correctly interpret the returned data. So now, its works fine but I still don't know how to do the same with the prograd, retrograd, target, etc.. Thanks angain for your help. NB : Nice censorbot btw XD
-
I don't speak english fluently HI ! I would like to know how to obtain the spaceship orientation (pitch, yaw, roll) for display a custom navball on my dashboard. I found this code here but it doesn't works very well (it indicates the same orientation for differents orientations) : private Quaternion updateHeadingPitchRollField (Vessel v) { Vector3d CoM, north, up; Quaternion rotationSurface; CoM = v.CoM; up = (CoM - v.mainBody.position).normalized; north = Vector3d.Exclude(up, (v.mainBody.position + v.mainBody.transform.up * (float)v.mainBody.Radius) - CoM).normalized; rotationSurface = Quaternion.LookRotation(north, up); return Quaternion.Inverse(Quaternion.Euler(90, 0, 0) * Quaternion.Inverse(v.GetTransform().rotation) * rotationSurface); } Quaternion attitude = updateHeadingPitchRollField(ActiveVessel); float pitch = (float) ((attitude.eulerAngles.x > 180) ? (360.0 - attitude.eulerAngles.x) : -attitude.eulerAngles.x); float yaw = (float) attitude.eulerAngles.y; float roll = (float) ((attitude.eulerAngles.z > 180) ? (attitude.eulerAngles.z - 360.0) : attitude.eulerAngles.z); And if it possible, I would like to know also, how to obtain the orientation of the prograde, the normal, the radial-in, the maneuver and the target. I apologies for all these questions but I didn't found a complete documentation on the subject. Thanks.
-
How to obtain the DeltaV
TheRedColossus replied to TheRedColossus's topic in KSP1 C# Plugin Development Help and Support
Ok thanks, it works very good ! But I needed to add some other classes : PartExtensions Averager ForceAccumulator Pool CelestialBodies LogMsg MyLogger Thanks a lot ! -
Sorry for my bad english : I don't speak it fluently. OS : Windows 10 (x64) - KSP version : 1.3.0.1804 Hi ! I want to obtain the deltaV for display it on the screen of my dashboard that I am making. I've had different ideas : To recover the deltaV from another add-on like Kerbal Engineer REDUX but I don't know ho to do that if it possible. To calculate it. I've already start to program a class that calculate it, but for finish it, I need to know how to know if a part is a thruster or not, and if it is, how can I get : Its type (LiquidFuel+Oxidizer or LiquidFuel+IntakeAir or Xenon) Its Isp Its thrust in vaccum or in athmosphere. Thanks.
-
TheRedColossus changed their profile photo
-
Yes. I already tried to use OpenNETCF.IO.Ports but when I use it, I can send data to my Arduino but not receive data from the Arduino (port.BytesToRead is always equals at 0). Same problem when I use the addon KSPSerialIO by zitronen : no data is received. I heard that the problem can come from Windows 10. So is there a solution (without change the OS) ?
-
Sorry for my English (I don't speak it fluently). OS : Windows 10 - KSP version : 1.3.0.1804 Hi ! I made this program that works fine : using UnityEngine; using System.IO.Ports; namespace DashboardDriver { [KSPAddon (KSPAddon.Startup.MainMenu, false)] class DashboardDriver : MonoBehaviour { public void Start() { Debug.Log ("ADDON WORKS !"); } } } Even if I had the line SerialPort port; before Debug.Log ("ADDON WORKS !"); But, when I declare a SerialPort outside a method like this : using UnityEngine; using System.IO.Ports; namespace DashboardDriver { [KSPAddon (KSPAddon.Startup.MainMenu, false)] class DashboardDriver : MonoBehaviour { private SerialPort port; //here public void Start() { Debug.Log ("ADDON WORKS !"); } } } The addon doesn't works (I don't see [AddonLoader]: Instantiating addon 'DashboardDriver' from assembly 'Dashboard driver' or ADDON WORKS ! in the console). I never see a thing like this before and I don't know how to declare the SerialPort. So I ask you for an answer. Thanks.