Jump to content

convert channel expession to value and save it


mstram

Recommended Posts

I am working on an air traffic control simulation.

I have added spare channels for spd and bank, then calculate the turn rate and have that in another spare channel.

For the forward motion, I have tz = $T * ch("spd")

turnRate = (1092.95 * tan(ch("bank1") ) / ch("spd"))

I then have the ry channel = to '$T * ch("turnRate")'.

1) If the bank1 channel goes to 0 (simulating level / no turning flight), the plane's ry channel also goes back to 0. I want the "plane" to maintain the current ry (heading), when bank1=0, otherwise it should be changed by the 'turnRate' channel.

So I need to grab / save the last value of the computed ry as the new ry value .. but I also need to keep the ry field dynamic for further heading/bank changes.

I.e. I need to convert the expression to a "frozen" "snapshot" value.

Do I need to use a CHOP ?

Mike

Edited by mstram
Link to comment
Share on other sites

It's so easy to access the previous frame's value in CHOPs and that is with the Feedback CHOP.

See the help for that CHOP. I use it often for what you describe.

There's a part of me that things you should move all the logic in to CHOPs btw.

Attached is a real old yet still valid file with banking bats done entirely in CHOPs for you to reference.

batshover3.hip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...