亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gpsfuncs.c

?? C寫的用軟件無線電實現的GPS模擬程序
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* ************************************************************************    *                                                                      *   *                          GPS Simulation                              *   *                                                                      *   * -------------------------------------------------------------------- *   *                                                                      *   *    Module:   gpsfuncs.c                                              *   *                                                                      *   *   Version:   0.1                                                     *   *                                                                      *   *      Date:   17.02.02                                                *   *                                                                      *   *    Author:   G. Beyerle                                              *   *                                                                      *   * -------------------------------------------------------------------- *   *                                                                      *   * Copyright (c) 1996-2001 Clifford Kelley.  All Rights Reserved.       *   * Copyright (C) 2002-2006 Georg 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 'gpsfuncs.cpp', 'gpsrcvr.cpp' and 'gp2021.cpp' are modi-   *   * fied versions of the files with the same name from Clifford Kelley's *    * OpenSourceGPS distribution. The unmodified files can be obtained     *   * from http://www.home.earthlink.net/~cwkelley                         *   *                                                                      *   * -------------------------------------------------------------------- *   *                                                                      *   *                                GPS receiver                          *   *                                                                      *   ************************************************************************ *//* ******************************* changes ********************************   dd.mm.yy -   ************************************************************************ *//***********************************************************************  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-2001 Clifford Kelley.  All Rights Reserved.  This LICENSE must be included with the GPSRCVR 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 <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <math.h>#ifndef linux# include <io.h>#endif#include "ogsdefine.h"#include "ogsstructs.h"#include "ogsextern.h"#include "ogsprototypes.h"#include "ogslibrary.h"/* ------------------------------ prototypes -------------------------------- */int matherr (struct exception *a);/* ------------------------------- globals ---------------------------------- */extern time_t thetime;/* ------------------------------ functions --------------------------------- *//*******************************************************************************FUNCTION bit_test_l()RETURNS  intPARAMETERS    Data    bit_nPURPOSE  This function returns a 1 if bit number bit_n of long Data is set  else it returns a 0WRITTEN BY  Clifford Kelley*******************************************************************************/inline int  bit_test_l( unsigned long data, char bit_n){  int result;  result = 0;  if (data & test_l[bit_n])    result = 1;  return result;}/*******************************************************************************FUNCTION satfind()RETURNS  None.PARAMETERS None.PURPOSE  THIS FUNCTION DETERMINES THE SATELLITES TO SEARCH FOR  WHEN ALMANAC DATA IS AVAILABLEWRITTEN BY  Clifford Kelley*******************************************************************************/SATVIS satfind( char i){  float   ralt, tdot, b, az;  float   satang, alm_time, almanac_date;  double  range1, range2, xls, yls, zls, xaz, yaz, xn, yn, zn, xe, ye;  long    jd_yr;  ECEF    gpspos1, gpspos2;  SATVIS  result;  int     jd_m;  struct tm *gmt;  double  time_s;  static int justonce = 1;/*      INITIALIZE ALL THE CONSTANTS*/  putenv( tzstr);  tzset();//  thetime = time( NULL);          // *** CHECKME ***  thetime = 1015302770L;  if ( justonce)  {    printf("*** set time to 1015302770 ***\n");    justonce = 0;  }        gmt = gmtime( &thetime);// set up the correct time  if (gmt->tm_mon <= 1)  {    jd_yr = (long)( 365.25 * (gmt->tm_year - 1. + 1900.));  // GB: (long)() inserted    jd_m  = (int)( 30.6001 * (gmt->tm_mon+14.));            // GB: (int)() inserted  }  else  {    jd_yr = (long)( 365.25 * (gmt->tm_year + 1900.));    jd_m  = (int)( 30.6001 * (gmt->tm_mon+2.));  }  time_s = gmt->tm_hour/24. + gmt->tm_min/1440. + gmt->tm_sec/86400. +            1720981.5 + jd_yr + jd_m + gmt->tm_mday;  gps_week     = (int)((time_s - 2444244.5)/7.);  almanac_date = gps_alm[i].week * 7.0 + 2444244.5;  if ( gps_week - gps_alm[i].week > 512)     almanac_date += 1024*7.0;  alm_time  = (time_s - almanac_date) * 86400.;  clock_tow = (long) ((time_s - gps_week*7. - 2444244.5) * 86400.); // GB: inserted cast/*      CALCULATE THE POSITION OF THE SATELLITES*/  if (gps_alm[i].inc > 0.0 && i>0)  {    gpspos1 = satpos_almanac( alm_time,i);    gpspos2 = satpos_almanac( alm_time+60.0,i);/*      CALCULATE THE POSITION OF THE RECEIVER*/    rec_pos_xyz = llh_to_ecef(current_loc);    xn  = -cos( current_loc.lon)*sin( current_loc.lat);    yn  = -sin( current_loc.lon)*sin( current_loc.lat);    zn  =  cos( current_loc.lat);    xe  = -sin( current_loc.lon);    ye  =  cos( current_loc.lon);/*     DETERMINE IF A CLEAR LINE OF SIGHT EXISTS*/    xls  = gpspos1.x - rec_pos_xyz.x;    yls  = gpspos1.y - rec_pos_xyz.y;    zls  = gpspos1.z - rec_pos_xyz.z;    range1 = sqrt(xls*xls+yls*yls+zls*zls);    ralt = sqrt( rec_pos_xyz.x * rec_pos_xyz.x +                  rec_pos_xyz.y * rec_pos_xyz.y +                  rec_pos_xyz.z * rec_pos_xyz.z);    tdot = ( rec_pos_xyz.x * xls +              rec_pos_xyz.y * yls +              rec_pos_xyz.z * zls) / range1 / ralt;    xls  = xls / range1;    yls  = yls / range1;    zls  = zls / range1;//    range2 = sqrt( pow( gpspos2.x - rec_pos_xyz.x, 2) + //                   pow( gpspos2.y - rec_pos_xyz.y, 2) +//                   pow( gpspos2.z - rec_pos_xyz.z, 2));    if ( tdot >= 1.00 )      b = 0.0;    else if ( tdot <= -1.00 )      b = pi;    else      b = acos( tdot);    satang = pi/2.0 - b;    xaz    = xe*xls + ye*yls;    yaz    = xn*xls + yn*yls + zn*zls;    if ( xaz != 0.0 || yaz != 0.0)       az = atan2( xaz, yaz);    else       az = 0.0;    result.x = gpspos1.x;    result.y = gpspos1.y;    result.z = gpspos1.z;    result.elevation = satang;    result.azimuth   = az;//    result.doppler   = (range1-range2) * 5.2514 / 60.;    result.doppler   = 0.;                                  // *** CHECKME ***    static int JustOnce = 1;    if ( JustOnce)    {      printf("sat_find: *** set doppler to zero! ***\n");      JustOnce = 0;    }  //    getchar();  }  return result;}/*******************************************************************************FUNCTION satpos_almanac()RETURNS  None.PARAMETERS None.PURPOSE     THIS SUBROUTINE CALCULATES THE SATELLITE POSITION     BASED ON ALMANAC DATA         R    - RADIUS OF SATELLITE AT TIME T     SLAT - SATELLITE LATITUDE     SLONG- SATELLITE LONGITUDE     T    - TIME FROM START OF WEEKLY EPOCH     ETY  - ORBITAL ECCENTRICITY     TOA  - TIME OF APPLICABILITY FROM START OF WEEKLY EPOCH     INC  - ORBITAL INCLINATION     RRA  - RATE OF RIGHT ASCENSION    SQA  - SQUARE ROOT OF SEMIMAJOR AXIS     LAN  - LONGITUDE OF NODE AT WEEKLY EPOCH     AOP  - ARGUMENT OF PERIGEE    MA   - MEAN ANOMALY AT TOAWRITTEN BY  Clifford Kelley******************************************************************************/ECEF satpos_almanac( float time, char n){  double ei,ea,diff,r,ta,la,aol,xp,yp,d_toa;  ECEF result;/*      MA IS THE ANGLE FROM PERIGEE AT TOA*/  d_toa=time-gps_alm[n].toa;  if ( d_toa > 302400.0)     d_toa = d_toa - 604800.0;  ei = gps_alm[n].ma + d_toa * gps_alm[n].w;  ea = ei;  do  {    diff = (ei-(ea-gps_alm[n].ety*sin(ea)))/(1.-gps_alm[n].ety*cos(ea));    ea   = ea+diff;  } while ( fabs( diff) > 1.0e-6);/*      EA IS THE ECCENTRIC ANOMALY*/  if ( gps_alm[n].ety != 0.0 )    ta = atan2( sqrt(1. - pow(gps_alm[n].ety,2))*sin(ea),cos(ea)-gps_alm[n].ety);  else    ta = ea;/*      TA IS THE TRUE ANOMALY (ANGLE FROM PERIGEE)*/  r = pow( gps_alm[n].sqra,2)*(1.-pow(gps_alm[n].ety,2)*cos(ea));/*      R IS THE RADIUS OF SATELLITE ORBIT AT TIME T*/  aol = ta + gps_alm[n].w;/*    AOL IS THE ARGUMENT OF LATITUDE    LA IS THE LONGITUDE OF THE ASCENDING NODE*/  la = gps_alm[n].omega0 + (gps_alm[n].omegadot-omegae) * d_toa - gps_alm[n].toa * omegae;  xp = r*cos(aol);  yp = r*sin(aol);  result.x = xp*cos(la) - yp*cos(gps_alm[n].inc)*sin(la);  result.y = xp*sin(la) + yp*cos(gps_alm[n].inc)*cos(la);  result.z = yp*sin(gps_alm[n].inc);  return result;}/*******************************************************************************FUNCTION satpos_ephemeris()RETURNS  None.PARAMETERS None.PURPOSE     THIS SUBROUTINE CALCULATES THE SATELLITE POSITION     BASED ON BROADCAST EPHEMERIS DATA     R    - RADIUS OF SATELLITE AT TIME T     Crc  - RADIUS COSINE CORRECTION TERM     Crs  - RADIUS SINE   CORRECTION TERM     SLAT - SATELLITE LATITUDE     SLONG- SATELLITE LONGITUDE     TOE  - TIME OF EPHEMERIS FROM START OF WEEKLY EPOCH     ETY  - ORBITAL INITIAL ECCENTRICITY     TOA  - TIME OF APPLICABILITY FROM START OF WEEKLY EPOCH     INC  - ORBITAL INCLINATION     IDOT - RATE OF INCLINATION ANGLE     CUC  - ARGUMENT OF LATITUDE COSINE CORRECTION TERM     CUS  - ARGUMENT OF LATITUDE SINE   CORRECTION TERM     CIC  - INCLINATION COSINE CORRECTION TERM     CIS  - INCLINATION SINE   CORRECTION TERM     RRA  - RATE OF RIGHT ASCENSION     SQA  - SQUARE ROOT OF SEMIMAJOR AXIS     LAN  - LONGITUDE OF NODE AT WEEKLY EPOCH     AOP  - ARGUMENT OF PERIGEE     MA   - MEAN ANOMALY AT TOA     DN   - MEAN MOTION DIFFERENCEWRITTEN BY  Clifford Kelley

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲电影在线免费观看| 国产精品白丝在线| 国产精品2024| 性做久久久久久| 久久精品免视看| 色88888久久久久久影院按摩 | 国产精品久久久久精k8 | 国产精品色噜噜| 色婷婷亚洲一区二区三区| www.亚洲国产| 免费观看成人av| 一区二区三区在线观看网站| 久久亚洲精华国产精华液| 欧美久久久久久久久| 91色在线porny| 亚洲三级在线播放| 一区二区三区四区在线免费观看| 久久久噜噜噜久久中文字幕色伊伊| 欧美在线一二三| 亚洲aaa精品| 久久精品亚洲乱码伦伦中文| 欧美亚洲一区二区在线观看| 国产一区二区三区| 日韩精品成人一区二区三区| 国产91精品精华液一区二区三区 | 99re6这里只有精品视频在线观看| 蜜桃精品视频在线观看| 亚洲成av人片一区二区梦乃| 亚洲啪啪综合av一区二区三区| 久久综合九色综合久久久精品综合| 国产乱码精品一区二区三区五月婷| 精品一区二区三区的国产在线播放| 亚洲超丰满肉感bbw| 国产精品高清亚洲| 国产欧美日韩一区二区三区在线观看| 欧美高清视频一二三区| 欧美午夜电影在线播放| 一本久久a久久免费精品不卡| 免费高清在线一区| 久久精品欧美一区二区三区不卡| 日韩色视频在线观看| 欧美三级日本三级少妇99| 99精品视频在线观看免费| 国产91精品一区二区| 粉嫩aⅴ一区二区三区四区| 狠狠色丁香婷婷综合| 午夜亚洲福利老司机| 国产欧美一区二区三区鸳鸯浴 | 亚洲综合色区另类av| 亚洲精品美腿丝袜| 亚洲精品国产成人久久av盗摄 | 天堂av在线一区| 亚洲国产成人av网| 亚洲福利视频一区| 亚洲国产成人av| 天天综合日日夜夜精品| 天天影视网天天综合色在线播放| 久久无码av三级| 亚洲精品国产无套在线观| 亚洲最新在线观看| 一区二区三区在线播| 欧美性猛交xxxxxx富婆| 欧美在线|欧美| 欧美午夜理伦三级在线观看| 欧美成人福利视频| 久久综合九色综合欧美98| 久久精子c满五个校花| 欧美极品美女视频| 日韩美女精品在线| 夜色激情一区二区| 亚洲日本免费电影| 精品一区二区久久| 成人av在线一区二区| 色婷婷久久一区二区三区麻豆| av一区二区三区四区| 欧美一级视频精品观看| 亚洲一区二区四区蜜桃| 91在线视频播放| 91在线一区二区三区| 欧美xxxxx裸体时装秀| 开心九九激情九九欧美日韩精美视频电影 | 国产精品夫妻自拍| 91丨九色丨蝌蚪富婆spa| 亚洲成a人v欧美综合天堂| 中文字幕永久在线不卡| 欧美成人精品1314www| 一本大道av伊人久久综合| 99精品在线免费| 日本道精品一区二区三区| 亚洲精品日日夜夜| 国产精品996| 国产三区在线成人av| 国产精品久久久久毛片软件| 亚洲精品大片www| 九色综合国产一区二区三区| 日韩中文字幕亚洲一区二区va在线| 国产精品麻豆一区二区 | 欧美一区二区三区在线观看| 国产福利91精品| 在线国产电影不卡| 国产日韩欧美a| 国产婷婷精品av在线| 国产一区在线观看麻豆| 国产福利精品导航| 精品国产乱码久久久久久久| 在线欧美日韩国产| 国产精品丝袜在线| 日韩av不卡在线观看| 精品视频一区三区九区| 精品欧美乱码久久久久久1区2区 | 欧美丰满一区二区免费视频| 精品久久人人做人人爽| 樱花草国产18久久久久| 国产在线观看一区二区| 国产精品久久看| 欧美日韩一区二区在线观看视频| 久久精品视频在线看| 国产精品进线69影院| 成人自拍视频在线| 成人欧美一区二区三区黑人麻豆| 99麻豆久久久国产精品免费优播| 综合久久综合久久| 91成人网在线| 偷拍一区二区三区四区| 欧美一区二区三区公司| 久久97超碰国产精品超碰| 国产亚洲综合av| av一区二区三区在线| 亚洲综合激情另类小说区| 欧美二区在线观看| 麻豆精品国产91久久久久久| 国产丝袜美腿一区二区三区| 色综合久久88色综合天天| 午夜精品久久久久久| 精品国产乱码久久久久久夜甘婷婷| 国产伦精品一区二区三区在线观看 | av亚洲精华国产精华精| 一区二区三区在线视频观看| 7777精品伊人久久久大香线蕉最新版| 久久成人免费网站| 国产精品素人视频| 欧美视频日韩视频在线观看| 日本不卡在线视频| 国产视频一区在线观看| 欧美综合在线视频| 国内外成人在线| 国产精品久久福利| 欧美日韩成人综合在线一区二区| 美国毛片一区二区| 国产精品国产三级国产普通话三级| 色婷婷精品大视频在线蜜桃视频| 五月婷婷欧美视频| 久久精品视频免费| 欧美三日本三级三级在线播放| 美国毛片一区二区| 亚洲色图欧美偷拍| 日韩欧美aaaaaa| 99国产精品久久久| 久久不见久久见中文字幕免费| 亚洲欧洲三级电影| 日韩精品一区二区三区视频| 色婷婷久久久久swag精品| 国产一区二区日韩精品| 亚洲综合精品自拍| 亚洲国产精品ⅴa在线观看| 欧美在线不卡一区| 成人免费视频一区| 另类小说视频一区二区| 亚洲欧美二区三区| 精品国产乱码久久久久久牛牛| 色婷婷综合久久久久中文| 国产一区高清在线| 一区二区三区四区视频精品免费 | 欧美色图片你懂的| 国产精品99久久久| 丝袜国产日韩另类美女| 国产精品免费av| 欧美大片在线观看一区二区| 色婷婷综合久色| 成人中文字幕合集| 狠狠色狠狠色综合| 免费在线观看一区二区三区| 亚洲欧美一区二区三区国产精品 | 美女在线一区二区| 亚洲自拍与偷拍| 中文字幕va一区二区三区| 日韩免费福利电影在线观看| 91成人免费在线视频| 99久久精品情趣| 国产99久久久久久免费看农村| 日韩1区2区3区| 亚洲图片自拍偷拍| 亚洲欧美偷拍另类a∨色屁股| 国产午夜精品久久久久久久| 日韩一区国产二区欧美三区| www..com久久爱| 国产精品一区二区久激情瑜伽| 奇米精品一区二区三区在线观看| 亚洲一区二区高清| 亚洲欧美一区二区三区久本道91|