HKUST-Aerial-Robotics / ublox_driver

A driver for u-blox receiver (ZED-F9P) with ros support
GNU General Public License v3.0
104 stars 49 forks source link

About Galileo! Why do we need to reverse the bytes in each word when building a buffer? #19

Closed Steph00L closed 4 months ago

Steph00L commented 5 months ago

Hi! I have a confusion in "UbloxMessageProcessor::decode_GAL_subframe". Why do we need to reverse the bytes in each word like this, for (i=k=0;i<8;i++,p+=4) for (j=0;j<4;j++) buff[k++]=p[3-j];

shaozu commented 4 months ago

Hi, @Steph00L. This is because UBX-RXM-SFRBX stores the actual ephemeris data in unsigned little-endian 32-bit integer, as specified in Table.3.16.6.1 (page 155) of UBX-18010854 - R08.