Add bytesToShort for km conversion