I need help iam using a joystick and i need to change lateral and forward paratemer according to the angle i got on a joystick

From your diagram I expect you need to convert the Canvas Cartesian coordinates to Polar Coordinates Polar Coordinates (r,θ) from Cartesian Coordinates (x,y)

The mathematics are described here

You would have to use Blocks to do the transformation to Polar and use the Polar values in your json.
You possibly could use javascript to do the transformation javascript cartesian to polar - Google Search

Or you might be able to use this extension [FREE] Maths Extension to convert from cartesian to polar coordinates.

Is that possibly what you want to do?

or perhaps you need to transform the Canvas coordinates to positive and negative values by shifting mathematically the center of the Canvas to a coordinate system with positive and negative values. There is a coordinate 'conversion' algorithm using Blocks described in this AI2 Flat Map Tutorial that could be adapted to your purposes.