Trigonometry in hal
26 Jan 2021 02:22 #196598
by Nico2017
Trigonometry in hal was created by Nico2017
Hi all,
I was wondering if there was any component that could help for making trigonometry computation. More precisely I am looking for the atan function.
If this does not exist, that would be a good excuse for me to code my first component.
Thank you,
Nicolas
I was wondering if there was any component that could help for making trigonometry computation. More precisely I am looking for the atan function.
If this does not exist, that would be a good excuse for me to code my first component.
Thank you,
Nicolas
Please Log in or Create an account to join the conversation.
26 Jan 2021 23:36 #196681
by andypugh
Replied by andypugh on topic Trigonometry in hal
The closest are:
linuxcnc.org/docs/2.8/html/man/man9/hypot.9.html
linuxcnc.org/docs/2.8/html/man/man9/clarke2.9.html
linuxcnc.org/docs/2.8/html/man/man9/clarke3.9.html
linuxcnc.org/docs/2.8/html/man/man9/clarkeinv.9.html
If you do write one, then I suggest having alternate inputs (radians and degrees, just sum them internally, if anyone uses _both_ then they deserve what they get) and output all three functions.
Then similar inverse, again maybe just sum the three possible inputs.
Note that atan2 is a very useful function, but that always takes two inputs. It's a quadrant-aware version of atan.
linuxcnc.org/docs/2.8/html/man/man9/hypot.9.html
linuxcnc.org/docs/2.8/html/man/man9/clarke2.9.html
linuxcnc.org/docs/2.8/html/man/man9/clarke3.9.html
linuxcnc.org/docs/2.8/html/man/man9/clarkeinv.9.html
If you do write one, then I suggest having alternate inputs (radians and degrees, just sum them internally, if anyone uses _both_ then they deserve what they get) and output all three functions.
Then similar inverse, again maybe just sum the three possible inputs.
Note that atan2 is a very useful function, but that always takes two inputs. It's a quadrant-aware version of atan.
The following user(s) said Thank You: Nico2017
Please Log in or Create an account to join the conversation.
Time to create page: 0.068 seconds