## Hello

I'm making a text that should change depend on target's speed but i cannot find proper funky trees for it. for example i have tried to use this code i made but it does not work look below:

(this code suggested to show speed of a plane moving on a surface without changing altitude like tankers but i need a code that can also show speed of moving plane with different altitude in time)

`sqrt((sin(rate(TargetHeading)) * (TargetDistance + rate(TargetDistance))) + (pow((TargetDistance + (cos(rate(TargetHeading) * TargetDistance))), 2)))`

I don't know I used my professor's note to make it but it didn't make sense. I test it and the result was that It raised when targets get distance.

please if you can correct it or have another code please help me.

i think it take a lot to find proper code.

@SnoWFLakE0s yeah that another true story but ishuax idea true

Thanks for spending time teaching me more intresting funky trees

Are you student?

Try doing the trigonometry:

`rate()`

to all of them to obtain x / y / z target speedvector.@Huax yeah after try and error i made a right code

Thanks a lot for spending time teach me new things

Can you go check the post, since a long expression will almost always contain spelling problem. Variable system is awesome for this reason.

@Huax sorry but it does not work can you please send a proper text that i can copy and paste

@Huax does it have two pow at first?

@Huax thanks i will test it and check your post

Thanks

Also, I have a build with advanced targeting which is

All About your Target

You can check it out as it includes target maximal acceleration/g, maximal altitude/velocity, current velocity/altitude, current heading/pitch angle.

I don’t understand why your codes are like that but anyways.

So the relative Alt/Lat/Longitude to you is

Lat: cos(TargetHeading)

cos(TargetElevation)TargetDistanceLong: same as Lat except it is sin(TargetHeading) instead of cos

Alt: sin(TargetElevation)*TargetDistance

However, you are moving aren’t you?

So we need to add your own displacement there

Target’s absolute position is

well, basically the relative ones add to Lat/Long/Altitude

Then you square root the sum of their square.

You final equation will be

TargetVelocity=

pow(

pow(rate(Latitude+cos(TargetHeading)

cos(TargetElevation)TargetDistance),2)+pow(rate(Longitude+sin(TargetHeading)

cos(TargetElevation)TargetDistance),2)+pow(rate(Altitude+sin(TargetElevation)*TargetDistance),2)

,1/2)

@SnoWFLakE0s

## please help