private Vector CorrectedVector() { if (shared.Vessel != FlightGlobals.ActiveVessel) { throw new KOSException("You may only call addons:TR:correctedVect from the active vessel. Always check addons:tr:hasImpact"); } if (Available()) { Vector3 vect = TRWrapper.CorrectedDirection(); return(new Vector(vect.x, vect.y, vect.z)); } throw new KOSUnavailableAddonException("CORRECTEDDIRECTION", "Trajectories"); }
private Vector CorrectedVector() { if (shared.Vessel != FlightGlobals.ActiveVessel) { throw new KOSException("You may only call addons:TR:CorrectedVect from the active vessel and must also have a trajectories target set." + " Always check addons:tr:HasImpact and addons:tr:HasTarget"); } if (Available()) { Vector3?vect = TRWrapper.CorrectedDirection(); if (vect != null) { Vector3 vector = (Vector3)vect; return(new Vector(vector.x, vector.y, vector.z)); } throw new KOSException("Corrected Vector is not available. Remember to check addons:tr:HasImpact and addons:tr:HasTarget"); } throw new KOSUnavailableAddonException("CORRECTEDDIRECTION", "Trajectories"); }