Did you guys know this function existed?
Found this out while I was teaching chatGPT funky trees. I was copy-pasting some code from it to see if it works, and I was surprised that it did. I was also surprised to see that atan2() works in SP since there was no mention of it anywhere(but it is a common math function in other places, so I guess I was not that surprised).
Anyway, for those who want to know:
atan2(y,x)
Calculates the angle(in degrees) between the posititve x-axis and the point (x,y)
Some useful code stuff(The stuff I was teaching chatGPT):
TargetVelocityHeading
atan2(rate(TargetDistance*cos(TargetElevation)*sin(TargetHeading)+ Longitude),rate(TargetDistance*cos(TargetElevation)*cos(TargetHeading)+Latitude))
TargetVelocityElevation
atan2(rate(TargetDistance*sin(TargetElevation)+Altitude), sqrt(pow(rate(TargetDistance*cos(TargetElevation)*sin(TargetHeading)+Longitude),2)+pow(rate(TargetDistance*cos(TargetElevation)*cos(TargetHeading)+Latitude),2)))
Credits to ChatGPT for being an AI I guess and actually writing this(I had to correct it a bit because it reversed Longitude and Latitude and forgot Altitude in the last one)
...
We will all be replaced by AI soon
@bjac0 yea sure
would it be cool if I put the target velocity heading code in an updated version of Useful FT Codes forum?(mainly cause my code is super bulky comparison lol) I'll make sure to give you credit
damn wtf, it did a way better job than me at coding lol
My "Target velocity heading"
(rate(Longitude+(TargetDistance*sin(TargetHeading)))>0?atan(rate(Latitude+
((TargetDistance*cos(TargetElevation))*cos(TargetHeading)))/rate
(Longitude+((TargetDistance*cos(TargetElevation))*sin(TargetHeading))))
-90:atan(rate(Latitude+((TargetDistance*cos(TargetElevation))*cos(TargetHeading)))/rate
(Longitude+((TargetDistance*cos(TargetElevation))*sin(TargetHeading))))+90)/-1
AI "target velocity heading"
atan2(rate(TargetDistance*cos(TargetElevation)*sin(TargetHeading)+ Longitude),
rate(TargetDistance*cos(TargetElevation)*cos(TargetHeading)+Latitude))
All hail our robot overlords
@L0RR3B0RR3 Yes! That's the spirit! A.I.! Funky Trees! WOOO!(It's pretty cool)
I don't undertad anyting but... YES!
@DarDragon Ahh, alright
I guess I'll try that out too to see if it can be successful or perhaps even fully independent.
@IceCraftGaming I've just been teaching it some basics of the code. It can solve/make equations by mostly itself, you just have to define the rules and variables properly. I've posted some pics of what I've managed to teach it on the funky trees discord. Unfortunately I've stopped teaching it for a while because I've been a bit busy
lmao same
I, for about ~2 days in total have been trying to teach FT to ChatGPT with Sn0Flak0s' guide.
Tests haven't gone well so far. What have you been doing exactly?
@TheFlightGuySP Man, if they were, it would have made my life so much easier. Stupid drag equations
Interesting. I'd seen
asin() acos() atan()
listed in the Funky Trees guide but wasn't aware that anatan2()
was present.Now I'm curious if
sinh() cosh() tanh()
are present as well.