Jump to content

[1.3] kOS Scriptable Autopilot System v1.1.3.0


erendrake

Recommended Posts

How do I get the altitude of the current atmosphere

I tried this.

set atmocheck to body:atmosphere:exists.

if atmocheck = 1

{

print "Waiting to exit atmosphere".

set atmoheight to body:atmosphere:height.

wait until altitude = atmoheight.

}

It complains about a suffix not existing.

How do I lock steering to my next node? Every time I try "lock steering to node" or "nextnode" it comes up with "the given key was not present in the dictionary".

It should just be:

lock steering to nextnode.

That works for me.

Do you actually have a node set up?

Edited by Cpt. Kipard
Link to comment
Share on other sites

How do I get the altitude of the current atmosphere

I tried this.


set atmocheck to body:atmosphere:exists.
if atmocheck = 1
{
print "Waiting to exit atmosphere".
set atmoheight to body:atmosphere:height.
wait until altitude = atmoheight.
}

It complains about a suffix not existing.

Try it abbreviating "atmosphere" to just "atm". That may be the problem.

Link to comment
Share on other sites

So I'm using RT2 with this plugin and every time I go out of comm-range, the plugin throws a crapload of exceptions.


(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

OverflowException: Outside range [MinValue,MaxValue]
at System.TimeSpan.From (Double value, Int64 tickMultiplicator) [0x00000] in <filename unknown>:0

at System.TimeSpan.FromSeconds (Double value) [0x00000] in <filename unknown>:0

at kOS.RTUtil.DrawProgressBar (IExecutionContext context, Double elapsed, Double total, System.String text) [0x00000] in <filename unknown>:0

at kOS.Interpreter.ImmediateMode.Update (Single time) [0x00000] in <filename unknown>:0

at kOS.Context.ExecutionContext.Update (Single time) [0x00000] in <filename unknown>:0

at kOS.Context.CPU.Update (Single time) [0x00000] in <filename unknown>:0

at kOS.Module.kOSProcessor.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

RunSimulation took 0ms

Using the public latest release. Is there some sort of workaround?

Link to comment
Share on other sites

How do I lock steering to my next node? Every time I try "lock steering to node" or "nextnode" it comes up with "the given key was not present in the dictionary".

Locking repeatedly to different variables seems to be broken.

I'm getting the same error.

Cheers.

P.S: I've already posted about this a couple pages ago.

Link to comment
Share on other sites

So I'm using RT2 with this plugin and every time I go out of comm-range, the plugin throws a crapload of exceptions.

Using the public latest release. Is there some sort of workaround?

A lot has changed from that release, you should try the latest pre release of v0.12 available here

Link to comment
Share on other sites

Does anyone have this problem where timed burns go over or under a few dm/s?

dm/s as in decimeters per second? One thing you have to take into account is that all the dV formulas assume an instantaneous change in velocity, but since that is not possible you always end up needing some extra dV to compensate for the burn time.

I'm just curious. Is there a good reason why we can't get raw variables? I've noticed that I always have to lock or set my own.

What do you mean with "raw variables"?

Edited by marianoapp
Link to comment
Share on other sites

@Cpt.Kipard: I just tried the "print altitude." code and it worked as it should. Please post the whatever error appear on the screen or in the debug menu so we can track the issue.

@theSpeare: If you mean the dictionary error then we are aware of it and working to fix it, but it only happens when you lock the same variable to different expressions in the console, so don't do that :) (inside a program you can lock anything all the times you want).

One of the side-effects of this error is that the console remains in an inconsistent state and every following command will throw the same error. If you toggle the power of the unit everything starts working again.

Link to comment
Share on other sites

@Cpt.Kipard: I just tried the "print altitude." code and it worked as it should. Please post the whatever error appear on the screen or in the debug menu so we can track the issue.

Now it works for some reason. I probably made a typo.

Link to comment
Share on other sites

Very sorry to bother you all. I am loving this mod, so much so that I didn't sleep last night. I have a few questions.

I saw in a video but cannot find it again, where you can continuously echo variables on the screen? This is important as I am doing more and more flights IN cockpit and finding the features lacking. My Apoapsis, Periapsis and ETA to Apoapsis would be nice to know at all times.

...

I am trying to figure out the best way to execute a ROLL. That is, simply rolling the craft 180 degrees like I would by pressing Q or E. Right now the best I have found it [ lock steering to prograde +R(0,0,180). ]. But I don't really want to LOCK to prograde at that point. Also, can I UNLOCK steering? All of this is so I can have my canopy facing DOWN (towards Kerbin) after my gravity turn. I am scripting a 100% free, hands off, flight and want to be able to take in the view.

...

Have my tests been conclusive? Am I right in that you cant change rotation/bearing with SAS on? It seems so, so now I turn it off before all maneuvers and back on after that code completes.

...

I've had plenty of bugs where they are called out in the console, but the wrong line is displayed.

...

Lastly was [ heading(x,y) ] deprecated? It doesn't throw any errors, it seems to be ignored; now I must use [ heading x by y] to get a response from the controls.

I'm a long time player of KSP, but this has breathed new life into it for me. Thank you for making this so awesome that I needed to make THIS my first post.

Thank you all in advance for your help.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...