You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: I'm experimenting with control schemes for stuff, and I thought a plane would be a good place to start.
My intent was to lock the roll PID setpoint to the yaw error so that it would roll automatically during turns.
I'm not particularly up for code review - this is just me having fun exploring what I can do with the software. I'm only reporting because the error told me to.
Mod version: 1:1.3.2.0 (latest according to CKAN).
Terminal log:
run airplanelock.ks.
0
KOSDelegate.InsertPreBoundArgs: Stack arg bottom missing.
Contact the kOS devs. This message should 'never' happen.
VERBOSE DESCRIPTION
KOSDelegate.InsertPreBoundArgs: Stack arg bottom missing.
Contact the kOS devs. This message should 'never' happen.
At Cockpit:/airplanelock.ks, line 19
set rll:setpoint to point.
^
Script contents:
set hdg to 90.
set alt to 16000.
lock point to steeringmanager:yawerror.
lock rll to steeringmanager:rollpid.
print point.
set spd to 1400.
declare global active to 1.
set queue to core:messages.
declare global received to list(0,0).
until active = 0 {
if not queue:empty {
if queue:peek[0] = "hdg" {
print "heading received!".
}
}
set rll:setpoint to point.
wait 0.5.
}
The text was updated successfully, but these errors were encountered:
You can't set the suffix of something you have locked. Also as the PIDs returned from the steering manager are refferences you don't need to lock them to keep the data fresh.
Also while this is an interesting idea for yaw control it wouldn't work because kOS will internally set the setpoint of the PIDs each tick so you changing the setpoint won't have any impact on how kOS steers. You would be better off setting the 3rd optional parameter of the HEADING() function if you want to define a desired roll.
EDIT: this is a duplicate of issue #3005 which is resolved by PR #3010 which is merged into the dev branch and just waiting for a kOS release to get to the rest of us.
Context: I'm experimenting with control schemes for stuff, and I thought a plane would be a good place to start.
My intent was to lock the roll PID setpoint to the yaw error so that it would roll automatically during turns.
I'm not particularly up for code review - this is just me having fun exploring what I can do with the software. I'm only reporting because the error told me to.
Mod version: 1:1.3.2.0 (latest according to CKAN).
Terminal log:
run airplanelock.ks.
0
KOSDelegate.InsertPreBoundArgs: Stack arg bottom missing.
Contact the kOS devs. This message should 'never' happen.
KOSDelegate.InsertPreBoundArgs: Stack arg bottom missing.
Contact the kOS devs. This message should 'never' happen.
At Cockpit:/airplanelock.ks, line 19
set rll:setpoint to point.
^
Script contents:
set hdg to 90.
set alt to 16000.
lock point to steeringmanager:yawerror.
lock rll to steeringmanager:rollpid.
print point.
set spd to 1400.
declare global active to 1.
set queue to core:messages.
declare global received to list(0,0).
until active = 0 {
if not queue:empty {
if queue:peek[0] = "hdg" {
print "heading received!".
}
}
}
The text was updated successfully, but these errors were encountered: