Profile image

Just found something a bit disturbing about FT...

9,322 vcharng  one year 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,322 vcharng

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

    one year 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)

    one year ago
  • Profile image
    9,322 vcharng

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

    one year ago
  • Profile image
    Dev WNP78

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

    one year ago
  • Profile image
    9,322 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?

    one year ago