You can't use this function like you do.
This is called when using the "heading" instruction of the flight plan. It is not implemented yet because if it makes sense for a FW aircraft, for rotorcraft a forward speed should be specified, and we have not really decide how to do that in a nice way.