Not sure what’s the reason for all the versions in that document, but it seems none supports negative values for latitude and longitude:
decode.lat = b[0]<<16 | b[1]<<8 | b[2];
decode.lng = b[3]<<16 | b[4]<<8 | b[5];
To support negative values, use:
// Sign-extend to 32 bits for support of negative values, by shifting 8 bits
// too far to the left, followed by a sign-propagating right shift:
decode.lat = b[0]<<24>>8 | b[1]<<8 | b[2];
decode.lng = b[3]<<24>>8 | b[4]<<8 | b[5];
(See Decrypting messages for dummies - #4 by arjanvanb)
If the device does not use Cayenne LPP, then you cannot use TTN Console’s Payload Formats to convert the payload into that format: