if (lat >= 90 || lat <= -90 || lon >= 180 || lon <= -180) return -2; lprintf(T_OPENTRAC, "Position: Lat %f Lon %f Alt %f\r\n",lat,lon,alt);
else { lprintf(T_OPENTRAC, "Position: Lat %f Lon %f\r\n",lat,lon); }
int decode_position(unsigned char *element, int element_len) {	// 0x10 Position Report - Lat/Lon/<Alt>	// Lat/Lon is WGS84, 180/2^31 degrees,  Alt is 1/100 meter	const double semicircles = 11930464.71111111111;	double lat, lon;	float alt = 0;	if (element_len < 8) return -1; // Too short!	if (element_len > 11) return -1; // Too long!	lat = get32(element) / semicircles;	lon = get32(element+4) / semicircles;	if (element_len == 11) {		alt = ((((*(element+8))<<16)+get16(element+9))/100)-10000;	}	if (lat >= 90 || lat <= -90 || lon >= 180 || lon <= -180) return -2;	lprintf(T_OPENTRAC, "Position: Lat %f Lon %f Alt %f\r\n",lat,lon,alt);	return 0;}