⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 structs.h

📁 GPS导航定位程序
💻 H
📖 第 1 页 / 共 2 页
字号:
    double RptFreq;     /* Frequency, kHz, as reported by beacon receiver. */
    int RptSS;                         /* Reported signal strength, dB uV. */
    int RptSNR;                                       /* Reported SNR, dB. */
    int ReqCfgCt;         /* # bytes remaining in Request Config. message. */
    int ReqCfgMsg[6];            /* Bytes of last Request Config. message. */
    int ReqStatCt;         /* # bytes remaining in Request Status message. */
    int ReqStatMsg[3];            /* Bytes of last Request Status message. */
} beacstruc;

/*
 * Ephemeris and clock correction data from subframes 1, 2, & 3.
 */

typedef struct
{
    logical vflg;                                      /* 0=No valid data. */
    long TofXmission;     /* Time of subframe 1 transmission, sec of week. */
    int s1hlth;                                 /* Subframe 1 health code. */
    int codeL2;                                        /* Code on L2 flag. */
    int wkn;                  /* GPS week at time of subframe 1 reception. */
    int L2Pdata;                                        /* L2 P data flag. */
    int ura;                                      /* Satellite's URA code. */
    int iodc;                                     /* Issue of data, clock. */
    double tgd;                                  /* Group delay parameter. */
    int tocwk;                           /* GPS week corresponding to toc. */
    double toc;             /* Reference time of clock data parameter set. */
    double af0;                /* Clock correction polynomial coefficient. */
    double af1;                /* Clock correction polynomial coefficient. */
    double af2;                /* Clock correction polynomial coefficient. */
    int iode;                                 /* Issue of data, ephemeris. */
    double crs;             /* Sine harmonic correction to orbital radius. */
    double deltan;               /* Mean motion delta from computed value. */
    double m0;                                     /* Mean anomaly at TOE. */
    double cuc;           /* Cosine harmonic correction to orbital radius. */
    double ecc;                                           /* Eccentricity. */
    double cus;             /* Sine harmonic corr to argument of latitude. */
    double sqrta;                        /* Square root of semimajor axis. */
    int toewk;                           /* GPS week corresponding to toe. */
    double toe;                   /* Reference time of ephemeris data set. */
    int fti;                                              /* Fit interval. */
    double cic;                    /* Cosine harmonic corr to inclination. */
    double om0;                                 /* Right ascension at TOE. */
    double cis;                      /* Sine harmonic corr to inclination. */
    double in0;                                     /* Inclination at TOE. */
    double crc;           /* Cosine harmonic correction to orbital radius. */
    double olc;                             /* Argument of perigee at TOE. */
    double omd;                                /* Rate of right ascension. */
    double idot;                                   /* Rate of inclination. */
    double a;                                /* Derived qty: a = sqrta**2. */
    double n0;            /* Derived qty: n0 = sqrt(GravConstant/(a*a*a)). */
} ephstruc;

/*
 * Integrated carrier phase quantities.
 */

typedef struct
{
    double Current_Value[MAXCHANNELS];        /* Integrated carrier phase. */
    double Bias[MAXCHANNELS];             /* Estimated ICP bias in meters. */
    double Beat_Phase[MAXCHANNELS];                         /* Beat phase. */
} Integrated_Carrier_Phase;

/*
 * Ionospheric and UTC data.
 */

typedef struct
{
    int vflg;                                        /* 0 = no valid data. */

    /* Ionospheric model parameters. */

    double a0,a1,a2,a3;                         /* AFCRL alpha parameters. */
    double b0,b1,b2,b3;                          /* AFCRL beta parameters. */

    /* UTC conversion parameters. */

    double A0,A1;                      /* Coeffs for determining UTC time. */
    unsigned long tot;     /* Reference time for A0 & A1, sec of GPS week. */
    int dtls;                             /* Cumulative past leap seconds. */
    unsigned wnt;                    /* Current UTC reference week number. */
    unsigned wnlsf;           /* Week number when dtlsf becomes effective. */
    int dn;             /* Day of week (1-7) when dtlsf becomes effective. */
    int dtlsf;                      /* Scheduled future leap second event. */
} iustruc;

/*
 * Navigation state.
 */

typedef struct 
{
    unsigned long toa;       /* Time of applicability for this data, TICs. */
    unsigned nsats;           /* # SV's contributing to last nav solution. */
    logical diff;          /* 1=differential corrections available, 0=not. */
    int AgeOfCorr;                /* Age of differential corrections, sec. */
    unsigned navmode;                       /* Mode: 0=no nav, 1=2D, 2=3D. */
    double x;                      /* Rcvr X coordinate in ECEF system, m. */
    double y;                      /* Rcvr Y coordinate in ECEF system, m. */
    double z;                      /* Rcvr Z coordinate in ECEF system, m. */
    double velx;                   /* Rcvr X velocity in ECEF system, m/s. */
    double vely;                   /* Rcvr Y velocity in ECEF system, m/s. */
    double velz;                   /* Rcvr Z velocity in ECEF system, m/s. */
    double clockoff;                          /* Receiver clock offset, m. */
    double clockdrift;                       /* Receiver clock drift, m/s. */
    double lat;                /* Rcvr WGS-84 latitude, radians (+=North). */
    double lon;                /* Rcvr WGS-84 longitude, radians (+=East). */
    double hgt;                 /* WGS-84 ellipsoid height, meters (+=up). */
    double topo[3][3];    /* XYZ to North-East-Down transformation matrix. */
    double speed;                    /* Rcvr horizontal speed, meters/sec. */
    double hdg;                      /* Rcvr true heading, degrees E of N. */
    double roc;                         /* Rcvr rate of climb, meters/sec. */
    double gdop;                           /* GDOP, this navigation cycle. */
    double pdop;                           /* PDOP, this navigation cycle. */
    double tdop;                           /* TDOP, this navigation cycle. */
    double vdop;                           /* VDOP, this navigation cycle. */
    double hdop;                           /* HDOP, this navigation cycle. */
    unsigned long tofnavmat;     /* Nav matrix time of applicability, TIC. */
    logical altitude_aiding;  /* =1: nav matrix augmented with alt aiding. */
    unsigned long svnavmat;  /* Bit map of SV's comprising the nav matrix. */
    double navmat[4][MAXCHANNELS];        /* The navigation matrix itself. */
    double Erngerr[MAXCHANNELS];       /* Observed-predicted SV ranges, m. */
    double Erraterr[MAXCHANNELS];         /* Obs-pred SV range rates, m/s. */
    double Eicperr[MAXCHANNELS]; /* Obs-pred SV integrated carr phases, m. */
    double EPRcorr[MAXCHANNELS];  /* Pseudorange correction (9999.0=none). */
} navstatestruc;

/*
 * Observation data.
 */

typedef struct
{
    logical obspresent[MAXCHANNELS];   /* Observation present for channel. */
    unsigned long obstm;                        /* Observation time (TIC). */
    int sv[MAXCHANNELS];                                       /* SV list. */
    unsigned epoch_count[MAXCHANNELS];       /* 1ms and 20ms epoch counts. */
    unsigned code_phase[MAXCHANNELS];            /* Code phase, 1/2 chips. */
    unsigned code_dco_phase[MAXCHANNELS]; /* Frac code phase 1/2048 chips. */
    unsigned long carrdco[MAXCHANNELS];      /* Carrier DCO freq this TIC. */
    unsigned CPatThisTIC[MAXCHANNELS]; /* Frac carrier DCO phase this TIC. */
    unsigned CPatPrevTIC[MAXCHANNELS]; /* Frac carrier DCO phase prev TIC. */
    unsigned long CCycles[MAXCHANNELS];    /* Carrier DCO cycles this TIC. */
    unsigned LostLockDuringLastTIC[MAXCHANNELS];             /* Indicator. */
    unsigned LostCodeLockDuringLastTIC[MAXCHANNELS];         /* Indicator. */
    unsigned LostCarrierLockDuringLastTIC[MAXCHANNELS];      /* Indicator. */
} obsstruc;

/*
 * Observed-minus-predicted data.
 */

typedef struct
{
    double range[MAXCHANNELS];              /* observered minus predicted. */
    double range_rate[MAXCHANNELS];         /* observered minus predicted. */
} ompstruc;

/*
 * Pseudo-range data.
 */

typedef struct
{
    double range;                                         /* pseudo-range. */
    double range_rate;                               /* pseudo-range rate. */
    double icp_range;                              /* ICP as pseudo_range. */
    double differential_range_correction;                   /* DGPS range. */
    double differential_range_rate_correction;         /* DGPS range-rate. */
} pseudostruc;

/*
 * GPS subframe to be parsed and processed.
 */

typedef struct
{
    int SV;                                           /* Satellite number. */
    unsigned long subframe[10];                          /* Data subframe. */
    unsigned long dataTIC;                    /* TIC at start of subframe. */
} sfstruc;

/*
 * Task control block.
 */

typedef struct
{
    char TNAME[10];               /* Task name string, up to 9 characters. */
    unsigned long TSTKSIZE; /* Size of stack to allocate for task (bytes). */
    void (far *TSTART)(void);                     /* Task startup address. */
    void far *TSTACK;       /* Far ptr to task's stack (set by InitTasks). */
    unsigned STRTSP;            /* Startup SP for task (set by InitTasks). */
    unsigned STRTSS;            /* Startup SS for task (set by InitTasks). */
    unsigned MinSP;         /* Min SP seen for the task (high-water mark). */
    unsigned Active;    /* 0=Task is suspended, else the activation count. */
    int NxtSusp;           /* Next TCB on suspended list (-1=end of list). */
    unsigned SuspTics;             /* Incremental suspend interval (TICs). */
    unsigned UserCheckpoint;      /* Latest user checkpoint for this task. */
    char ProcName[16];                    /* Procedure name at checkpoint. */
    char Comment[16];                                     /* User comment. */
    unsigned Slices;         /* Time slices used by the task (rolls over). */
    unsigned SAVSP;                   /* Saved SP of task, when suspended. */
    unsigned SAVSS;                   /* Saved SS of task, when suspended. */
    unsigned SAV8087[54];          /* Numeric coprocessor state save area. */
} tcbstruc;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -