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

📄 ogrt_globals.h

📁 The OpenGPSRec receiver software runs on the real time operating system RTAI-Linux. It compiles with
💻 H
字号:
/* ************************************************************************    *                                                                      *   *                            OpenGPS Receiver                          *   *                                                                      *   * -------------------------------------------------------------------- *   *                                                                      *   *    Module:   ogrt_globals.h                                          *   *                                                                      *   *   Version:   0.1                                                     *   *                                                                      *   *      Date:   09.12.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.            *   *                                                                      *   * -------------------------------------------------------------------- *   *                                                                      *   * OpenGPS is based on Clifford Kelley's OpenSourceGPS distribution.    *   * The OpenSourceGPS distribution can be obtained from                  *   *             http://www.home.earthlink.net/~cwkelley                  *   *                                                                      *   * -------------------------------------------------------------------- *   *                                                                      *   *                         Real-time process                            *   *                                                                      *   ************************************************************************ *//* ******************************* changes ********************************   26.01.03 - replace 'trackch' by 'RT_Ctrl->leadch'              use fields RT_Ctrl->accum_missed & ->accum_new   18.07.03 - Chan[].ms_count wraps at 6000 (instead of 30000)   18.07.03 - move Ms_Count to struct Chan[]   31.07.03 - fixed bug in find/read_preamble()   03.08.03 - copy carrier-aided code tracking from OpenSourceGPS   ************************************************************************ *//***********************************************************************  GPS RECEIVER (GPSRCVR) Ver. 1.02  12 Channel All-in-View GPS Receiver Program based on   Mitel GP2021 chipset  Clifford Kelley cwkelley@earthlink.net  Copyright (c) 1996-2002 Clifford Kelley.  All Rights Reserved.  This LICENSE must be included with the OGR code.***********************************************************************//*Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions aremet:      CONDITIONS1. Redistributions of GPSRCVR source code must retain the above copyrightnotice, this list of conditions, and the following disclaimer.2. Redistributions in binary form must contain the above copyrightnotice, this list of conditions and the following disclaimer in thedocumentation and/or other materials provided with the distribution.3. All modifications to the source code must be clearly marked assuch.  Binary redistributions based on modified source code must beclearly marked as modified versions in the documentation and/or othermaterials provided with the distribution.4. Notice must be given of the location of the availability of theunmodified current source code, e.g.,  http://www.Kelley.com/or  ftp://ftp.Kelley.comin the documentation and/or other materials provided with thedistribution.5. All advertising and published materials mentioning features or useof this software must display the following acknowledgment:  "Thisproduct includes software developed by Clifford Kelley and othercontributors."6. The name of Clifford Kelley may not be used to endorse or promoteproducts derived from this software without specific prior writtenpermission.      DISCLAIMERThis software is provided by Clifford Kelley and contributors "as is" andany expressed or implied warranties, including, but not limited to, theimplied warranties of merchantability and fitness for a particularpurpose are disclaimed.  In no event shall Clifford Kelley orcontributors be liable for any direct, indirect, incidental, special,exemplary, or consequential damages (including, but not limited to,procurement of substitute goods or services; loss of use, data, orprofits; or business interruption) however caused and on any theory ofliability, whether in contract, strict liability, or tort (includingnegligence or otherwise) arising in any way out of the use of thissoftware, even if advised of the possibility of such damage.*//* ------------------------------- includes ------------------------------- */#include <linux/kernel.h>#include <linux/module.h>#include <linux/slab.h>#include <rtai.h>#include <rtai_sched.h>#include <rtai_fifos.h>#include <rtai_shm.h>#include  "port.h"#include  "ogr_defines.h"#include  "ogr_structs.h"#if !defined( __OGRT_GLOBALS_H__)#define __OGRT_GLOBALS_H__#ifdef OGRTMAIN//  C/A PRN code initialization (first element is not used)INT16 PRN_Code[] ={  0,  0x3f6, 0x3ec, 0x3d8, 0x3b0,   0x04b, 0x096, 0x2cb, 0x196,   0x32c, 0x3ba, 0x374, 0x1d0,   0x3a0, 0x340, 0x280, 0x100,   0x113, 0x226, 0x04c, 0x098,   0x130, 0x260, 0x267, 0x338,   0x270, 0x0e0, 0x1c0, 0x380,   0x22b, 0x056, 0x0ac, 0x158,   0x058, 0x18b, 0x316, 0x058};//  code phase offsets with respect to channel 'leadch'UINT16 monosat_cod_ofs[NOFCHN];#if 0static UINT16 monosat_cod_ofs[] ={ // 12 channels available//  -855,-684,-513,-342,-171,0,1193,1364,1535,1706,1877,2048//// 11 channels, dither = late://                o  o  o  o  o  O                 o  o  o  o  o// x  x  x  x  x  X                 x  x  x  x  x//// offset://  204   205   205   205   205   204   205   205   205   205//     205   205   204   205   205   205   205   204   205   205////// 11 channels, dither = late://                o  o  o  o  o  O                 o  o  o  o  o// x  x  x  x  x  X                 x  x  x  x  x//// 0, -1024, -820, -615, -410, -205, 0, 1228, 1433, 1638, 1843, 2048//// 11 channels, dither = early:// o  o  o  o  o                 O  o  o  o  o  o//                x  x  x  x  x                 X  x  x  x  x  x//  0, -2048, -1843, -1638, -1433, -1228, 0, 205, 510, 615, 820, 1024  0, 205, 410, 615, 820, 1025, 2253, 2458, 2663, 2868, 3073, 3277//  0, -100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0  -> negative phase offsets!//    0, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100//    0, 0, 40, 80, 120, 160, 200, 240, 280, 320, 360, 400//    0, 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000//    0, 0, 150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500//    0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000, 2200//    -400, -200, 0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800//    0, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3600, 4000, 4400//    -1000, -800, -600, -400, -200, 0, 200, 400, 600, 800, 1000, 1200//  first element is not used!};#endif//UINT16 accum_missed;        // content of ACCUM_STATUS_BCHANNEL   *Chan;RT_CTRL   *RT_Ctrl;CHN_RBUF  *Chn_RBuf;INT16         search_min_f,              search_max_f,              confirm_above_thresh_max = 8,              confirm_count_max = 10,              pull_in_count_max = 1500,              align_count_max = 1000,              nav_tic;long          frq_step,              acq_thresh,              code_corr,              pul_cod_c1, pul_cod_c3,              pul_car_c1, pul_car_c3,              trk_cod_c1, trk_cod_c3,              trk_car_c1, trk_car_c3;long          car_phs_res_prv[NOFCHN],              cod_phs_res_prv[NOFCHN];// Preamble_Found = 1  : preamble found, not inverted // Preamble_Found = -1 : preamble found, inverted // Preamble_Found = 0  : preamble not yet foundint Preamble_Found[NOFCHN];#else// ----------------------------------------------------------------------------//  C/A PRN code initialization (first element is not used)extern INT16 PRN_Code[];//  code phase offsets with respect to channel 'leadch'extern UINT16 monosat_cod_ofs[];//extern UINT16 accum_missed;        // content of ACCUM_STATUS_Bextern CHANNEL   *Chan;extern RT_CTRL   *RT_Ctrl;extern CHN_RBUF  *Chn_RBuf;extern INT16  search_min_f,              search_max_f,              confirm_above_thresh_max,              confirm_count_max,              pull_in_count_max,              align_count_max,              nav_tic;extern long   frq_step,              acq_thresh,              code_corr,              pul_cod_c1, pul_cod_c3,              pul_car_c1, pul_car_c3,              trk_cod_c1, trk_cod_c3,              trk_car_c1, trk_car_c3;extern long   car_phs_res_prv[],              cod_phs_res_prv[];extern int Preamble_Found[];#endif#endif/* ------------------------------- end of file ---------------------------- */

⌨️ 快捷键说明

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