#include
struct GPSPOINT {
unsigned long time;
float latitude;
float longtitude;
unsigned long altitude;
};
int main(int argc, char* argv[])
{
unsigned char raw_data[] = {0xD6, 0xB5, 0x84, 0x48, 0xA9, 0x90, 0x57, 0x42, 0xCD, 0x68, 0xDC, 0x41, 0xAA, 0x72, 0x43, 0x20};
GPSPOINT *point = (GPSPOINT*)raw_data;
point->altitude <<= 0x08;
float *altitude = (float *)&point->altitude;
printf("latitude: %3.7f, longtitude: %3.7f, altitude: %5.2f\n", point->latitude, point->longtitude, *altitude);
return 0;
}