Exemplo n.º 1
0
 public static Servo ServoWithName (KRPC.SpaceCenter.Services.Vessel vessel, string name)
 {
     CheckAPI ();
     var servo = IRWrapper.IRController.ServoGroups
         .Where (x => x.Vessel.id == vessel.Id)
         .SelectMany (x => x.Servos)
         .FirstOrDefault (x => x.Name == name);
     return servo != null ? new Servo (servo) : null;
 }
Exemplo n.º 2
0
 public static void ProcedureSingleArgNoReturn (KRPC.Schema.KRPC.Response data)
 {
     Service.ProcedureSingleArgNoReturn (data);
 }
Exemplo n.º 3
0
 public static void ProcedureEnumArg (KRPC.Schema.Test.TestEnum x)
 {
     Service.ProcedureEnumArg (x);
 }
Exemplo n.º 4
0
 public static ServoGroup ServoGroupWithName (KRPC.SpaceCenter.Services.Vessel vessel, string name)
 {
     CheckAPI ();
     var servoGroup = IRWrapper.IRController.ServoGroups.FirstOrDefault (x => x.Vessel.id == vessel.Id && x.Name == name);
     return servoGroup != null ? new ServoGroup (servoGroup) : null;
 }
Exemplo n.º 5
0
 public static double closestAppDist(KRPC.SpaceCenter.Services.Vessel ves)
 {
     Vessel target = ves.InternalVessel.targetObject as Vessel;
     return ves.InternalVessel.orbit.NextClosestApproachDistance(target.orbit, Planetarium.GetUniversalTime());
 }
Exemplo n.º 6
0
 public static IList<ServoGroup> ServoGroups (KRPC.SpaceCenter.Services.Vessel vessel)
 {
     CheckAPI ();
     return IRWrapper.IRController.ServoGroups.Where (x => x.Vessel.id == vessel.Id).Select (x => new ServoGroup (x)).ToList ();
 }
Exemplo n.º 7
0
 public static string biome(KRPC.SpaceCenter.Services.Vessel ves)
 {return ves.InternalVessel.mainBody.BiomeMap.GetAtt(ves.InternalVessel.latitude * Math.PI / 180d, ves.InternalVessel.longitude * Math.PI / 180d).name; }
Exemplo n.º 8
0
 public static KRPC.Utils.Tuple<int,bool> TupleDefault (KRPC.Utils.Tuple<int,bool> x)
 {
     return Service.TupleDefault (x);
 }
Exemplo n.º 9
0
 public static double relativeVel(KRPC.SpaceCenter.Services.Vessel ves)
 {
         Vessel target = ves.InternalVessel.targetObject as Vessel;
         Vector3d deltav = OrbitalManeuverCalculator.DeltaVToMatchVelocities(ves.InternalVessel.orbit, Planetarium.GetUniversalTime(), target.orbit);
         return deltav.magnitude;
 }
Exemplo n.º 10
0
 public static double phaseAngle(KRPC.SpaceCenter.Services.Vessel ves)
 {return ves.InternalVessel.orbit.PhaseAngle(ves.InternalVessel.targetObject.GetOrbit(), Planetarium.GetUniversalTime()); }
Exemplo n.º 11
0
 public static double ClosestAppVel(KRPC.SpaceCenter.Services.Vessel ves)
 {
         Vector3d dV = OrbitalManeuverCalculator.DeltaVToMatchVelocities(ves.InternalVessel.orbit, Planetarium.GetUniversalTime(), ves.InternalVessel.targetObject.GetOrbit());
         return dV.magnitude;
 }
Exemplo n.º 12
0
 public static double timeDn(KRPC.SpaceCenter.Services.Vessel ves)
 {return ves.InternalVessel.orbit.TimeOfDescendingNodeEquatorial(Planetarium.GetUniversalTime());}
Exemplo n.º 13
0
 public static double relativeInc(KRPC.SpaceCenter.Services.Vessel ves)
 {
     Vessel target = ves.InternalVessel.targetObject as Vessel;
     return ves.InternalVessel.orbit.RelativeInclination(target.orbit);
 }
Exemplo n.º 14
0
 public static void ProcedureThreeArgsNoReturn (KRPC.Schema.KRPC.Response x,
                                                KRPC.Schema.KRPC.Request y, KRPC.Schema.KRPC.Response z)
 {
     Service.ProcedureThreeArgsNoReturn (x, y, z);
 }
Exemplo n.º 15
0
 public static Comms Comms (KRPC.SpaceCenter.Services.Vessel vessel)
 {
     CheckAPI ();
     return new Comms (vessel);
 }
Exemplo n.º 16
0
 public static KRPC.Schema.KRPC.Response ProcedureSingleArgReturns (KRPC.Schema.KRPC.Response data)
 {
     return Service.ProcedureSingleArgReturns (data);
 }
Exemplo n.º 17
0
 public static Antenna Antenna (KRPC.SpaceCenter.Services.Parts.Part part)
 {
     CheckAPI ();
     return new Antenna (part);
 }
Exemplo n.º 18
0
 public static KRPC.Utils.Tuple<int, bool> EchoTuple(KRPC.Utils.Tuple<int,bool> t)
 {
     return Service.EchoTuple (t);
 }
Exemplo n.º 19
0
 public static double NextTimeAlt(KRPC.SpaceCenter.Services.Vessel ves, double alt)
 {return ves.InternalVessel.orbit.NextTimeOfRadius(Planetarium.GetUniversalTime(), alt);}