Open mlyle opened 9 years ago
Neat idea. How do we always verify that the stack is sufficiently computationally efficient, no matter what the user asks of it?
Whatever we do, we should make it easy to add additional mixers. Fixed wing flight requires a bunch of other state inputs to the mixer, such as flaps, spoilers, landing gear, etc...
So there's no looping or conditional directives. So if you can bound the time per "instruction" and the max number of instructions you can bound instruction time.
So there's no looping or conditional directives. So if you can bound the time per "instruction" and the max number of instructions you can bound instruction time.
Won't referring to the curve interpolation somewhat violate this?
x=18 pop all values in stack, add, and push (hack)
Should this be 31, so that we reserve the rest of the space for other operators? I think that a log()
operator might come in handy.
So, curve interpolation, atan, etc, take awhile. But even if your program is all curve interpolation, all atan, etc.. you still know the maximum runtime.
So one thing we could do is change the mixer to a small RPN program. The idea is we'd use 8 bit opcodes, and could have encodings like:
So an existing quadcopter mix for the first channel would look like:
So this results in 13 bytes per channel, versus 5 currently or 10 if we double precision. Unfortunately it only increases our precision to 12 bits, and presumably we'd want to put one or two of them left of a decimal point. Probably not quite acceptable. Then again outputs right now have 10 bits precision.