Profile image

Just found something a bit disturbing about FT...

9,428 vcharng  3.6 years ago

"TargetHeading" ranges from 0 to 360
"Heading" ranges from -180 to +180

No wonder all my previous "TargetHeading - Heading" programs didn't work, and I had to add an extra clause to make sure these commands work as intended...

At this stage I'm not even sure if I should suggest changing it, because a lot of my devices currently under development is already adjusted against this issue....

Any ideas on how to solve this, everyone?

  • Log in to leave a comment
  • Profile image
    9,428 vcharng

    @WNP78 ah, no wonder it didn't work when I tried.
    Thanks.

    3.6 years ago
  • Profile image
    Dev WNP78

    @vcharng nope, it's documented as:
    deltaangle(a, b) - The shortest angle delta between angles a and b in degrees.
    So do deltaangle(TargetHeading, Heading)

    3.6 years ago
  • Profile image
    9,428 vcharng

    @WNP78 As in "deltaAngle(TargetHeading - Heading)"?

    3.6 years ago
  • Profile image
    Dev WNP78

    You can use the deltaAngle( function that will always give a value between -180 and 180

    3.6 years ago
  • Profile image
    9,428 vcharng

    Actually, I just found out that the remedial clause of the program works even if this is fixed. The remedial clause simply don't get activated at all....
    So perhaps, fix it please?

    3.6 years ago