/****************************************************************************/
/* program name : RNX2CRX */
/* */
/* RINEX file compression program for UNIX/MS-DOS system. */
/* convert the RINEX format to Compact RINEX format */
/* Created by Yuki HATANAKA / Geospatial Information Authority of Japan */
/* */
/* ver. */
/* 4.0.0 2007-02-05 test version Y. Hatanaka */
/* - CRINEX 1/3 for RINEX 2.x/3.x */
/* 4.0.1 2007-05-08 */
/* - elimination of supports for VMS and SUN OS 4.1.x */
/* - output not to the current directory but the same */
/* directory as the input file. */
/* - the same code for DOS and UNIX */
/* 4.0.2 2007-06-07 */
/* - fixing incompatibility of argument and format */
/* string of printf. */
/* 4.0.3 2007-06-21 */
/* - nothing was changed from 4.0.2 except for the */
/* version string to be the same as crx2rnx.c */
/* 4.0.4 2009-06-31 Y. Hatanaka */
/* - rename function getline to ggetline */
/* - correct typos in error messages */
/* 4.0.5 2012-07-1x Y. Hatanaka */
/* - check length of input file name */
/* - minor changes to suppress warning messages */
/* at compilation. */
/* - initialize "dummy" in main routine */
/* 4.0.6 2014-03-24 Y. Hatanaka */
/* - "include" statements are moved to the top. */
/* - Manipulation of file names in the new file naming */
/* convention (*.rnx/crx) is added. */
/* 4.0.7 2016-04-14 Y. Hatanaka */
/* - increase the following constants */
/* MAXSAT 90 -> 100 */
/* MAXTYPE 50 -> 100 */
/* MAXCLM 1024 -> 2048 */
/* MAX_BUFF_SIZE 131072 -> 204800 */
/* 4.0.8 2019-07-12 Y. Hatanaka */
/* - Correction of a bug which eliminates clock offset */
/* data periodically when used with the option "-e". */
/* - New option "-d" is added to delete input file after */
/* successful conversion. */
/* 4.1.0 2021-12-16 Y. Hatanaka */
/* - RINEX ver.4.xx files are accepted and converted to */
/* Compact RINEX ver. 3 format */
/* - Following bugs are fixed: */
/* + Error in case the number of special records exceeds */
/* 99 in RINEX ver.2 files */
/* + Error in case clock offset is padded with spaces */
/* in RINEX ver. 3 or 4 files. */
/* + Error in case a bad GNSS type is detected even if */
/* option -s is specified. */
/* */
/* Copyright (c) 2007 Geospatial Information Authority of Japan */
/* */
/****************************************************************************/
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#define VERSION "ver.4.1.0"
/**** Exit codes are defined here. ****/
#define EXIT_WARNING 2
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif
/*** define macro to flush or clear the output buffer ***/
#define FLUSH_BUFF printf("%s",top_buff), *(p_buff = top_buff)='\0'
#define CLEAR_BUFF *(p_buff = top_buff) = '\0'
#define CRX_VERSION1 "1.0" /* CRINEX version for RINEX 2.x */
#define CRX_VERSION2 "3.0" /* CRINEX version for RINEX 3.x */
#define PROGNAME "RNX2CRX"
#define MAXSAT 100 /* Maximum number of satellites observed at one epoch */
#define MAXTYPE 100 /* Maximum number of data types for a GNSS system */
#define MAXCLM 2048 /* Maximum columns in one line (>MAXTYPE*19+3) */
#define MAX_BUFF_SIZE 204800 /* Maximum size of output buffer (>MAXSAT*(MAXTYPE*19+4)+60 */
#define ARC_ORDER 3 /* order of difference to take */
/* define data structure for fields of clock offset and observation records */
/* Those data will be handled as integers after eliminating decimal points. */
/* Since their size may exceeds range between LONG_MIN and LONG_MAX, */
/* they will be read with being divided properly into upper and lower digits */
typedef struct clock_format{
long u[ARC_ORDER+1]; /* upper X digits */
long l[ARC_ORDER+1]; /* lower 8 digits (can be 9-10 digits for deltas)*/
} clock_format;
typedef struct data_format{
long u[ARC_ORDER+1]; /* upper X digits */
long l[ARC_ORDER+1]; /* lower 5 digits (can be 6-7 digits for deltas) */
int order;
} data_format;
/* define global variables */
long ep_count = 0;
long ep_reset = 0;
long nl_count = 0;
int rinex_version; /* =2, 3 or 4 */
int nsat,ntype,ntype_gnss[UCHAR_MAX],ntype_record[MAXSAT],clk_order = -1;
int exit_status = EXIT_SUCCESS;
int skip_strange_epoch = 0; /* default : stop with error */
int delete_if_no_error = 0; /* default : not delete */
int n_infile = 0; /* number of input file (must be 0 or 1) */
/*
clock_format clk1,clk0 = {0,0,0,0,0,0,0,0};
*/
clock_format clk1,clk0 = {{0,0,0,0},{0,0,0,0}};
data_format dy0[MAXSAT][MAXTYPE], dy1[MAXSAT][MAXTYPE];
char flag0[MAXSAT][MAXTYPE*2], flag[MAXSAT][MAXTYPE*2];
char out_buff[MAX_BUFF_SIZE] = {'x','\0'}; /**** a character is put as a stopper to avoid memory overflow ****/
char *top_buff=&out_buff[1],*p_buff; /**** therefore, actual buffer start from the second character ****/
char infile[MAXCLM]; /**** name of input file ****/
size_t C1 = sizeof(""); /* size of one character */
size_t C2 = sizeof(" "); /* size of 2-character string */
size_t C3 = sizeof(" "); /* size of 3-character string */
size_t C14 = sizeof(" "); /* size of 14-character string */
char oldline[MAXCLM] = {'&','\0'};
int nsat_old = 0;
/* declaration of functions */
void parse_args(int argc, char *argv[]);
void header(void);
int get_next_epoch(char *p_line);
void skip_to_next(char *p_line);
void initialize_all(char *oldline,int *nsat_old, int count);
void put_event_data(char *p_line);
void read_clock(char *line,int shift_cl);
void process_clock(void);
int set_sat_table(char *p_new, char *p_old, int nsat_old,int *sa
没有合适的资源?快使用搜索试试~ 我知道了~
incremental_updates.20220601.tar.gz
需积分: 5 7 下载量 132 浏览量
2022-06-19
11:00:17
上传
评论 1
收藏 57.15MB GZ 举报
温馨提示
共465个文件
f:198个
c:47个
apr:40个
gamit10.71的最新更新包incremental_updates.20220601.tar.gz,可以解算最新至2022年6月1日前的GNSS数据,欢迎下载使用。
资源详情
资源评论
资源推荐
收起资源包目录
incremental_updates.20220601.tar.gz (465个子文件)
lfile. 1.6MB
sittbl. 45KB
cfmrg. 0B
autcln.3.39 2.12MB
lnx1900.405 13.32MB
sestbl.10.71 10KB
svnav.dat.allgnss 102KB
igb14_comb_soam.apr 1.71MB
igb14_comb_noam.apr 1.71MB
igb14_comb_anta.apr 1.71MB
igb14_comb_aust.apr 1.71MB
igb14_comb_carb08.apr 1.71MB
igb14_comb_pcfc.apr 1.71MB
igb14_comb_soma.apr 1.71MB
igb14_comb_eura.apr 1.71MB
igb14_comb_arab.apr 1.71MB
igb14_comb_amur08.apr 1.71MB
igb14_comb_sund08.apr 1.71MB
igb14_comb_indi.apr 1.71MB
igb14_comb_nazc.apr 1.71MB
igb14_comb_nubi.apr 1.71MB
igb14_comb_na12.apr 1.71MB
igb14_comb_na17.apr 1.71MB
igb14_comb_so13.apr 1.71MB
igb14_comb_nu13.apr 1.71MB
lfile.apr 1.71MB
igb14_comb.apr 1.71MB
igs14_comb_noam.apr 1.27MB
igs14_comb_soam.apr 1.27MB
igs14_comb_anta.apr 1.27MB
igs14_comb_carb08.apr 1.27MB
igs14_comb_aust.apr 1.27MB
igs14_comb_pcfc.apr 1.27MB
igs14_comb_eura.apr 1.27MB
igs14_comb_soma.apr 1.27MB
igs14_comb_arab.apr 1.27MB
igs14_comb_amur08.apr 1.27MB
igs14_comb_indi.apr 1.27MB
igs14_comb_nubi.apr 1.27MB
igs14_comb_sund08.apr 1.27MB
igs14_comb_nazc.apr 1.27MB
igs14_comb_na17.apr 1.27MB
igs14_comb_na12.apr 1.27MB
igs14_comb_so13.apr 1.27MB
igs14_comb_nu13.apr 1.27MB
igs14_comb.apr 1.27MB
igb14.apr 172KB
links.arc 7KB
igs14_2196_plus.atx 22MB
ngs14_2206_plus.atx 21.46MB
ngs14_2206.atx 21.15MB
igs14_2196.atx 21.03MB
rnx2crx.c 38KB
crx2rnx.c 37KB
csubs_sun.c 9KB
csubs_dec.c 9KB
csubs_sol.c 9KB
csubs_intel.c 9KB
csubs_sgi.c 9KB
csubs_hp.c 9KB
csubs_ibm.c 9KB
csubs_pgi.c 9KB
csubs_gftn.c 9KB
csubs_g77.c 9KB
get_color_ro.c 3KB
jbegn_sun.c 3KB
jbegn_hp.c 3KB
getdir_g77.c 2KB
jlstl_sun.c 2KB
jlstl_hp.c 2KB
pickfn_sol.c 2KB
inkey_g77.c 2KB
getdir_sol.c 2KB
getdir_hp.c 2KB
pickfn_hp.c 2KB
gsclip_hp.c 2KB
gsclip_sun.c 2KB
jtexh_sun.c 2KB
jtexh_hp.c 2KB
jwloc_sun.c 2KB
jwloc_hp.c 2KB
inkey_sol.c 1KB
inkey_hp.c 1KB
getmac_hp.c 1KB
inkey_sun.c 1KB
getmac_sun.c 1KB
jr2dr_hp.c 1KB
jr2dr_sun.c 1KB
j2mrk_sun.c 1KB
j2mrk_hp.c 1KB
jr2mv_sun.c 1KB
jr2mv_hp.c 1KB
check_window.c 983B
j2drw_sun.c 921B
j2drw_hp.c 919B
j2mov_hp.c 753B
j2mov_sun.c 753B
irename_sol.c 561B
irename_hp.c 560B
track.cmd 6KB
共 465 条
- 1
- 2
- 3
- 4
- 5
zgynkmcfycfy
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0