mstram Posted January 26, 2009 Share Posted January 26, 2009 (edited) 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 January 26, 2009 by mstram Quote Link to comment Share on other sites More sharing options...
edward Posted January 26, 2009 Share Posted January 26, 2009 Short answer is yes. Alternatively, consider using POPs instead of CHOPs. Quote Link to comment Share on other sites More sharing options...
old school Posted January 29, 2009 Share Posted January 29, 2009 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.