"IQmath" library has a lot of basic operations, such as sqrt, but does not include a third root, so i had to implement a "cube_root_fast" function on 32-bit numbers, assuming 24 bit of fixed-point fraction and 8 bit of signed integer
First of all, I don't have any expertise in C debuggers, and they seem somewhat magical to me. Anyway, this repository has a normal Makefile and can be debugged using VSCode's Makefile Tools
extension.
Keep in mind that all numbers have 24 bits of fixed precision, and to see their real values in debugger you should divide them by 16777216.0
.
in the above image you can see 3 example calculations
blue:
travel_distance
andjerk
are small- can't reach
max_acceleration
anmax_speed
conditions
green:
travel_distance
andjerk
are biggermax_acceleration
andmax_speed
conditions can be reached
orange:
travel_distance
is small andjerk
is big- can reach
max_acceleration
but can't reachmax_speed
Notice:
plot drawing code and some other codes are not included here, sorry that's all i can share.