An example function to do the parsing is shown below. Note that the double data types are converted by the function cnvt_ieee_double(). This function merely swaps the upper and lower words of the double. This is necessary on GPS 15, 16, 17 series sensors due to a compatibility issue with the IEEE floating point standard): In this example, the array m_TempArray contains the data portion of the ephemeris packet (with DLE stuffing removed).
/****************************************************************************
*
*PROCEDURE NAME:
*copyData - ephemeris data unpacker
*DESCRIPTION:
*unpacks data from ephemeris packet DATA field after extraneous DLEs
*have been removed. Note that sint16 refers to a signed
*integer type.
*
****************************************************************************/
void GPM_ephList::copyData | /* | ephemeris data unpacker | */ |
( | /* | pointer to ephemeris data array | */ |
GPM_ephData* pTemp | |||
) |
|
|
|
{
cnvt_ieee_double((long *)&m_TempArray[IDX_EPH_E]);
cnvt_ieee_double((long *)&m_TempArray[IDX_EPH_SQRTA]);
cnvt_ieee_double((long *)&m_TempArray[IDX_EPH_DN]);
cnvt_ieee_double((long *)&m_TempArray[IDX_EPH_M0]);
cnvt_ieee_double((long *)&m_TempArray[IDX_EPH_W]);
cnvt_ieee_double((long *)&m_TempArray[IDX_EPH_OMG0]);
cnvt_ieee_double((long *)&m_TempArray[IDX_EPH_I0]);
return;
} /* copyData */
GPS 16x Technical Specifications | Rev. A | |
| Page 28 |
|