V2 to v3 : payload format

I have a stupid question -
In v2 I have a payload formater whitch transform data comming from a gps tracker device.
This format script is under decoder tab.
How should I implement this formater in V3 ? As an uplink or a downlink ? The data are just flowing from the device to the ttn network.

function Bytes2Float32(bytes)
{
var sign = (bytes & 0x80000000) ? -1 : 1;
var exponent = ((bytes >> 23) & 0xFF) - 127;
var significand = (bytes & ~(-1 << 23));
if (exponent == 128)
return sign * ((significand) ? Number.NaN : Number.POSITIVE_INFINITY);
if (exponent == -127)
{
if (significand === 0) return sign * 0.0;
exponent = -126;
significand /= (1 << 22);
}
else significand = (significand | (1 << 23)) / (1 << 23);
return sign * significand * Math.pow(2, exponent);
}

function Decoder(bytes, port)
{
var lat = bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
var lon = bytes[7] << 24 | bytes[6] << 16 | bytes[5] << 8 | bytes[4];
return {
latitude: Bytes2Float32(lat),
longitude: Bytes2Float32(lon),
altitude: 0,
accuracy:0

		};
}

Thank you

Uplink is from device (gps tracker) to application. Downlink is from application to device (gps tracker). So you need an uplink decoder.

Thank you à lot
Any suggestion fort à translation of m’y v2 formater