\qquad 下面是HD-GR GNSS导航软件的GPS L1星历处理相关定义:
// gps_ephemeris.h -- Header file for the gps_ephemeris.c file/* * Copyright (C) 2005 Andrew Greenberg* Distributed under the GNU GENERAL PUBLIC LICENSE (GPL) Version 2 (June 1991).* See the "COPYING" file distributed with this software for more information.*//* Namuru GPS receiver project* Original : ephemeris.h* Modes : None* version : V1.0* date : 21st/Dec/2006*//* * HD-GR GNSS receiver project* Modes : Inherited the definitions of ephemeris.h and ephemeris.c in the * Namuru GPS receiver project V1.0 and made necessary adjustments * to adapt to the new RTOS and functions.* version : V1.0* date : xx/xx/2015*/#ifndef __GPS_EPHEMERIS_H__
#define __GPS_EPHEMERIS_H__#include "main_ephemeris.h"/******************************************************************************** Definitions******************************************************************************//******************************************************************************** Declarations******************************************************************************/typedef struct {unsigned short prn; // which satellite we're talkin' aboutunsigned short valid; // Use me, I'm valid.unsigned short have_subframe; // 5bits of how many valid subframe we have;// have all = 0x1F (or 0x7 if no 4/5)/* Subframe 1: Clock Corrections for delta t(sv)* (2C) = Two's complement = signed number* b = bits */unsigned short iodc; // Issue of Data: Clock (10 bits)unsigned short ura; // User Range Accuracy (4 bits)unsigned short health; // Sat vehicle health (6 bits)double tgd; // T(gd): L1-L2 correction (2C 8b * 2^-31)double toc; // t(oc): clock ref. time (max = 604784, 16b * 2^4) double af0; // a(f0): Constant term (2C 22b * 2^-31)double af1; // a(f1): Linear term (2C 16b * 2^-43)double af2; // a(f2): Squared term (2C 8b * 2^-55)/* Subframe 2: Ephemeris */unsigned short iode1; // Issue of Data: Ephemeris (10 bits)double crs; // C(rs): SIN correction radius (2C 16b * 2^ -5)double dn; // Delta n: mean motion difference (2C 16b * 2^-43)double ma; // M(0): mean anomaly (2C 32b * 2^-31)double cuc; // C(uc): COS correction latitude (2C 16b * 2^-29)double ety; // e: eccentricity of orbit (max=0.03, 32b * 2^-33)double cus; // C(us): SIN correctoin latitude (2C 16b * 2^-29)double sqra; // (A)^1/2: sqrt semimajor axis (32b * 2^-19)double toe; // T(oe):ephemeris ref. time (max=604,784, 16b * 2^4)/* Subframe 3: ephemeris */unsigned short iode2; // Issue of Data: Ephemeris (10 bits)double cic; // C(ic): COS correction inclination (2C 16b * 2^-29)double w0; // Omega(0): longitude of asc. node (2C 32b * 2^-31)double cis; // C(is): SIN correction inclination (2C 16b * 2^-29)double inc0; // I(0): inclination angle @ ref. (2C 32b * 2^-31)double crc; // C(rc): COS correction radius (2C 16b * 2^ -5)double w; // Omega: arguemnt of perigee (2C 32b * 2^-31)double omegadot; // OMEGADOT: rate of right asc. (2C 24b * 2^-43)double idot; // IDOT: rate of inclination angle (2C 14b * 2^-43)} gps_ephemeris_t;void gps_clear_ephemeris(unsigned short ch);
void gps_initialize_ephetable( void);
void gps_ephemeris_task(OS_FLAGS channels_ready);/******************************************************************************** Externs******************************************************************************/extern gps_ephemeris_t m_gps_ephetable[GPS_MAX_SATELLITES];
extern unsigned short m_gps_new_almanac;#endif // __GPS_EPHEMERIS_H__