📄 ogr_structs.h
字号:
/* ************************************************************************ * * * OpenGPS Receiver * * * * -------------------------------------------------------------------- * * * * Module: ogr_structs.h * * * * Version: 0.1 * * * * Date: 30.06.02 * * * * Author: C. Kelley, G. Beyerle * * * * -------------------------------------------------------------------- * * * * Copyright (C) 2001-2003 C. Kelley, G. Beyerle * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * * -------------------------------------------------------------------- * * * * The files 'ogr_user.c', 'ogr_navdecode.c', 'ogr_navsolve.c', * * 'ogr_rtproc.c' are modified versions of the files 'gpsfuncs.cpp', * * 'gpsrcvr.cpp' from Clifford Kelley's OpenSourceGPS distribution. * * The unmodified files can be obtained from * * http://www.home.earthlink.net/~cwkelley * * * * -------------------------------------------------------------------- * * * * Structures * * * ************************************************************************ *//* ******************************* changes ******************************** 26.01.03 - add field 'page4' in CHN struct add fields 'accum_new', 'accum_missed' in struct 'PARAM' ************************************************************************ *//* ----------------------------- structures ------------------------------- */#if !defined( __OGR_STRUCTS_H__)#define __OGR_STRUCTS_H__// --- Approximate orbital parameters ---typedef struct{ INT16 health, week, sat_file; double ety, // eccentricity n0, // mean motion (sqrt(GM/A^3)) inc, // inclination angle rra, // rate of right ascension sqra, // square root of semi-major axis lan, // right ascension aop, // argument of perigee ma, // mean anomaly toa, // time of applicability af0, af1; // clock correction char text_message[23]; // 22 ASCII chars + '\0'} ALMANAC;// --- Precise orbital parameters ---typedef struct{ INT16 iode, // issue of date (ephemeris) iodc, // issue of date (clock) ura, valid, health, week; double dn, // mean motion - correction sqra, // sqrt of semi-major axis W0, // longitude of asc node Wdot, // date of right ascension w, // argument of perigee tgd, // group dela differential toe, // reference time ephemeris toc, // sat clock data reference time [sec] inc0, // inclination correction idot, cuc, cus, crc, crs, cic, cis, // 2nrd harmonic perturbation ma, // mean anomaly n0, // computed mean motion// e, ety, // eccentricity af0, af1, af2; // clock correction} EPHEMERIS;// earth-centered earth-fixed co-ordinate systemtypedef struct{ double x, y, z;} ECEF;typedef struct{ double lat, lon, hae; // height above WGS-84 ellipsoid} LLH;/* --- variables referring to transmitter --- */typedef struct{ INT16 as_and_config, // anti-spoof and SV config health_status, // SV health riseset; // 1 : incr. elevation; -1 : decr. elevation ECEF pos; // position in ECEF double azimuth, // azimuth [rad] elevation, // elevation [deg] doppler, xmit_clock_corr;} XMITINFO;/* --- variables referring to receiver --- */typedef struct{ ECEF pos; LLH llh; double rcvr_clock_corr, speed, heading;} RCVRINFO;typedef struct{ double x, y, z, dt, xv, yv, zv, df;} PVT;// --- correlator GP2021 channel info ---typedef struct{ long cod_frq, // frq of code DCO in units of 42.6 mHz car_frq, // frq of carrier DCO in units of 42.6 mHz car_corr, // correction due to doppler & clock error// cod_phs, // code phase// car_phs, // carrier phase i_prompt_20ms, // I prompt summed over 20 ms q_prompt_20ms, // Q prompt summed over 20 ms i_dith_20ms, // I dither summed over 20 ms q_dith_20ms, // Q dither summed over 20 ms i_pd_20ms, // sum over 20mc for C/N0 estimate qq_pd_20ms, avg_20ms, tow_HOW, // time of week as read from HOW [units of 1 s] tow; // 'tow_HOW' is copied to 'tow' at start of next subframe INT16 state, // state: acquisition/pull-in/tracking/... tow_sync, // preamble is successfully decoded tow_HOW is set prn, // PRN attached to this channel cod_slew, // C/A code slew at next DUMP n_freq, // index in carrier frq list, 1 step corresponds to frq shift 'delta_freq' delta_frq, // freq step for doppler search i_prompt, // in-phase prompt arm q_prompt, // quad-phase promt arm i_dith, // in-phase early/late arm q_dith, // quad-phase early/late arm hidx; // index in hist20ms[] UINT16 bit_count, // bit counter, 0,...,1499 frame_count, // frame counter (overflows after 22.7 days)// pull_in_count, // pull in timer [ms] (ch_pull_in())// confirm_count, // confirm timer (ch_confirm())// confirm_above_thresh, // above threshold counter (ch_confirm()) sfid, // subframe id: 1,...,5 TLM, // reserved TLM field missed, // number of missed DUMPs page4, page5, code_slew, // # halfchips to be slewed at next DUMP event code_phase, // code phase: 0,...,2046 halfchips code_dco_phase, // code fract. phase: 0,...,1023, 1024 = halfchip carr_dco_phase, // carr fract. phase: 0,...,1023 carr_cycle_lo, // carrier cycle low word carr_cycle_hi, // carrier cycle high word epoch, // bit 13-8: 20 ms epoch, 0,...,49 // bit 4-0: 1 ms epoch, 0,...,19 // sampled at last TIC
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -