麒麟系统编译,解决大小写文件名、函数不兼容等问题
This commit is contained in:
parent
9238fe34ab
commit
14649eee58
|
|
@ -3,7 +3,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "BaseFunExport.h"
|
#include "BaseFunExport.h"
|
||||||
#include "../../Slfio/include/memrdwt.h"
|
#include "MemRdWt.h"
|
||||||
void BASEFUN_EXPORT Compute_Input_Par(MyDataTypeEnum vVdl,int x_delay,int y_delay,int ndim);
|
void BASEFUN_EXPORT Compute_Input_Par(MyDataTypeEnum vVdl,int x_delay,int y_delay,int ndim);
|
||||||
void BASEFUN_EXPORT GetWvst(unsigned char *inbuf,short *outbuf,int len);
|
void BASEFUN_EXPORT GetWvst(unsigned char *inbuf,short *outbuf,int len);
|
||||||
void BASEFUN_EXPORT Get_Wave_Object(/*int mone_or_dipole,*/CMemRdWt *slf,float dep,int *outcurve,short *in_buffer,int ndim);
|
void BASEFUN_EXPORT Get_Wave_Object(/*int mone_or_dipole,*/CMemRdWt *slf,float dep,int *outcurve,short *in_buffer,int ndim);
|
||||||
|
|
|
||||||
|
|
@ -1288,7 +1288,7 @@ float pe_axp_(int *cc)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
b=0x7e-(0x40-b1)*4-j;
|
b=(0x7e)-(0x40-b1)*4-j;
|
||||||
}
|
}
|
||||||
zz.x2=0x80000000&(a<<24);
|
zz.x2=0x80000000&(a<<24);
|
||||||
zz.x2=zz.x2|((b<<23)&0x7f800000);
|
zz.x2=zz.x2|((b<<23)&0x7f800000);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
#include "float.h"//for _isnan
|
#include "float.h"//for _isnan
|
||||||
#include "BaseFun.h"
|
#include "BaseFun.h"
|
||||||
#include "wvst.h"
|
#include "wvst.h"
|
||||||
int __cdecl fir(double *in_buffer,int array_num,int wave_len,double mfl,double fl,double fh);
|
|
||||||
|
//int __cdecl fir(double *in_buffer,int array_num,int wave_len,double mfl,double fl,double fh);
|
||||||
|
int fir(double *in_buffer,int array_num,int wave_len,double mfl,double fl,double fh);
|
||||||
int Index_table[16]={
|
int Index_table[16]={
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
|
|
@ -116,7 +118,7 @@ DWORD value_table[90]={
|
||||||
};
|
};
|
||||||
|
|
||||||
int MFL=19,MFH=20,DFL=21,DFH=22;
|
int MFL=19,MFH=20,DFL=21,DFH=22;
|
||||||
int par[]={
|
unsigned int par[]={
|
||||||
0,0,//1
|
0,0,//1
|
||||||
0,0,//2
|
0,0,//2
|
||||||
0,0x3f000000,//3
|
0,0x3f000000,//3
|
||||||
|
|
@ -874,6 +876,7 @@ int dft(double *in_buffer,int *wave_len,int array_num,int eq_1,int eq_0)//int *
|
||||||
double eq0=0.0;
|
double eq0=0.0;
|
||||||
double eq1=1.0;
|
double eq1=1.0;
|
||||||
|
|
||||||
|
short eax=0;//jyl
|
||||||
// mov eax, wave_len
|
// mov eax, wave_len
|
||||||
// sub eax, 4
|
// sub eax, 4
|
||||||
// mov wave_len, eax ; //arg_4-=4;
|
// mov wave_len, eax ; //arg_4-=4;
|
||||||
|
|
@ -980,6 +983,7 @@ return 2;
|
||||||
loc_415A66:;
|
loc_415A66:;
|
||||||
// cmp i, 1 ; //i!=1
|
// cmp i, 1 ; //i!=1
|
||||||
// jnz short loc_415AA1
|
// jnz short loc_415AA1
|
||||||
|
//short eax=first_val&0x80000001;//jyl
|
||||||
if(i!=0) goto loc_415AA1;
|
if(i!=0) goto loc_415AA1;
|
||||||
// mov eax, i
|
// mov eax, i
|
||||||
// mov ecx, wave_len
|
// mov ecx, wave_len
|
||||||
|
|
@ -989,7 +993,7 @@ loc_415A66:;
|
||||||
// mov eax, first_val
|
// mov eax, first_val
|
||||||
// and eax, 80000001h
|
// and eax, 80000001h
|
||||||
// jns short loc_415A93 ; ;//not neg
|
// jns short loc_415A93 ; ;//not neg
|
||||||
short eax=first_val&0x80000001;
|
eax=first_val&0x80000001;//jyl提到goto前定义
|
||||||
if(eax>=0) goto loc_415A93 ;
|
if(eax>=0) goto loc_415A93 ;
|
||||||
// dec eax
|
// dec eax
|
||||||
// or eax, 0FFFFFFFEh
|
// or eax, 0FFFFFFFEh
|
||||||
|
|
@ -4019,7 +4023,8 @@ int fir(double *in_buffer,int array_num,int wave_len,double delay,double fl,dou
|
||||||
// jz short loc_413948;//>=0
|
// jz short loc_413948;//>=0
|
||||||
if(fh>eq0) goto loc_413948;
|
if(fh>eq0) goto loc_413948;
|
||||||
// jmp loc_414073
|
// jmp loc_414073
|
||||||
goto loc_414073;
|
//goto loc_414073;//jyl
|
||||||
|
return 1;//jyl
|
||||||
loc_413948:
|
loc_413948:
|
||||||
if(fl<=eq0) goto loc_413968;
|
if(fl<=eq0) goto loc_413968;
|
||||||
// fld fh
|
// fld fh
|
||||||
|
|
@ -4030,7 +4035,8 @@ loc_413948:
|
||||||
if(fh>eq0) goto loc_41396D;
|
if(fh>eq0) goto loc_41396D;
|
||||||
loc_413968:
|
loc_413968:
|
||||||
// jmp loc_414073
|
// jmp loc_414073
|
||||||
goto loc_414073;
|
//goto loc_414073;//jyl
|
||||||
|
return 1;//jyl
|
||||||
loc_41396D:
|
loc_41396D:
|
||||||
char *p=(char*)&eq1_1886;
|
char *p=(char*)&eq1_1886;
|
||||||
// mov dword ptr eq1_1886, 6F0068DCh
|
// mov dword ptr eq1_1886, 6F0068DCh
|
||||||
|
|
@ -4057,7 +4063,8 @@ loc_41396D:
|
||||||
// jz short loc_4139C2;//<=0 return
|
// jz short loc_4139C2;//<=0 return
|
||||||
if(delay>eq0) goto loc_4139C2;
|
if(delay>eq0) goto loc_4139C2;
|
||||||
// jmp loc_414073
|
// jmp loc_414073
|
||||||
goto loc_414073;
|
//goto loc_414073;//jyl
|
||||||
|
return 1;//jyl
|
||||||
loc_4139C2:
|
loc_4139C2:
|
||||||
// fld eq0_5
|
// fld eq0_5
|
||||||
// fdiv delay
|
// fdiv delay
|
||||||
|
|
@ -4110,7 +4117,8 @@ loc_413A3C:
|
||||||
if(fl_0>eq0) goto loc_413A5E;
|
if(fl_0>eq0) goto loc_413A5E;
|
||||||
if(fh_0<=delay_0) goto loc_413A5E;
|
if(fh_0<=delay_0) goto loc_413A5E;
|
||||||
// jmp loc_414073
|
// jmp loc_414073
|
||||||
goto loc_414073;
|
//goto loc_414073;//jyl
|
||||||
|
return 1;//jyl
|
||||||
|
|
||||||
loc_413A5E:
|
loc_413A5E:
|
||||||
// mov edx, wave_len
|
// mov edx, wave_len
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public:
|
||||||
QWidget* parent);
|
QWidget* parent);
|
||||||
//曲线数值统计
|
//曲线数值统计
|
||||||
//20210111 GZL add 纵滑块联动
|
//20210111 GZL add 纵滑块联动
|
||||||
void CDataManagger::CallDisplayCurveVerChange(int Type,
|
void CallDisplayCurveVerChange(int Type,
|
||||||
const QString& FileName,
|
const QString& FileName,
|
||||||
const QString& CurveName,
|
const QString& CurveName,
|
||||||
QWidget* parent,
|
QWidget* parent,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include "DataHelper.h"
|
#include "DataHelper.h"
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "cdialog.h"
|
#include "cdialog.h"
|
||||||
#include "GeometryUtils.h"
|
#include "geometryutils.h"
|
||||||
// #include "DataImport.h"
|
// #include "DataImport.h"
|
||||||
// #include "ObjProject.h"
|
// #include "ObjProject.h"
|
||||||
#include "BaseFun.h"
|
#include "BaseFun.h"
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
#ifndef DATAHELPER_H
|
#ifndef DATAHELPER_H
|
||||||
#define DATAHELPER_H
|
#define DATAHELPER_H
|
||||||
|
|
||||||
#include <Windows.h>
|
#ifdef WIN32
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif // WIN32
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include "MemRdWt.h"
|
#include "MemRdWt.h"
|
||||||
#include "datamanagerdefs.h"
|
#include "DataManagerDefs.h"
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
//#define DefTabNum 10//9 whp change 2020.5.25
|
//#define DefTabNum 10//9 whp change 2020.5.25
|
||||||
//for 曲线计算
|
//for 曲线计算
|
||||||
|
|
@ -84,8 +87,8 @@ public:
|
||||||
int isdelim(char c);
|
int isdelim(char c);
|
||||||
int iswhite(char c);
|
int iswhite(char c);
|
||||||
//int ComputeCurve(CString csExpress,float sdeps,float edeps,BOOL IsCurrentOpen);
|
//int ComputeCurve(CString csExpress,float sdeps,float edeps,BOOL IsCurrentOpen);
|
||||||
BOOL GetKey();
|
// BOOL GetKey();
|
||||||
BOOL CheckKey();
|
// BOOL CheckKey();
|
||||||
int GetCodeLen(int Code);
|
int GetCodeLen(int Code);
|
||||||
//add whp
|
//add whp
|
||||||
QString csName[MaxArg],csOutName;
|
QString csName[MaxArg],csOutName;
|
||||||
|
|
@ -108,4 +111,4 @@ public:
|
||||||
static void ReSampling(float *mr,int Row,int Col,float *aDep,float *tDep,int tnp);
|
static void ReSampling(float *mr,int Row,int Col,float *aDep,float *tDep,int tnp);
|
||||||
static void ReSampling(short *mr,int Row,int Col,float *aDep,float *tDep,int tnp);
|
static void ReSampling(short *mr,int Row,int Col,float *aDep,float *tDep,int tnp);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
#include <QCompleter>
|
#include <QCompleter>
|
||||||
#include <qtablewidget.h>
|
#include <qtablewidget.h>
|
||||||
#include <io.h>
|
//#include "io.h"
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include "DataManagger.h"
|
#include "DataManagger.h"
|
||||||
#include "InDefTableDlg.h"
|
#include "InDefTableDlg.h"
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public:
|
||||||
QWidget* parent);
|
QWidget* parent);
|
||||||
//曲线数值统计
|
//曲线数值统计
|
||||||
//20210111 GZL add 纵滑块联动
|
//20210111 GZL add 纵滑块联动
|
||||||
void CDataManagger::CallDisplayCurveVerChange(int Type,
|
void CallDisplayCurveVerChange(int Type,
|
||||||
const QString& FileName,
|
const QString& FileName,
|
||||||
const QString& CurveName,
|
const QString& CurveName,
|
||||||
QWidget* parent,
|
QWidget* parent,
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
#include "ui_cdialog.h"
|
#include "ui_cdialog.h"
|
||||||
#include "ui_sigleview.h"
|
#include "ui_sigleview.h"
|
||||||
#include "ui_doubleeditview.h"
|
#include "ui_doubleeditview.h"
|
||||||
#include "ui_sigletextview.h"
|
#include "ui_sigleTextview.h"
|
||||||
#include "GeometryUtils.h"
|
#include "geometryutils.h"
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
// MyLpsLib.h
|
// MyLpsLib.h
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "GeometryUtils.h"
|
#include "geometryutils.h"
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#define WLD_FILE_FLAG "WellMessage"
|
#define WLD_FILE_FLAG "WellMessage"
|
||||||
|
|
@ -18,84 +18,84 @@ typedef struct
|
||||||
char reserved[12];
|
char reserved[12];
|
||||||
}WldFileHead;
|
}WldFileHead;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char name[32]; // 井名 32
|
char name[32]; // 井名 32
|
||||||
char region[32]; // 地区名 32
|
char region[32]; // 地区名 32
|
||||||
int chin_code[16]; // 井名的汉字代码数组 64
|
int chin_code[16]; // 井名的汉字代码数组 64
|
||||||
char type[16]; // 井的类别标识 16
|
char type[16]; // 井的类别标识 16
|
||||||
float x_coor, y_coor; // 井位的大地坐标 8
|
float x_coor, y_coor; // 井位的大地坐标 8
|
||||||
char oil_company[40]; // 油公司名称 40
|
char oil_company[40]; // 油公司名称 40
|
||||||
float height; // 井的补心高度 4
|
float height; // 井的补心高度 4
|
||||||
float bit_program[5][2]; // 钻头程序 40
|
float bit_program[5][2]; // 钻头程序 40
|
||||||
float case_program[5][2]; // 套管程序 40
|
float case_program[5][2]; // 套管程序 40
|
||||||
char reserved[64]; // 保留未用 64
|
char reserved[64]; // 保留未用 64
|
||||||
} WSM; // 340
|
} WSM; // 340
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int log_times; // 测井次数 4
|
int log_times; // 测井次数 4
|
||||||
char log_company[40]; // 测井公司名称 40
|
char log_company[40]; // 测井公司名称 40
|
||||||
char log_team[32]; // 测井队名称 32
|
char log_team[32]; // 测井队名称 32
|
||||||
char log_series[16]; // 测井系列标识 16
|
char log_series[16]; // 测井系列标识 16
|
||||||
char log_project[16]; // 测井项目标识 16
|
char log_project[16]; // 测井项目标识 16
|
||||||
char log_profile[16]; // 地层剖面类别标识 16
|
char log_profile[16]; // 地层剖面类别标识 16
|
||||||
char log_date[12]; // 测井日期 12
|
char log_date[12]; // 测井日期 12
|
||||||
float stdep,endep; // 测量井段的起始深度和结束深度 8
|
float stdep,endep; // 测量井段的起始深度和结束深度 8
|
||||||
float bottom_temp; // 井底温度 4
|
float bottom_temp; // 井底温度 4
|
||||||
char mud_type[12]; // 泥浆类别标识 12
|
char mud_type[12]; // 泥浆类别标识 12
|
||||||
float mud_viscosity; // 泥浆粘度 4
|
float mud_viscosity; // 泥浆粘度 4
|
||||||
float mud_density; // 泥浆密度 4
|
float mud_density; // 泥浆密度 4
|
||||||
float mud_resistivity; // 泥浆电阻率 4
|
float mud_resistivity; // 泥浆电阻率 4
|
||||||
char reserved[64]; // 保留未用 64
|
char reserved[64]; // 保留未用 64
|
||||||
} WDM; //236
|
} WDM; //236
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char name[8]; /* 曲线名称 */
|
char name[8]; /* 曲线名称 */
|
||||||
char alias[8]; /* 曲线别名 */
|
char alias[8]; /* 曲线别名 */
|
||||||
char flag[16]; /* 曲线附加标志 */
|
char flag[16]; /* 曲线附加标志 */
|
||||||
float sdepth; /* 曲线的起始深度 */
|
float sdepth; /* 曲线的起始深度 */
|
||||||
float edepth; /* 曲线的结束深度 */
|
float edepth; /* 曲线的结束深度 */
|
||||||
float dstep; /* 曲线采样的深度间距 */
|
float dstep; /* 曲线采样的深度间距 */
|
||||||
char dunit[8]; /* 深度值量纲 */
|
char dunit[8]; /* 深度值量纲 */
|
||||||
char vunit[8]; /* 曲线值量纲 */
|
char vunit[8]; /* 曲线值量纲 */
|
||||||
char data_type[8]; /* 曲线值存储类型*/
|
char data_type[8]; /* 曲线值存储类型*/
|
||||||
int address; /* 曲线值的存储首地址 */
|
int address; /* 曲线值的存储首地址 */
|
||||||
} CurveIndex1d;
|
} CurveIndex1d;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char name[8]; /* 曲线名称 */
|
char name[8]; /* 曲线名称 */
|
||||||
char alias[8]; /* 曲线别名 */
|
char alias[8]; /* 曲线别名 */
|
||||||
char flag[16]; /* 曲线附加标志 */
|
char flag[16]; /* 曲线附加标志 */
|
||||||
float sdepth; /* 线的起始深度 */
|
float sdepth; /* 线的起始深度 */
|
||||||
float edepth; /* 曲线的结束深度 */
|
float edepth; /* 曲线的结束深度 */
|
||||||
float dstep; /* 曲线采样的深度间距 */
|
float dstep; /* 曲线采样的深度间距 */
|
||||||
char dunit[8]; /* 深度值量纲 */
|
char dunit[8]; /* 深度值量纲 */
|
||||||
float stime; /* 起始采样时间 */
|
float stime; /* 起始采样时间 */
|
||||||
float etime; /* 结束采样时间 */
|
float etime; /* 结束采样时间 */
|
||||||
float tstep; /* 采样时间间隔 */
|
float tstep; /* 采样时间间隔 */
|
||||||
char tunit[8]; /* 时间量纲 */
|
char tunit[8]; /* 时间量纲 */
|
||||||
char vunit[8]; /* 曲线值量纲 */
|
char vunit[8]; /* 曲线值量纲 */
|
||||||
char data_type[8]; /* 曲线值存储类型 */
|
char data_type[8]; /* 曲线值存储类型 */
|
||||||
int address; /* 曲线值的存储首地址 */
|
int address; /* 曲线值的存储首地址 */
|
||||||
} CurveIndex2d;
|
} CurveIndex2d;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char name[8]; /* 曲线名称 */
|
char name[8]; /* 曲线名称 */
|
||||||
char alias[8]; /* 曲线别名 */
|
char alias[8]; /* 曲线别名 */
|
||||||
char flag[16]; /* 曲线附加标志 */
|
char flag[16]; /* 曲线附加标志 */
|
||||||
float sdepth; /* 曲线的起始深度 */
|
float sdepth; /* 曲线的起始深度 */
|
||||||
float edepth; /* 曲线的结束深度 */
|
float edepth; /* 曲线的结束深度 */
|
||||||
float dstep; /* 曲线采样的深度间距 */
|
float dstep; /* 曲线采样的深度间距 */
|
||||||
char dunit[8]; /* 深度值量纲 */
|
char dunit[8]; /* 深度值量纲 */
|
||||||
float sangle; /* 起始采样角度 */
|
float sangle; /* 起始采样角度 */
|
||||||
float eangle; /* 结束采样角度 */
|
float eangle; /* 结束采样角度 */
|
||||||
float astep; /* 采样角度间隔 */
|
float astep; /* 采样角度间隔 */
|
||||||
char aunit; /* 角度量纲 */
|
char aunit; /* 角度量纲 */
|
||||||
float stime; /* 起始采样时间 */
|
float stime; /* 起始采样时间 */
|
||||||
float etime; /* 结束采样时间 */
|
float etime; /* 结束采样时间 */
|
||||||
float tstep; /* 采样时间间隔 */
|
float tstep; /* 采样时间间隔 */
|
||||||
char tunit[8]; /* 时间量纲 */
|
char tunit[8]; /* 时间量纲 */
|
||||||
char vunit[8]; /* 曲线值量纲 */
|
char vunit[8]; /* 曲线值量纲 */
|
||||||
char data_type[8]; /* 曲线值存储类型 */
|
char data_type[8]; /* 曲线值存储类型 */
|
||||||
int address; /* 曲线值的存储首地址 */
|
int address; /* 曲线值的存储首地址 */
|
||||||
}CurveIndex3d;
|
}CurveIndex3d;
|
||||||
extern short ReverseShort(short num);
|
extern short ReverseShort(short num);
|
||||||
extern long ReverseLong(long num);
|
extern long ReverseLong(long num);
|
||||||
|
|
@ -210,10 +210,10 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 取数据类型 : 将数据类型编码,转换为数据类型字符串
|
// 取数据类型 : 将数据类型编码,转换为数据类型字符串
|
||||||
const char * GetDataType(int iType)
|
const char * GetDataType(int iType)
|
||||||
{
|
{
|
||||||
// 编码从1开始
|
// 编码从1开始
|
||||||
const char *strDataType[]={"null","int","short","long","float","double"
|
const char *strDataType[]={"null","int","short","long","float","double"
|
||||||
,"string","char","UCHAR","WORD"
|
,"string","char","UCHAR","WORD"
|
||||||
,"UINT","ULONG"};
|
,"UINT","ULONG"};
|
||||||
|
|
@ -222,9 +222,9 @@ public:
|
||||||
else
|
else
|
||||||
return "unknown";
|
return "unknown";
|
||||||
};
|
};
|
||||||
// 取数据类型 : 将数据类型编码,转换为数据类型字符串
|
// 取数据类型 : 将数据类型编码,转换为数据类型字符串
|
||||||
//---- 注意:-------------------------------------------
|
//---- 注意:-------------------------------------------
|
||||||
// 该类型定义所有程序一定要统一,标准制定后既不能改变
|
// 该类型定义所有程序一定要统一,标准制定后既不能改变
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
int GetDataTypeCode(char *strType,int *nCodeLen)
|
int GetDataTypeCode(char *strType,int *nCodeLen)
|
||||||
{
|
{
|
||||||
|
|
@ -256,11 +256,11 @@ public:
|
||||||
FILE *fp=fopen(filename.toStdString().c_str(),"w+b");
|
FILE *fp=fopen(filename.toStdString().c_str(),"w+b");
|
||||||
if(!fp)
|
if(!fp)
|
||||||
{
|
{
|
||||||
QMessageBox::information(NULL,"提示","产生文件"+filename+"产生文件失败");
|
QMessageBox::information(NULL,"提示","产生文件"+filename+"产生文件失败");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//将动静态信息转换成wsm、wdm
|
//将动静态信息转换成wsm、wdm
|
||||||
//给静态信息赋值
|
//给静态信息赋值
|
||||||
strncpy(wsm.region,FILE_MESSAGE.AreaName,32);
|
strncpy(wsm.region,FILE_MESSAGE.AreaName,32);
|
||||||
strncpy(wsm.oil_company,FILE_MESSAGE.OilCompanyName,32);
|
strncpy(wsm.oil_company,FILE_MESSAGE.OilCompanyName,32);
|
||||||
strncpy(wsm.name,FILE_MESSAGE.WellName,32);
|
strncpy(wsm.name,FILE_MESSAGE.WellName,32);
|
||||||
|
|
@ -281,7 +281,7 @@ public:
|
||||||
sscanf(FILE_MESSAGE.Prog,"%f %f",&wsm.bit_program[i][0],&wsm.bit_program[i][1]);
|
sscanf(FILE_MESSAGE.Prog,"%f %f",&wsm.bit_program[i][0],&wsm.bit_program[i][1]);
|
||||||
// sscanf(FILE_MESSAGE.[i],"%f %f",&wsm.case_program[i][0],&wsm.case_program[i][1]);
|
// sscanf(FILE_MESSAGE.[i],"%f %f",&wsm.case_program[i][0],&wsm.case_program[i][1]);
|
||||||
}
|
}
|
||||||
//给动态信息赋值:WellDynamicInfo
|
//给动态信息赋值:WellDynamicInfo
|
||||||
strncpy(wdm.log_company,FILE_MESSAGE.LogCompanyName,40);
|
strncpy(wdm.log_company,FILE_MESSAGE.LogCompanyName,40);
|
||||||
QString str=ctime((time_t *)&FILE_MESSAGE.LoggingDate);
|
QString str=ctime((time_t *)&FILE_MESSAGE.LoggingDate);
|
||||||
|
|
||||||
|
|
@ -296,27 +296,27 @@ public:
|
||||||
wdm.mud_resistivity=FILE_MESSAGE.Mud_Resistivity[0] ;
|
wdm.mud_resistivity=FILE_MESSAGE.Mud_Resistivity[0] ;
|
||||||
wdm.bottom_temp=FILE_MESSAGE.Mud_Temp;
|
wdm.bottom_temp=FILE_MESSAGE.Mud_Temp;
|
||||||
//pctosun
|
//pctosun
|
||||||
// 井位的大地坐标
|
// 井位的大地坐标
|
||||||
wsm.x_coor = ReverseFloat(wsm.x_coor);
|
wsm.x_coor = ReverseFloat(wsm.x_coor);
|
||||||
wsm.y_coor = ReverseFloat(wsm.x_coor);
|
wsm.y_coor = ReverseFloat(wsm.x_coor);
|
||||||
// 井的补心高度
|
// 井的补心高度
|
||||||
wsm.height = ReverseFloat(wsm.height);
|
wsm.height = ReverseFloat(wsm.height);
|
||||||
for ( int i=0;i<5; i++)
|
for ( int i=0;i<5; i++)
|
||||||
{
|
{
|
||||||
// 钻头程序
|
// 钻头程序
|
||||||
wsm.bit_program[i][0] = ReverseFloat(wsm.bit_program[i][0]);
|
wsm.bit_program[i][0] = ReverseFloat(wsm.bit_program[i][0]);
|
||||||
wsm.bit_program[i][1] = ReverseFloat(wsm.bit_program[i][1]);
|
wsm.bit_program[i][1] = ReverseFloat(wsm.bit_program[i][1]);
|
||||||
// 套管程序
|
// 套管程序
|
||||||
wsm.case_program[i][0] = ReverseFloat(wsm.case_program[i][0]);
|
wsm.case_program[i][0] = ReverseFloat(wsm.case_program[i][0]);
|
||||||
wsm.case_program[i][1] = ReverseFloat(wsm.case_program[i][1]);
|
wsm.case_program[i][1] = ReverseFloat(wsm.case_program[i][1]);
|
||||||
}
|
}
|
||||||
wdm.log_times = ReverseInt(wdm.log_times); // 测井次数
|
wdm.log_times = ReverseInt(wdm.log_times); // 测井次数
|
||||||
wdm.stdep = ReverseFloat(wdm.stdep);
|
wdm.stdep = ReverseFloat(wdm.stdep);
|
||||||
wdm.endep =ReverseFloat(wdm.endep ); // 测量井段的起始深度和结束深度
|
wdm.endep =ReverseFloat(wdm.endep ); // 测量井段的起始深度和结束深度
|
||||||
wdm.bottom_temp = ReverseFloat(wdm.bottom_temp); // 井底温度
|
wdm.bottom_temp = ReverseFloat(wdm.bottom_temp); // 井底温度
|
||||||
wdm.mud_viscosity = ReverseFloat(wdm.mud_viscosity); // 泥浆粘度
|
wdm.mud_viscosity = ReverseFloat(wdm.mud_viscosity); // 泥浆粘度
|
||||||
wdm.mud_density = ReverseFloat(wdm.mud_density); // 泥浆密度
|
wdm.mud_density = ReverseFloat(wdm.mud_density); // 泥浆密度
|
||||||
wdm.mud_resistivity = ReverseFloat(wdm.mud_resistivity); // 泥浆电阻率
|
wdm.mud_resistivity = ReverseFloat(wdm.mud_resistivity); // 泥浆电阻率
|
||||||
|
|
||||||
/* write head */
|
/* write head */
|
||||||
int len=32+sizeof(WSM)+sizeof(WDM);
|
int len=32+sizeof(WSM)+sizeof(WDM);
|
||||||
|
|
@ -338,7 +338,7 @@ public:
|
||||||
FILE *fp=fopen(filename.toStdString().c_str(),"w+b");
|
FILE *fp=fopen(filename.toStdString().c_str(),"w+b");
|
||||||
if(!fp)
|
if(!fp)
|
||||||
{
|
{
|
||||||
QMessageBox::information(NULL,"提示","产生文件"+filename+"产生文件失败");
|
QMessageBox::information(NULL,"提示","产生文件"+filename+"产生文件失败");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* write head */
|
/* write head */
|
||||||
|
|
@ -367,7 +367,7 @@ public:
|
||||||
FILE *fp=fopen(filename.toStdString().c_str(),"w+b");
|
FILE *fp=fopen(filename.toStdString().c_str(),"w+b");
|
||||||
if(!fp)
|
if(!fp)
|
||||||
{
|
{
|
||||||
QMessageBox::information(NULL,"提示","产生文件"+filename+"产生文件失败");
|
QMessageBox::information(NULL,"提示","产生文件"+filename+"产生文件失败");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* write head */
|
/* write head */
|
||||||
|
|
|
||||||
|
|
@ -369,10 +369,10 @@ public :
|
||||||
|
|
||||||
int BlockNum; //8
|
int BlockNum; //8
|
||||||
|
|
||||||
int CurveFlag[512]; //曲线处理标志,
|
int CurveFlag[512]; //曲线处理标志,
|
||||||
|
|
||||||
|
|
||||||
//表1
|
//表1
|
||||||
byte HeadRecord[512];
|
byte HeadRecord[512];
|
||||||
CString FileExtation;
|
CString FileExtation;
|
||||||
CString FilePath;
|
CString FilePath;
|
||||||
|
|
@ -388,8 +388,8 @@ public :
|
||||||
float FileEndDepth;
|
float FileEndDepth;
|
||||||
float FileDepthLevel;
|
float FileDepthLevel;
|
||||||
|
|
||||||
//表2
|
//表2
|
||||||
byte BitmapHead; //头
|
byte BitmapHead; //头
|
||||||
byte BitmapRecords[4071];
|
byte BitmapRecords[4071];
|
||||||
byte BitmapValues[4];
|
byte BitmapValues[4];
|
||||||
byte BitmapFirst[4];
|
byte BitmapFirst[4];
|
||||||
|
|
@ -399,32 +399,32 @@ public :
|
||||||
byte BitmapNext[4];
|
byte BitmapNext[4];
|
||||||
|
|
||||||
|
|
||||||
//表3
|
//表3
|
||||||
CString CurveName[512]; //曲线名
|
CString CurveName[512]; //曲线名
|
||||||
|
|
||||||
//表4
|
//表4
|
||||||
int CurveStartPos[512] ;//曲线开始位置
|
int CurveStartPos[512] ;//曲线开始位置
|
||||||
int CurveSampleNum[512] ; //曲线总采样点数
|
int CurveSampleNum[512] ; //曲线总采样点数
|
||||||
int CurveEndPos[512]; //曲线开始位置
|
int CurveEndPos[512]; //曲线开始位置
|
||||||
|
|
||||||
//表5
|
//表5
|
||||||
short CurveDimNum[512]; //维数
|
short CurveDimNum[512]; //维数
|
||||||
short CurveE1Num[512]; //第1维数据个数
|
short CurveE1Num[512]; //第1维数据个数
|
||||||
short CurveE2Num[512]; //第2维数据个数
|
short CurveE2Num[512]; //第2维数据个数
|
||||||
short CurveE3Num[512]; //第3维数据个数
|
short CurveE3Num[512]; //第3维数据个数
|
||||||
|
|
||||||
//表6
|
//表6
|
||||||
float CurveStartDepth[512];
|
float CurveStartDepth[512];
|
||||||
float CurveEndDepth[512];
|
float CurveEndDepth[512];
|
||||||
|
|
||||||
//表7
|
//表7
|
||||||
float CurveDepthLevel[512];
|
float CurveDepthLevel[512];
|
||||||
byte CurveType[512];
|
byte CurveType[512];
|
||||||
byte CurveDataType[512] ;
|
byte CurveDataType[512] ;
|
||||||
byte CurveHorz[512];
|
byte CurveHorz[512];
|
||||||
byte CurveVert[512] ;
|
byte CurveVert[512] ;
|
||||||
|
|
||||||
//表8
|
//表8
|
||||||
CString WSI;
|
CString WSI;
|
||||||
CString WellName;
|
CString WellName;
|
||||||
CString OilFieldName;
|
CString OilFieldName;
|
||||||
|
|
@ -435,11 +435,11 @@ public :
|
||||||
float JingDu;
|
float JingDu;
|
||||||
float WeiDu;
|
float WeiDu;
|
||||||
float HaiBa;
|
float HaiBa;
|
||||||
short SystemForM; //公英
|
short SystemForM; //公英
|
||||||
float MagtCPJ; //磁偏角
|
float MagtCPJ; //磁偏角
|
||||||
|
|
||||||
|
|
||||||
//表9
|
//表9
|
||||||
CString CurveUnit[512];
|
CString CurveUnit[512];
|
||||||
|
|
||||||
CurveHeadInfo curveInfo[512];
|
CurveHeadInfo curveInfo[512];
|
||||||
|
|
@ -451,13 +451,13 @@ public :
|
||||||
|
|
||||||
XtfCvt XtfConvert;
|
XtfCvt XtfConvert;
|
||||||
|
|
||||||
MyXtfLib()//初始化所有变量
|
MyXtfLib()//初始化所有变量
|
||||||
{
|
{
|
||||||
int i=0;
|
int i=0;
|
||||||
|
|
||||||
byte ByteArray[4096] = {0};
|
byte ByteArray[4096] = {0};
|
||||||
|
|
||||||
//表1
|
//表1
|
||||||
memset(ByteArray,0, 4096);
|
memset(ByteArray,0, 4096);
|
||||||
// HeadRecord = XtfConvert.ToCString(ByteArray, 0, 32);
|
// HeadRecord = XtfConvert.ToCString(ByteArray, 0, 32);
|
||||||
FileExtation = XtfConvert.ToCString(ByteArray, 760, 4);
|
FileExtation = XtfConvert.ToCString(ByteArray, 760, 4);
|
||||||
|
|
@ -465,7 +465,7 @@ public :
|
||||||
FilePath = XtfConvert.ToCString(ByteArray, 764, 80);
|
FilePath = XtfConvert.ToCString(ByteArray, 764, 80);
|
||||||
SystemDepthUnit = XtfConvert.ToCString(ByteArray, 844, 8);
|
SystemDepthUnit = XtfConvert.ToCString(ByteArray, 844, 8);
|
||||||
AIFVersion = XtfConvert.ToCString(ByteArray, 852, 8);
|
AIFVersion = XtfConvert.ToCString(ByteArray, 852, 8);
|
||||||
SystemCode = XtfConvert.ToByte(ByteArray, 948); //5=工作站,1=PC机,
|
SystemCode = XtfConvert.ToByte(ByteArray, 948); //5=工作站,1=PC机,
|
||||||
|
|
||||||
XtfConvert.SystemCode = SystemCode;
|
XtfConvert.SystemCode = SystemCode;
|
||||||
|
|
||||||
|
|
@ -478,20 +478,20 @@ public :
|
||||||
FileDepthLevel = XtfConvert.ToFloat(ByteArray, 2056);
|
FileDepthLevel = XtfConvert.ToFloat(ByteArray, 2056);
|
||||||
|
|
||||||
|
|
||||||
//表2
|
//表2
|
||||||
memset(ByteArray,0, 4096);
|
memset(ByteArray,0, 4096);
|
||||||
BitmapHead = ByteArray[0];
|
BitmapHead = ByteArray[0];
|
||||||
memcpy(BitmapRecords,ByteArray+1,4071);
|
memcpy(BitmapRecords,ByteArray+1,4071);
|
||||||
memcpy(BitmapValues,ByteArray+4072,4);
|
memcpy(BitmapValues,ByteArray+4072,4);
|
||||||
|
|
||||||
//表3
|
//表3
|
||||||
memset(ByteArray,0, 4096);
|
memset(ByteArray,0, 4096);
|
||||||
for ( i = 0; i < 512; i++)
|
for ( i = 0; i < 512; i++)
|
||||||
{
|
{
|
||||||
CurveName[i] = XtfConvert.ToCString(ByteArray, i * 8, 8);
|
CurveName[i] = XtfConvert.ToCString(ByteArray, i * 8, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表4
|
//表4
|
||||||
memset(ByteArray,0, 4096);
|
memset(ByteArray,0, 4096);
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -504,7 +504,7 @@ public :
|
||||||
CurveSampleNum[i + 256] = XtfConvert.ToInt32(ByteArray, i * 8 + 4 + 2048);
|
CurveSampleNum[i + 256] = XtfConvert.ToInt32(ByteArray, i * 8 + 4 + 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表5
|
//表5
|
||||||
memset(ByteArray,0, 4096);
|
memset(ByteArray,0, 4096);
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -523,7 +523,7 @@ public :
|
||||||
CurveE3Num[i + 256] = XtfConvert.ToInt16(ByteArray, i * 8 + 6 + 2048);
|
CurveE3Num[i + 256] = XtfConvert.ToInt16(ByteArray, i * 8 + 6 + 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表6
|
//表6
|
||||||
memset(ByteArray,0, 4096);
|
memset(ByteArray,0, 4096);
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -537,7 +537,7 @@ public :
|
||||||
CurveEndDepth[i + 256] = XtfConvert.ToFloat(ByteArray, i * 8 + 4 + 2048);
|
CurveEndDepth[i + 256] = XtfConvert.ToFloat(ByteArray, i * 8 + 4 + 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表7
|
//表7
|
||||||
memset(ByteArray,0, 4096);
|
memset(ByteArray,0, 4096);
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -557,7 +557,7 @@ public :
|
||||||
CurveVert[i + 256] = XtfConvert.ToByte(ByteArray, i * 8 + 7 + 2048);
|
CurveVert[i + 256] = XtfConvert.ToByte(ByteArray, i * 8 + 7 + 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表8
|
//表8
|
||||||
memset(ByteArray,0, 4096);
|
memset(ByteArray,0, 4096);
|
||||||
WSI = XtfConvert.ToCString(ByteArray, 0, 8);
|
WSI = XtfConvert.ToCString(ByteArray, 0, 8);
|
||||||
WellName = XtfConvert.ToCString(ByteArray, 8, 80);
|
WellName = XtfConvert.ToCString(ByteArray, 8, 80);
|
||||||
|
|
@ -571,9 +571,9 @@ public :
|
||||||
HaiBa = XtfConvert.ToFloat(ByteArray, 1040);
|
HaiBa = XtfConvert.ToFloat(ByteArray, 1040);
|
||||||
SystemForM = XtfConvert.ToInt16(ByteArray, 2060);
|
SystemForM = XtfConvert.ToInt16(ByteArray, 2060);
|
||||||
|
|
||||||
//扫描表9
|
//扫描表9
|
||||||
|
|
||||||
// CreateDate = 0; //测井时间
|
// CreateDate = 0; //测井时间
|
||||||
// CreateTime = 0;
|
// CreateTime = 0;
|
||||||
//whp change 2012.11.6
|
//whp change 2012.11.6
|
||||||
CreateDate=GetCurrentTime();
|
CreateDate=GetCurrentTime();
|
||||||
|
|
@ -593,10 +593,10 @@ public :
|
||||||
HeadRecord[i*4-1] = (byte)i;
|
HeadRecord[i*4-1] = (byte)i;
|
||||||
|
|
||||||
WSI = "WSI";
|
WSI = "WSI";
|
||||||
SystemCode = 5; //??? //SUN
|
SystemCode = 5; //??? //SUN
|
||||||
Version1 = 0x06;//4;
|
Version1 = 0x06;//4;
|
||||||
Version2 = 0x00;//E;
|
Version2 = 0x00;//E;
|
||||||
SystemForM = 0; //公制
|
SystemForM = 0; //公制
|
||||||
SystemDepthUnit = "meters";
|
SystemDepthUnit = "meters";
|
||||||
AIFVersion = "";
|
AIFVersion = "";
|
||||||
FileExtation = ".xtf";
|
FileExtation = ".xtf";
|
||||||
|
|
@ -656,7 +656,7 @@ public :
|
||||||
openFlag = false;
|
openFlag = false;
|
||||||
}
|
}
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
///注释掉:是因为当再次打开别的文件时会提醒文件已经关闭的异常提示
|
///注释掉:是因为当再次打开别的文件时会提醒文件已经关闭的异常提示
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
{
|
{
|
||||||
dataFile=new QFile(dataFileName);
|
dataFile=new QFile(dataFileName);
|
||||||
|
|
@ -691,7 +691,7 @@ public :
|
||||||
|
|
||||||
dataFile->seek(0);
|
dataFile->seek(0);
|
||||||
|
|
||||||
//表1
|
//表1
|
||||||
dataFile->read((char*)&ByteArray[0], 4096);
|
dataFile->read((char*)&ByteArray[0], 4096);
|
||||||
// HeadRecord = XtfConvert.ToCString(ByteArray, 0, 32);
|
// HeadRecord = XtfConvert.ToCString(ByteArray, 0, 32);
|
||||||
FileExtation = XtfConvert.ToCString(ByteArray, 760, 4);
|
FileExtation = XtfConvert.ToCString(ByteArray, 760, 4);
|
||||||
|
|
@ -699,7 +699,7 @@ public :
|
||||||
FilePath = XtfConvert.ToCString(ByteArray, 764, 80);
|
FilePath = XtfConvert.ToCString(ByteArray, 764, 80);
|
||||||
SystemDepthUnit = XtfConvert.ToCString(ByteArray, 844, 8);
|
SystemDepthUnit = XtfConvert.ToCString(ByteArray, 844, 8);
|
||||||
AIFVersion = XtfConvert.ToCString(ByteArray, 852, 8);
|
AIFVersion = XtfConvert.ToCString(ByteArray, 852, 8);
|
||||||
SystemCode = XtfConvert.ToByte(ByteArray, 948); //5=工作站,1=PC机,
|
SystemCode = XtfConvert.ToByte(ByteArray, 948); //5=工作站,1=PC机,
|
||||||
|
|
||||||
XtfConvert.SystemCode = SystemCode;
|
XtfConvert.SystemCode = SystemCode;
|
||||||
|
|
||||||
|
|
@ -712,20 +712,20 @@ public :
|
||||||
FileDepthLevel = XtfConvert.ToFloat(ByteArray, 2056);
|
FileDepthLevel = XtfConvert.ToFloat(ByteArray, 2056);
|
||||||
|
|
||||||
|
|
||||||
//表2
|
//表2
|
||||||
dataFile->read((char*)&ByteArray[0], 4096);
|
dataFile->read((char*)&ByteArray[0], 4096);
|
||||||
BitmapHead = ByteArray[0];
|
BitmapHead = ByteArray[0];
|
||||||
memcpy(BitmapRecords,ByteArray+1,4071);
|
memcpy(BitmapRecords,ByteArray+1,4071);
|
||||||
memcpy(BitmapValues,ByteArray+4072,4);
|
memcpy(BitmapValues,ByteArray+4072,4);
|
||||||
|
|
||||||
//表3
|
//表3
|
||||||
dataFile->read((char*)&ByteArray[0], 4096);
|
dataFile->read((char*)&ByteArray[0], 4096);
|
||||||
for ( i = 0; i < 512; i++)
|
for ( i = 0; i < 512; i++)
|
||||||
{
|
{
|
||||||
CurveName[i] = XtfConvert.ToCString(ByteArray, i * 8, 8);
|
CurveName[i] = XtfConvert.ToCString(ByteArray, i * 8, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表4
|
//表4
|
||||||
dataFile->read((char*)&ByteArray[0], 4096);
|
dataFile->read((char*)&ByteArray[0], 4096);
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -738,7 +738,7 @@ public :
|
||||||
CurveSampleNum[i + 256] = XtfConvert.ToInt32(ByteArray, i * 8 + 4 + 2048);
|
CurveSampleNum[i + 256] = XtfConvert.ToInt32(ByteArray, i * 8 + 4 + 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表5
|
//表5
|
||||||
dataFile->read((char*)&ByteArray[0], 4096);
|
dataFile->read((char*)&ByteArray[0], 4096);
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -757,7 +757,7 @@ public :
|
||||||
CurveE3Num[i + 256] = XtfConvert.ToInt16(ByteArray, i * 8 + 6 + 2048);
|
CurveE3Num[i + 256] = XtfConvert.ToInt16(ByteArray, i * 8 + 6 + 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表6
|
//表6
|
||||||
dataFile->read((char*)&ByteArray[0], 4096);
|
dataFile->read((char*)&ByteArray[0], 4096);
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -771,7 +771,7 @@ public :
|
||||||
CurveEndDepth[i + 256] = XtfConvert.ToFloat(ByteArray, i * 8 + 4 + 2048);
|
CurveEndDepth[i + 256] = XtfConvert.ToFloat(ByteArray, i * 8 + 4 + 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表7
|
//表7
|
||||||
dataFile->read((char*)&ByteArray[0], 4096);
|
dataFile->read((char*)&ByteArray[0], 4096);
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -791,7 +791,7 @@ public :
|
||||||
CurveVert[i + 256] = XtfConvert.ToByte(ByteArray, i * 8 + 7 + 2048);
|
CurveVert[i + 256] = XtfConvert.ToByte(ByteArray, i * 8 + 7 + 2048);
|
||||||
}
|
}
|
||||||
|
|
||||||
//表8
|
//表8
|
||||||
dataFile->read((char*)&ByteArray[0], 4096);
|
dataFile->read((char*)&ByteArray[0], 4096);
|
||||||
WSI = XtfConvert.ToCString(ByteArray, 0, 8);
|
WSI = XtfConvert.ToCString(ByteArray, 0, 8);
|
||||||
WellName = XtfConvert.ToCString(ByteArray, 8, 80);
|
WellName = XtfConvert.ToCString(ByteArray, 8, 80);
|
||||||
|
|
@ -805,7 +805,7 @@ public :
|
||||||
HaiBa = XtfConvert.ToFloat(ByteArray, 1040);
|
HaiBa = XtfConvert.ToFloat(ByteArray, 1040);
|
||||||
SystemForM = XtfConvert.ToInt16(ByteArray, 2060);
|
SystemForM = XtfConvert.ToInt16(ByteArray, 2060);
|
||||||
|
|
||||||
//扫描表9
|
//扫描表9
|
||||||
for ( i = 0; i < CurveNum; i++)
|
for ( i = 0; i < CurveNum; i++)
|
||||||
{
|
{
|
||||||
long pos = (CurveStartPos[i] - 1) * 4096;
|
long pos = (CurveStartPos[i] - 1) * 4096;
|
||||||
|
|
@ -813,21 +813,21 @@ public :
|
||||||
dataFile->read((char*)&ByteArray[0], 4096);
|
dataFile->read((char*)&ByteArray[0], 4096);
|
||||||
|
|
||||||
|
|
||||||
CurveHeadGet(i,ByteArray); //分析各个曲线头
|
CurveHeadGet(i,ByteArray); //分析各个曲线头
|
||||||
|
|
||||||
CurveName[i] =curveInfo[i].CurveName;
|
CurveName[i] =curveInfo[i].CurveName;
|
||||||
CurveUnit[i] = curveInfo[i].CurveUnit;
|
CurveUnit[i] = curveInfo[i].CurveUnit;
|
||||||
CurveEndPos[i] = curveInfo[i].EndPosition;
|
CurveEndPos[i] = curveInfo[i].EndPosition;
|
||||||
|
|
||||||
}
|
}
|
||||||
CreateDate = curveInfo[0].CreateDate; //测井时间
|
CreateDate = curveInfo[0].CreateDate; //测井时间
|
||||||
CreateTime = curveInfo[0].CreateTime;
|
CreateTime = curveInfo[0].CreateTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (FileExtation != ".xtf" || MaxCurveNum != 512) // || UnixToPc.ToCString(head1.ExtendFileType) != ".XTF")
|
if (FileExtation != ".xtf" || MaxCurveNum != 512) // || UnixToPc.ToCString(head1.ExtendFileType) != ".XTF")
|
||||||
{
|
{
|
||||||
// MessageBox(" 不是EPLIPS5700 XTF格式的数据文件!");
|
// MessageBox(" 不是EPLIPS5700 XTF格式的数据文件!");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -847,14 +847,14 @@ public :
|
||||||
// Version1 = 0x06;
|
// Version1 = 0x06;
|
||||||
// Version2 = 0x00;
|
// Version2 = 0x00;
|
||||||
|
|
||||||
SystemCode = 5; //5,new,输出固定为工作站模式
|
SystemCode = 5; //5,new,输出固定为工作站模式
|
||||||
XtfConvert.SystemCode = SystemCode; //??????????????????????
|
XtfConvert.SystemCode = SystemCode; //??????????????????????
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
|
||||||
byte ByteArray[32768] = {0};
|
byte ByteArray[32768] = {0};
|
||||||
dataFile->seek(0);
|
dataFile->seek(0);
|
||||||
|
|
||||||
//表1
|
//表1
|
||||||
// HeadRecord="10002000300040005000600070008000";
|
// HeadRecord="10002000300040005000600070008000";
|
||||||
for ( i = 0; i < 32; i++) ByteArray[i] = HeadRecord[i];
|
for ( i = 0; i < 32; i++) ByteArray[i] = HeadRecord[i];
|
||||||
// XtfConvert.ToBytes(HeadRecord,ByteArray, 0,32);
|
// XtfConvert.ToBytes(HeadRecord,ByteArray, 0,32);
|
||||||
|
|
@ -865,7 +865,7 @@ public :
|
||||||
XtfConvert.ToBytes(FilePath, ByteArray, 764, 80);
|
XtfConvert.ToBytes(FilePath, ByteArray, 764, 80);
|
||||||
XtfConvert.ToBytes(SystemDepthUnit, ByteArray, 844, 8);
|
XtfConvert.ToBytes(SystemDepthUnit, ByteArray, 844, 8);
|
||||||
XtfConvert.ToBytes(AIFVersion, ByteArray, 852, 8);
|
XtfConvert.ToBytes(AIFVersion, ByteArray, 852, 8);
|
||||||
//whp add 2012.11.6 for SystemDepthUnit和AIFVersion不够8个字符的用空格填充
|
//whp add 2012.11.6 for SystemDepthUnit和AIFVersion不够8个字符的用空格填充
|
||||||
for ( i = 0; i < 16; i++)
|
for ( i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
if(ByteArray[844+i]==0)
|
if(ByteArray[844+i]==0)
|
||||||
|
|
@ -889,8 +889,8 @@ public :
|
||||||
|
|
||||||
dataFile->write((char*)&ByteArray[0], 4096);
|
dataFile->write((char*)&ByteArray[0], 4096);
|
||||||
|
|
||||||
//表2
|
//表2
|
||||||
memset(ByteArray,0,4096); //清0;
|
memset(ByteArray,0,4096); //清0;
|
||||||
|
|
||||||
int xx = BlockNum / 8;
|
int xx = BlockNum / 8;
|
||||||
int yy = BlockNum % 8;
|
int yy = BlockNum % 8;
|
||||||
|
|
@ -903,34 +903,34 @@ public :
|
||||||
}
|
}
|
||||||
|
|
||||||
xx = 0;
|
xx = 0;
|
||||||
XtfConvert.ToBytes(xx, ByteArray, 4072); //旗标值
|
XtfConvert.ToBytes(xx, ByteArray, 4072); //旗标值
|
||||||
|
|
||||||
xx = 1;
|
xx = 1;
|
||||||
XtfConvert.ToBytes(xx, ByteArray, 4076); //第一个
|
XtfConvert.ToBytes(xx, ByteArray, 4076); //第一个
|
||||||
|
|
||||||
xx = 32576;
|
xx = 32576;
|
||||||
XtfConvert.ToBytes(xx, ByteArray, 4080); //第二个
|
XtfConvert.ToBytes(xx, ByteArray, 4080); //第二个
|
||||||
|
|
||||||
xx = 0;
|
xx = 0;
|
||||||
XtfConvert.ToBytes(xx, ByteArray, 4084); //前一个
|
XtfConvert.ToBytes(xx, ByteArray, 4084); //前一个
|
||||||
|
|
||||||
xx = 2;
|
xx = 2;
|
||||||
XtfConvert.ToBytes(xx, ByteArray, 4088); //当前记录数
|
XtfConvert.ToBytes(xx, ByteArray, 4088); //当前记录数
|
||||||
|
|
||||||
xx = 0;
|
xx = 0;
|
||||||
XtfConvert.ToBytes(xx, ByteArray, 4092); //下一个
|
XtfConvert.ToBytes(xx, ByteArray, 4092); //下一个
|
||||||
|
|
||||||
dataFile->write((char*)&ByteArray[0], 4096);
|
dataFile->write((char*)&ByteArray[0], 4096);
|
||||||
|
|
||||||
|
|
||||||
//表3
|
//表3
|
||||||
memset(ByteArray,0,4096); //清0;
|
memset(ByteArray,0,4096); //清0;
|
||||||
for ( i = 0; i < 512; i++)
|
for ( i = 0; i < 512; i++)
|
||||||
{
|
{
|
||||||
// CurveName[i] = HzClass.Convert(CurveName[i]); //去除汉字
|
// CurveName[i] = HzClass.Convert(CurveName[i]); //去除汉字
|
||||||
XtfConvert.ToBytes(CurveName[i],ByteArray,i * 8, 8);
|
XtfConvert.ToBytes(CurveName[i],ByteArray,i * 8, 8);
|
||||||
}
|
}
|
||||||
//whp add 2012.11.6 for 曲线名用不够8个字符的用空格填充
|
//whp add 2012.11.6 for 曲线名用不够8个字符的用空格填充
|
||||||
for ( i = 0; i < 4096; i++)
|
for ( i = 0; i < 4096; i++)
|
||||||
{
|
{
|
||||||
if(ByteArray[i]==0)
|
if(ByteArray[i]==0)
|
||||||
|
|
@ -940,8 +940,8 @@ public :
|
||||||
}
|
}
|
||||||
dataFile->write((char*)&ByteArray[0], 4096);
|
dataFile->write((char*)&ByteArray[0], 4096);
|
||||||
|
|
||||||
//表4
|
//表4
|
||||||
memset(ByteArray, 0,4096); //清0;
|
memset(ByteArray, 0,4096); //清0;
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
XtfConvert.ToBytes(CurveStartPos[i], ByteArray, i * 8);
|
XtfConvert.ToBytes(CurveStartPos[i], ByteArray, i * 8);
|
||||||
|
|
@ -954,8 +954,8 @@ public :
|
||||||
}
|
}
|
||||||
dataFile->write((char*)&ByteArray[0], 4096);
|
dataFile->write((char*)&ByteArray[0], 4096);
|
||||||
|
|
||||||
//表5
|
//表5
|
||||||
memset(ByteArray,0, 4096); //清0;
|
memset(ByteArray,0, 4096); //清0;
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
XtfConvert.ToBytes(CurveDimNum[i], ByteArray, i * 8);
|
XtfConvert.ToBytes(CurveDimNum[i], ByteArray, i * 8);
|
||||||
|
|
@ -974,8 +974,8 @@ public :
|
||||||
}
|
}
|
||||||
dataFile->write((char*)&ByteArray[0], 4096);
|
dataFile->write((char*)&ByteArray[0], 4096);
|
||||||
|
|
||||||
//表6
|
//表6
|
||||||
memset(ByteArray,0,4096); //清0;
|
memset(ByteArray,0,4096); //清0;
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
XtfConvert.ToBytes(CurveStartDepth[i], ByteArray, i * 8);
|
XtfConvert.ToBytes(CurveStartDepth[i], ByteArray, i * 8);
|
||||||
|
|
@ -988,8 +988,8 @@ public :
|
||||||
}
|
}
|
||||||
dataFile->write((char*)&ByteArray[0], 4096);
|
dataFile->write((char*)&ByteArray[0], 4096);
|
||||||
|
|
||||||
//表7
|
//表7
|
||||||
memset(ByteArray,0,4096); //清0;
|
memset(ByteArray,0,4096); //清0;
|
||||||
for ( i = 0; i < 256; i++)
|
for ( i = 0; i < 256; i++)
|
||||||
{
|
{
|
||||||
XtfConvert.ToBytes(CurveDepthLevel[i], ByteArray, i * 8);
|
XtfConvert.ToBytes(CurveDepthLevel[i], ByteArray, i * 8);
|
||||||
|
|
@ -1009,8 +1009,8 @@ public :
|
||||||
}
|
}
|
||||||
dataFile->write((char*)&ByteArray[0], 4096);
|
dataFile->write((char*)&ByteArray[0], 4096);
|
||||||
|
|
||||||
//表8
|
//表8
|
||||||
memset(ByteArray,0,4096); //清0;
|
memset(ByteArray,0,4096); //清0;
|
||||||
for ( i = 0; i < 1024; i++) ByteArray[i] = 0x20;
|
for ( i = 0; i < 1024; i++) ByteArray[i] = 0x20;
|
||||||
|
|
||||||
WellName = XtfConvert.GetLetter(WellName);
|
WellName = XtfConvert.GetLetter(WellName);
|
||||||
|
|
@ -1019,17 +1019,17 @@ public :
|
||||||
CountryName = XtfConvert.GetLetter(CountryName);
|
CountryName = XtfConvert.GetLetter(CountryName);
|
||||||
WellLocate = XtfConvert.GetLetter(WellLocate);
|
WellLocate = XtfConvert.GetLetter(WellLocate);
|
||||||
|
|
||||||
XtfConvert.ToBytes(WSI, ByteArray, 0 ,8); //有效图头
|
XtfConvert.ToBytes(WSI, ByteArray, 0 ,8); //有效图头
|
||||||
XtfConvert.ToBytes(WellName, ByteArray, 8, 80); //井名
|
XtfConvert.ToBytes(WellName, ByteArray, 8, 80); //井名
|
||||||
XtfConvert.ToBytes(OilFieldName, ByteArray, 88, 80); // 油田名
|
XtfConvert.ToBytes(OilFieldName, ByteArray, 88, 80); // 油田名
|
||||||
XtfConvert.ToBytes(CompanyName, ByteArray, 168, 80); //公司名
|
XtfConvert.ToBytes(CompanyName, ByteArray, 168, 80); //公司名
|
||||||
XtfConvert.ToBytes(CountryName, ByteArray, 248, 32); //国家名
|
XtfConvert.ToBytes(CountryName, ByteArray, 248, 32); //国家名
|
||||||
XtfConvert.ToBytes(WellLocate, ByteArray, 336, 40); //井位
|
XtfConvert.ToBytes(WellLocate, ByteArray, 336, 40); //井位
|
||||||
|
|
||||||
XtfConvert.ToBytes(JingDu, ByteArray, 336); //经度
|
XtfConvert.ToBytes(JingDu, ByteArray, 336); //经度
|
||||||
XtfConvert.ToBytes(WeiDu, ByteArray, 1028); //维度
|
XtfConvert.ToBytes(WeiDu, ByteArray, 1028); //维度
|
||||||
XtfConvert.ToBytes(HaiBa, ByteArray, 1040); //海拔
|
XtfConvert.ToBytes(HaiBa, ByteArray, 1040); //海拔
|
||||||
XtfConvert.ToBytes(SystemForM, ByteArray,2060); //系统制
|
XtfConvert.ToBytes(SystemForM, ByteArray,2060); //系统制
|
||||||
dataFile->write((char*)&ByteArray[0], 4096);
|
dataFile->write((char*)&ByteArray[0], 4096);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1050,110 +1050,110 @@ public :
|
||||||
|
|
||||||
int CurveHeadGet(int CurveNo, byte ByteArray[])
|
int CurveHeadGet(int CurveNo, byte ByteArray[])
|
||||||
{
|
{
|
||||||
curveInfo[CurveNo].CurveName = XtfConvert.ToCString(ByteArray, 0, 8); //曲线名称
|
curveInfo[CurveNo].CurveName = XtfConvert.ToCString(ByteArray, 0, 8); //曲线名称
|
||||||
|
|
||||||
curveInfo[CurveNo].CurveUnit = XtfConvert.ToCString(ByteArray, 8, 8); //曲线单位
|
curveInfo[CurveNo].CurveUnit = XtfConvert.ToCString(ByteArray, 8, 8); //曲线单位
|
||||||
|
|
||||||
curveInfo[CurveNo].CurveRemark = XtfConvert.ToCString(ByteArray, 16, 8); //曲线备注
|
curveInfo[CurveNo].CurveRemark = XtfConvert.ToCString(ByteArray, 16, 8); //曲线备注
|
||||||
|
|
||||||
curveInfo[CurveNo].ServiceCompany = XtfConvert.ToCString(ByteArray, 48, 8); //服务公司
|
curveInfo[CurveNo].ServiceCompany = XtfConvert.ToCString(ByteArray, 48, 8); //服务公司
|
||||||
|
|
||||||
curveInfo[CurveNo].ToolType = XtfConvert.ToCString(ByteArray, 48, 8); //仪器类型
|
curveInfo[CurveNo].ToolType = XtfConvert.ToCString(ByteArray, 48, 8); //仪器类型
|
||||||
|
|
||||||
curveInfo[CurveNo].CurveClass = XtfConvert.ToCString(ByteArray, 56, 8); //曲线类型
|
curveInfo[CurveNo].CurveClass = XtfConvert.ToCString(ByteArray, 56, 8); //曲线类型
|
||||||
|
|
||||||
curveInfo[CurveNo].DepthUnit = XtfConvert.ToCString(ByteArray, 64, 8); //深度单位
|
curveInfo[CurveNo].DepthUnit = XtfConvert.ToCString(ByteArray, 64, 8); //深度单位
|
||||||
|
|
||||||
curveInfo[CurveNo].WaveTimeUnit = XtfConvert.ToCString(ByteArray, 72, 8); //波列时间增量单位
|
curveInfo[CurveNo].WaveTimeUnit = XtfConvert.ToCString(ByteArray, 72, 8); //波列时间增量单位
|
||||||
|
|
||||||
//???
|
//???
|
||||||
//???
|
//???
|
||||||
curveInfo[CurveNo].LogDirection = XtfConvert.ToCString(ByteArray, 120, 8); //测井方向
|
curveInfo[CurveNo].LogDirection = XtfConvert.ToCString(ByteArray, 120, 8); //测井方向
|
||||||
|
|
||||||
curveInfo[CurveNo].AIFName = XtfConvert.ToCString(ByteArray, 128, 8); //AIF名
|
curveInfo[CurveNo].AIFName = XtfConvert.ToCString(ByteArray, 128, 8); //AIF名
|
||||||
curveInfo[CurveNo].OCTName = XtfConvert.ToCString(ByteArray, 152, 8); //OCT名
|
curveInfo[CurveNo].OCTName = XtfConvert.ToCString(ByteArray, 152, 8); //OCT名
|
||||||
curveInfo[CurveNo].ToolName = XtfConvert.ToCString(ByteArray, 152, 8); //仪器名
|
curveInfo[CurveNo].ToolName = XtfConvert.ToCString(ByteArray, 152, 8); //仪器名
|
||||||
|
|
||||||
curveInfo[CurveNo].LisName = XtfConvert.ToCString(ByteArray, 224, 8); //LIS名
|
curveInfo[CurveNo].LisName = XtfConvert.ToCString(ByteArray, 224, 8); //LIS名
|
||||||
|
|
||||||
curveInfo[CurveNo].StartDepth = XtfConvert.ToFloat(ByteArray, 1024); //开始深度
|
curveInfo[CurveNo].StartDepth = XtfConvert.ToFloat(ByteArray, 1024); //开始深度
|
||||||
curveInfo[CurveNo].EndDepth = XtfConvert.ToFloat(ByteArray, 1028); //结束深度
|
curveInfo[CurveNo].EndDepth = XtfConvert.ToFloat(ByteArray, 1028); //结束深度
|
||||||
curveInfo[CurveNo].DepthLevel = XtfConvert.ToFloat(ByteArray, 1032); //深度采样间隔
|
curveInfo[CurveNo].DepthLevel = XtfConvert.ToFloat(ByteArray, 1032); //深度采样间隔
|
||||||
curveInfo[CurveNo].MinValue = XtfConvert.ToFloat(ByteArray, 1036); //曲线最小值
|
curveInfo[CurveNo].MinValue = XtfConvert.ToFloat(ByteArray, 1036); //曲线最小值
|
||||||
curveInfo[CurveNo].MaxValue = XtfConvert.ToFloat(ByteArray, 1040); //曲线最大值
|
curveInfo[CurveNo].MaxValue = XtfConvert.ToFloat(ByteArray, 1040); //曲线最大值
|
||||||
curveInfo[CurveNo].AvgValue = XtfConvert.ToFloat(ByteArray, 1044); //曲线平均值
|
curveInfo[CurveNo].AvgValue = XtfConvert.ToFloat(ByteArray, 1044); //曲线平均值
|
||||||
|
|
||||||
curveInfo[CurveNo].TimeValuesLevel = XtfConvert.ToFloat(ByteArray, 1048); //基于时间曲线的时间增量
|
curveInfo[CurveNo].TimeValuesLevel = XtfConvert.ToFloat(ByteArray, 1048); //基于时间曲线的时间增量
|
||||||
|
|
||||||
curveInfo[CurveNo].DACTimeOffset = XtfConvert.ToFloat(ByteArray, 1052); //DAC起始时间
|
curveInfo[CurveNo].DACTimeOffset = XtfConvert.ToFloat(ByteArray, 1052); //DAC起始时间
|
||||||
|
|
||||||
curveInfo[CurveNo].StaticMeasureDepth = XtfConvert.ToFloat(ByteArray, 1056); //静态测量深度
|
curveInfo[CurveNo].StaticMeasureDepth = XtfConvert.ToFloat(ByteArray, 1056); //静态测量深度
|
||||||
|
|
||||||
curveInfo[CurveNo].Step = XtfConvert.ToFloat(ByteArray, 1068); //静态测量深度
|
curveInfo[CurveNo].Step = XtfConvert.ToFloat(ByteArray, 1068); //静态测量深度
|
||||||
curveInfo[CurveNo].Window = XtfConvert.ToFloat(ByteArray, 1072); //静态测量深度
|
curveInfo[CurveNo].Window = XtfConvert.ToFloat(ByteArray, 1072); //静态测量深度
|
||||||
curveInfo[CurveNo].CBILAngle = XtfConvert.ToFloat(ByteArray, 1076); //静态测量深度
|
curveInfo[CurveNo].CBILAngle = XtfConvert.ToFloat(ByteArray, 1076); //静态测量深度
|
||||||
curveInfo[CurveNo].TR_Distance = XtfConvert.ToFloat(ByteArray, 1080); //静态测量深度
|
curveInfo[CurveNo].TR_Distance = XtfConvert.ToFloat(ByteArray, 1080); //静态测量深度
|
||||||
curveInfo[CurveNo].RR_Distance = XtfConvert.ToFloat(ByteArray, 1084); //静态测量深度
|
curveInfo[CurveNo].RR_Distance = XtfConvert.ToFloat(ByteArray, 1084); //静态测量深度
|
||||||
curveInfo[CurveNo].OrinToSurface = XtfConvert.ToFloat(ByteArray, 1088); //静态测量深度
|
curveInfo[CurveNo].OrinToSurface = XtfConvert.ToFloat(ByteArray, 1088); //静态测量深度
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
curveInfo[CurveNo].DoubleStartDepth = XtfConvert.ToDouble(ByteArray, 1544); //设备类型
|
curveInfo[CurveNo].DoubleStartDepth = XtfConvert.ToDouble(ByteArray, 1544); //设备类型
|
||||||
curveInfo[CurveNo].DoubleEndDepth = XtfConvert.ToDouble(ByteArray, 1552); //设备类型
|
curveInfo[CurveNo].DoubleEndDepth = XtfConvert.ToDouble(ByteArray, 1552); //设备类型
|
||||||
curveInfo[CurveNo].DoubleDepthLevel = XtfConvert.ToDouble(ByteArray, 1560); //设备类型
|
curveInfo[CurveNo].DoubleDepthLevel = XtfConvert.ToDouble(ByteArray, 1560); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].CreateDate = XtfConvert.ToInt32(ByteArray, 2048); //设备类型
|
curveInfo[CurveNo].CreateDate = XtfConvert.ToInt32(ByteArray, 2048); //设备类型
|
||||||
curveInfo[CurveNo].CreateTime = XtfConvert.ToInt32(ByteArray, 2052); //设备类型
|
curveInfo[CurveNo].CreateTime = XtfConvert.ToInt32(ByteArray, 2052); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].AccessDate = XtfConvert.ToInt32(ByteArray, 2056); //设备类型
|
curveInfo[CurveNo].AccessDate = XtfConvert.ToInt32(ByteArray, 2056); //设备类型
|
||||||
curveInfo[CurveNo].AccessTime = XtfConvert.ToInt32(ByteArray, 2060); //设备类型
|
curveInfo[CurveNo].AccessTime = XtfConvert.ToInt32(ByteArray, 2060); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].AccessTime = XtfConvert.ToInt32(ByteArray, 2060); //设备类型
|
curveInfo[CurveNo].AccessTime = XtfConvert.ToInt32(ByteArray, 2060); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].CurveHeadRecordNum = XtfConvert.ToInt32(ByteArray, 2064); //设备类型
|
curveInfo[CurveNo].CurveHeadRecordNum = XtfConvert.ToInt32(ByteArray, 2064); //设备类型
|
||||||
curveInfo[CurveNo].EndPosition = XtfConvert.ToInt32(ByteArray, 2068); //设备类型
|
curveInfo[CurveNo].EndPosition = XtfConvert.ToInt32(ByteArray, 2068); //设备类型
|
||||||
curveInfo[CurveNo].SamplesNum = XtfConvert.ToInt32(ByteArray, 2076); //设备类型
|
curveInfo[CurveNo].SamplesNum = XtfConvert.ToInt32(ByteArray, 2076); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].CurveIndex = XtfConvert.ToInt16(ByteArray, 2564); //设备类型
|
curveInfo[CurveNo].CurveIndex = XtfConvert.ToInt16(ByteArray, 2564); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].CurveType = XtfConvert.ToInt16(ByteArray, 2566); //设备类型
|
curveInfo[CurveNo].CurveType = XtfConvert.ToInt16(ByteArray, 2566); //设备类型
|
||||||
curveInfo[CurveNo].CurveDataType = XtfConvert.ToInt16(ByteArray, 2568); //设备类型
|
curveInfo[CurveNo].CurveDataType = XtfConvert.ToInt16(ByteArray, 2568); //设备类型
|
||||||
curveInfo[CurveNo].CurveVert = XtfConvert.ToInt16(ByteArray, 2570); //设备类型
|
curveInfo[CurveNo].CurveVert = XtfConvert.ToInt16(ByteArray, 2570); //设备类型
|
||||||
curveInfo[CurveNo].CurveHorz = XtfConvert.ToInt16(ByteArray, 2572); //设备类型
|
curveInfo[CurveNo].CurveHorz = XtfConvert.ToInt16(ByteArray, 2572); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].CurveDimNum = XtfConvert.ToInt16(ByteArray, 2574); //设备类型
|
curveInfo[CurveNo].CurveDimNum = XtfConvert.ToInt16(ByteArray, 2574); //设备类型
|
||||||
curveInfo[CurveNo].CurveE1Num = XtfConvert.ToInt16(ByteArray, 2576); //设备类型
|
curveInfo[CurveNo].CurveE1Num = XtfConvert.ToInt16(ByteArray, 2576); //设备类型
|
||||||
curveInfo[CurveNo].CurveE2Num = XtfConvert.ToInt16(ByteArray, 2578); //设备类型
|
curveInfo[CurveNo].CurveE2Num = XtfConvert.ToInt16(ByteArray, 2578); //设备类型
|
||||||
curveInfo[CurveNo].CurveE3Num = XtfConvert.ToInt16(ByteArray, 2580); //设备类型
|
curveInfo[CurveNo].CurveE3Num = XtfConvert.ToInt16(ByteArray, 2580); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].DataTypeFlag = XtfConvert.ToInt16(ByteArray, 2592); //设备类型
|
curveInfo[CurveNo].DataTypeFlag = XtfConvert.ToInt16(ByteArray, 2592); //设备类型
|
||||||
curveInfo[CurveNo].HaveNegFlag = XtfConvert.ToInt16(ByteArray, 2594); //设备类型
|
curveInfo[CurveNo].HaveNegFlag = XtfConvert.ToInt16(ByteArray, 2594); //设备类型
|
||||||
curveInfo[CurveNo].DataBitsNum = XtfConvert.ToInt16(ByteArray, 2596); //设备类型
|
curveInfo[CurveNo].DataBitsNum = XtfConvert.ToInt16(ByteArray, 2596); //设备类型
|
||||||
curveInfo[CurveNo].FixedWaveStartFlag = XtfConvert.ToInt16(ByteArray, 2606); //设备类型
|
curveInfo[CurveNo].FixedWaveStartFlag = XtfConvert.ToInt16(ByteArray, 2606); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].FixedWaveGain = XtfConvert.ToInt16(ByteArray, 2608); //设备类型
|
curveInfo[CurveNo].FixedWaveGain = XtfConvert.ToInt16(ByteArray, 2608); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].WaveGainExp = XtfConvert.ToInt16(ByteArray, 2610); //设备类型
|
curveInfo[CurveNo].WaveGainExp = XtfConvert.ToInt16(ByteArray, 2610); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].GainMethod = XtfConvert.ToInt16(ByteArray, 2612); //设备类型
|
curveInfo[CurveNo].GainMethod = XtfConvert.ToInt16(ByteArray, 2612); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].GainApplyFlag = XtfConvert.ToInt16(ByteArray, 2614); //设备类型
|
curveInfo[CurveNo].GainApplyFlag = XtfConvert.ToInt16(ByteArray, 2614); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].WaveLength = XtfConvert.ToInt16(ByteArray, 2616); //设备类型
|
curveInfo[CurveNo].WaveLength = XtfConvert.ToInt16(ByteArray, 2616); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].ToolNo = XtfConvert.ToInt16(ByteArray, 2618); //设备类型
|
curveInfo[CurveNo].ToolNo = XtfConvert.ToInt16(ByteArray, 2618); //设备类型
|
||||||
|
|
||||||
|
|
||||||
curveInfo[CurveNo].CurveSerialNo = XtfConvert.ToInt16(ByteArray, 2620); //设备类型
|
curveInfo[CurveNo].CurveSerialNo = XtfConvert.ToInt16(ByteArray, 2620); //设备类型
|
||||||
|
|
||||||
for (int i = 0; i < 24; i++)
|
for (int i = 0; i < 24; i++)
|
||||||
{
|
{
|
||||||
curveInfo[CurveNo].TranFillArea[i] = XtfConvert.ToByte(ByteArray, 3072+i); //设备类型
|
curveInfo[CurveNo].TranFillArea[i] = XtfConvert.ToByte(ByteArray, 3072+i); //设备类型
|
||||||
|
|
||||||
curveInfo[CurveNo].RecvFillArea[i] = XtfConvert.ToByte(ByteArray, 3096+i); //设备类型
|
curveInfo[CurveNo].RecvFillArea[i] = XtfConvert.ToByte(ByteArray, 3096+i); //设备类型
|
||||||
}
|
}
|
||||||
|
|
||||||
curveInfo[CurveNo].SystemCode = XtfConvert.ToByte(ByteArray, 4095); //设备类型
|
curveInfo[CurveNo].SystemCode = XtfConvert.ToByte(ByteArray, 4095); //设备类型
|
||||||
|
|
||||||
/* if (curveInfo[CurveNo].CurveName.Contains("TX"))
|
/* if (curveInfo[CurveNo].CurveName.Contains("TX"))
|
||||||
{
|
{
|
||||||
|
|
@ -1184,18 +1184,18 @@ public :
|
||||||
short temp_short = 0;
|
short temp_short = 0;
|
||||||
double temp_double = 0;
|
double temp_double = 0;
|
||||||
for (int i = 0; i < 1024; i++) ByteArray[i] = 0x20;
|
for (int i = 0; i < 1024; i++) ByteArray[i] = 0x20;
|
||||||
XtfConvert.ToBytes(CurveName[CurveNo], ByteArray, 0,8); //曲线名称
|
XtfConvert.ToBytes(CurveName[CurveNo], ByteArray, 0,8); //曲线名称
|
||||||
|
|
||||||
curveInfo[CurveNo].CurveName = CurveName[CurveNo];
|
curveInfo[CurveNo].CurveName = CurveName[CurveNo];
|
||||||
curveInfo[CurveNo].CurveUnit = CurveUnit[CurveNo];
|
curveInfo[CurveNo].CurveUnit = CurveUnit[CurveNo];
|
||||||
|
|
||||||
//单位变换
|
//单位变换
|
||||||
/* if (CurveUnit[CurveNo] == "") CurveUnit[CurveNo] = "raw";
|
/* if (CurveUnit[CurveNo] == "") CurveUnit[CurveNo] = "raw";
|
||||||
if (CurveUnit[CurveNo].Contains("Ω")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("Ω", "ohm");
|
if (CurveUnit[CurveNo].Contains("Ω")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("Ω", "ohm");
|
||||||
if (CurveUnit[CurveNo].Contains("℃")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("℃", "degC");
|
if (CurveUnit[CurveNo].Contains("℃")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("℃", "degC");
|
||||||
if (CurveUnit[CurveNo].Contains("^")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("^", "");
|
if (CurveUnit[CurveNo].Contains("^")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("^", "");
|
||||||
if (CurveUnit[CurveNo].Contains("度")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("度", "deg");
|
if (CurveUnit[CurveNo].Contains("度")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("度", "deg");
|
||||||
if (CurveUnit[CurveNo].Contains("°")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("°", "deg");
|
if (CurveUnit[CurveNo].Contains("°")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("°", "deg");
|
||||||
if (CurveUnit[CurveNo].Contains("%")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("%", "pu");
|
if (CurveUnit[CurveNo].Contains("%")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("%", "pu");
|
||||||
if (CurveUnit[CurveNo].Contains("mS/m")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("mS/m", "mmho/m");
|
if (CurveUnit[CurveNo].Contains("mS/m")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("mS/m", "mmho/m");
|
||||||
if (CurveUnit[CurveNo].Contains("g/cm^3")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("g/cm^3", "g/cm3");
|
if (CurveUnit[CurveNo].Contains("g/cm^3")) CurveUnit[CurveNo] = CurveUnit[CurveNo].Replace("g/cm^3", "g/cm3");
|
||||||
|
|
@ -1223,8 +1223,8 @@ public :
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
curveInfo[CurveNo].TranFillArea[i] = (byte)0x01;//发射器填充区
|
curveInfo[CurveNo].TranFillArea[i] = (byte)0x01;//发射器填充区
|
||||||
curveInfo[CurveNo].RecvFillArea[i] = (byte)(0x01 + i);//接收器填充区
|
curveInfo[CurveNo].RecvFillArea[i] = (byte)(0x01 + i);//接收器填充区
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1242,8 +1242,8 @@ public :
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
curveInfo[CurveNo].TranFillArea[i] = (byte)0x02;//发射器填充区
|
curveInfo[CurveNo].TranFillArea[i] = (byte)0x02;//发射器填充区
|
||||||
curveInfo[CurveNo].RecvFillArea[i] = (byte)(0x01 + i);//接收器填充区
|
curveInfo[CurveNo].RecvFillArea[i] = (byte)(0x01 + i);//接收器填充区
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1261,8 +1261,8 @@ public :
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
curveInfo[CurveNo].TranFillArea[i] = (byte)0x03;//发射器填充区
|
curveInfo[CurveNo].TranFillArea[i] = (byte)0x03;//发射器填充区
|
||||||
curveInfo[CurveNo].RecvFillArea[i] = (byte)(0x01 + i);//接收器填充区
|
curveInfo[CurveNo].RecvFillArea[i] = (byte)(0x01 + i);//接收器填充区
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1280,8 +1280,8 @@ public :
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
curveInfo[CurveNo].TranFillArea[i] = (byte)0x04;//发射器填充区
|
curveInfo[CurveNo].TranFillArea[i] = (byte)0x04;//发射器填充区
|
||||||
curveInfo[CurveNo].RecvFillArea[i] = (byte)(0x01 + i);//接收器填充区
|
curveInfo[CurveNo].RecvFillArea[i] = (byte)(0x01 + i);//接收器填充区
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1292,38 +1292,38 @@ public :
|
||||||
|
|
||||||
|
|
||||||
temp_str = "j727e03.aff";// CurveName[CurveNo];
|
temp_str = "j727e03.aff";// CurveName[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_str, ByteArray, 16, 24); //曲线备注
|
XtfConvert.ToBytes(temp_str, ByteArray, 16, 24); //曲线备注
|
||||||
|
|
||||||
temp_str = "ATLAS";
|
temp_str = "ATLAS";
|
||||||
XtfConvert.ToBytes(temp_str, ByteArray, 40, 8); //设备类型
|
XtfConvert.ToBytes(temp_str, ByteArray, 40, 8); //设备类型
|
||||||
|
|
||||||
|
|
||||||
temp_str = " ";
|
temp_str = " ";
|
||||||
XtfConvert.ToBytes(temp_str, ByteArray, 48,8); //仪器类型
|
XtfConvert.ToBytes(temp_str, ByteArray, 48,8); //仪器类型
|
||||||
|
|
||||||
temp_str = "AFF";
|
temp_str = "AFF";
|
||||||
XtfConvert.ToBytes(temp_str, ByteArray, 56,8); //曲线类型
|
XtfConvert.ToBytes(temp_str, ByteArray, 56,8); //曲线类型
|
||||||
|
|
||||||
temp_str = SystemDepthUnit;
|
temp_str = SystemDepthUnit;
|
||||||
XtfConvert.ToBytes(temp_str, ByteArray, 64, 8);
|
XtfConvert.ToBytes(temp_str, ByteArray, 64, 8);
|
||||||
|
|
||||||
temp_str = "up";
|
temp_str = "up";
|
||||||
XtfConvert.ToBytes(temp_str, ByteArray, 120, 8); //测井方向
|
XtfConvert.ToBytes(temp_str, ByteArray, 120, 8); //测井方向
|
||||||
|
|
||||||
XtfConvert.ToBytes(CurveName[CurveNo], ByteArray, 128, 4); //AIF
|
XtfConvert.ToBytes(CurveName[CurveNo], ByteArray, 128, 4); //AIF
|
||||||
temp_str = "j727e";
|
temp_str = "j727e";
|
||||||
XtfConvert.ToBytes(temp_str, ByteArray, 152, 8); //OCT
|
XtfConvert.ToBytes(temp_str, ByteArray, 152, 8); //OCT
|
||||||
|
|
||||||
temp_str = "1515MA";
|
temp_str = "1515MA";
|
||||||
XtfConvert.ToBytes(temp_str, ByteArray, 160, 48); //仪器名字
|
XtfConvert.ToBytes(temp_str, ByteArray, 160, 48); //仪器名字
|
||||||
|
|
||||||
XtfConvert.ToBytes(CurveName[CurveNo], ByteArray, 224, 4); //LIS
|
XtfConvert.ToBytes(CurveName[CurveNo], ByteArray, 224, 4); //LIS
|
||||||
temp_str = " aff2xtf Rev 1.0";
|
temp_str = " aff2xtf Rev 1.0";
|
||||||
XtfConvert.ToBytes(temp_str, ByteArray, 228, 796); //no use
|
XtfConvert.ToBytes(temp_str, ByteArray, 228, 796); //no use
|
||||||
|
|
||||||
XtfConvert.ToBytes(CurveStartDepth[CurveNo], ByteArray, 1024); //开始深度float
|
XtfConvert.ToBytes(CurveStartDepth[CurveNo], ByteArray, 1024); //开始深度float
|
||||||
XtfConvert.ToBytes(CurveEndDepth[CurveNo], ByteArray, 1028); //结束深度float
|
XtfConvert.ToBytes(CurveEndDepth[CurveNo], ByteArray, 1028); //结束深度float
|
||||||
XtfConvert.ToBytes(CurveDepthLevel[CurveNo], ByteArray, 1032); //深度间隔float
|
XtfConvert.ToBytes(CurveDepthLevel[CurveNo], ByteArray, 1032); //深度间隔float
|
||||||
|
|
||||||
temp_float = -999999.;//0;
|
temp_float = -999999.;//0;
|
||||||
XtfConvert.ToBytes(temp_float, ByteArray, 1036); //min
|
XtfConvert.ToBytes(temp_float, ByteArray, 1036); //min
|
||||||
|
|
@ -1342,60 +1342,60 @@ public :
|
||||||
temp_double = CurveDepthLevel[CurveNo];
|
temp_double = CurveDepthLevel[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_double, ByteArray, 1560); //depth level,double
|
XtfConvert.ToBytes(temp_double, ByteArray, 1560); //depth level,double
|
||||||
|
|
||||||
XtfConvert.ToBytes(CreateDate, ByteArray, 2048); //创建时间
|
XtfConvert.ToBytes(CreateDate, ByteArray, 2048); //创建时间
|
||||||
XtfConvert.ToBytes(CreateTime, ByteArray, 2052); //创建时间
|
XtfConvert.ToBytes(CreateTime, ByteArray, 2052); //创建时间
|
||||||
XtfConvert.ToBytes(CreateDate, ByteArray, 2056); //访问时间
|
XtfConvert.ToBytes(CreateDate, ByteArray, 2056); //访问时间
|
||||||
XtfConvert.ToBytes(CreateTime, ByteArray, 2060); //访问时间
|
XtfConvert.ToBytes(CreateTime, ByteArray, 2060); //访问时间
|
||||||
|
|
||||||
|
|
||||||
temp_int = 1;
|
temp_int = 1;
|
||||||
XtfConvert.ToBytes(temp_int, ByteArray, 2064); //头记录数
|
XtfConvert.ToBytes(temp_int, ByteArray, 2064); //头记录数
|
||||||
|
|
||||||
temp_int = CurveEndPos[CurveNo];
|
temp_int = CurveEndPos[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_int, ByteArray, 2068); //曲线结束记录位置
|
XtfConvert.ToBytes(temp_int, ByteArray, 2068); //曲线结束记录位置
|
||||||
|
|
||||||
// temp_int = 0;
|
// temp_int = 0;
|
||||||
// XtfConvert.ToBytes(temp_int, ByteArray, 2072); //
|
// XtfConvert.ToBytes(temp_int, ByteArray, 2072); //
|
||||||
|
|
||||||
temp_float = -9999.0f;
|
temp_float = -9999.0f;
|
||||||
XtfConvert.ToBytes(temp_float, ByteArray, 2072); //浮点数初始值
|
XtfConvert.ToBytes(temp_float, ByteArray, 2072); //浮点数初始值
|
||||||
|
|
||||||
temp_int = CurveSampleNum[CurveNo];
|
temp_int = CurveSampleNum[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_int, ByteArray, 2076); //曲线采样总点数
|
XtfConvert.ToBytes(temp_int, ByteArray, 2076); //曲线采样总点数
|
||||||
|
|
||||||
// temp_str = " ";
|
// temp_str = " ";
|
||||||
// XtfConvert.ToBytes(temp_str, ByteArray, 2088, 472); //no use
|
// XtfConvert.ToBytes(temp_str, ByteArray, 2088, 472); //no use
|
||||||
|
|
||||||
temp_short = (short)(CurveNo+1);
|
temp_short = (short)(CurveNo+1);
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2564); //曲线索引号
|
XtfConvert.ToBytes(temp_short, ByteArray, 2564); //曲线索引号
|
||||||
|
|
||||||
temp_short = (short)CurveType[CurveNo];
|
temp_short = (short)CurveType[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2566); //曲线类型
|
XtfConvert.ToBytes(temp_short, ByteArray, 2566); //曲线类型
|
||||||
|
|
||||||
temp_short = (short)CurveDataType[CurveNo];
|
temp_short = (short)CurveDataType[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2568); //数据类型
|
XtfConvert.ToBytes(temp_short, ByteArray, 2568); //数据类型
|
||||||
|
|
||||||
temp_short = (short)CurveVert[CurveNo];
|
temp_short = (short)CurveVert[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2570); //垂直特性
|
XtfConvert.ToBytes(temp_short, ByteArray, 2570); //垂直特性
|
||||||
|
|
||||||
temp_short = (short)CurveHorz[CurveNo];
|
temp_short = (short)CurveHorz[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2572); //垂直特性
|
XtfConvert.ToBytes(temp_short, ByteArray, 2572); //垂直特性
|
||||||
|
|
||||||
|
|
||||||
temp_short = (short)CurveDimNum[CurveNo];
|
temp_short = (short)CurveDimNum[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2574); //维数
|
XtfConvert.ToBytes(temp_short, ByteArray, 2574); //维数
|
||||||
|
|
||||||
temp_short = (short)CurveE1Num[CurveNo];
|
temp_short = (short)CurveE1Num[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2576); //第1维个数
|
XtfConvert.ToBytes(temp_short, ByteArray, 2576); //第1维个数
|
||||||
|
|
||||||
temp_short = (short)CurveE2Num[CurveNo];
|
temp_short = (short)CurveE2Num[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2578); //第2维个数
|
XtfConvert.ToBytes(temp_short, ByteArray, 2578); //第2维个数
|
||||||
|
|
||||||
temp_short = (short)CurveE3Num[CurveNo];
|
temp_short = (short)CurveE3Num[CurveNo];
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2580); //第3维个数
|
XtfConvert.ToBytes(temp_short, ByteArray, 2580); //第3维个数
|
||||||
|
|
||||||
temp_short = -32767;
|
temp_short = -32767;
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2590); //INT*2初始值
|
XtfConvert.ToBytes(temp_short, ByteArray, 2590); //INT*2初始值
|
||||||
|
|
||||||
if (CurveDataType[CurveNo] == 2 || CurveDataType[CurveNo] == 9)
|
if (CurveDataType[CurveNo] == 2 || CurveDataType[CurveNo] == 9)
|
||||||
{
|
{
|
||||||
|
|
@ -1405,43 +1405,43 @@ public :
|
||||||
{
|
{
|
||||||
temp_short = 2;
|
temp_short = 2;
|
||||||
}
|
}
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2592); //数据类型旗标
|
XtfConvert.ToBytes(temp_short, ByteArray, 2592); //数据类型旗标
|
||||||
|
|
||||||
|
|
||||||
temp_short = 1;
|
temp_short = 1;
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2594); //有无负号标志,1有
|
XtfConvert.ToBytes(temp_short, ByteArray, 2594); //有无负号标志,1有
|
||||||
|
|
||||||
if (CurveDataType[CurveNo] == 2 || CurveDataType[CurveNo] == 9)
|
if (CurveDataType[CurveNo] == 2 || CurveDataType[CurveNo] == 9)
|
||||||
temp_short = 16;
|
temp_short = 16;
|
||||||
else
|
else
|
||||||
temp_short = 32;
|
temp_short = 32;
|
||||||
XtfConvert.ToBytes(temp_short, ByteArray, 2596); //每个数据元素位数
|
XtfConvert.ToBytes(temp_short, ByteArray, 2596); //每个数据元素位数
|
||||||
|
|
||||||
if (CurveFlag[CurveNo] > 0)
|
if (CurveFlag[CurveNo] > 0)
|
||||||
{
|
{
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].TR_Distance, ByteArray, 1080); //T-R距离
|
XtfConvert.ToBytes(curveInfo[CurveNo].TR_Distance, ByteArray, 1080); //T-R距离
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].RR_Distance, ByteArray, 1084); //R-R距离
|
XtfConvert.ToBytes(curveInfo[CurveNo].RR_Distance, ByteArray, 1084); //R-R距离
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].OrinToSurface, ByteArray, 1088); //R-R距离
|
XtfConvert.ToBytes(curveInfo[CurveNo].OrinToSurface, ByteArray, 1088); //R-R距离
|
||||||
|
|
||||||
for (int i = 0; i < 24; i++)
|
for (int i = 0; i < 24; i++)
|
||||||
{
|
{
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].TranFillArea[i], ByteArray, 3072 + i); //发射填充区
|
XtfConvert.ToBytes(curveInfo[CurveNo].TranFillArea[i], ByteArray, 3072 + i); //发射填充区
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].RecvFillArea[i], ByteArray, 3096+i); //接收器填充区
|
XtfConvert.ToBytes(curveInfo[CurveNo].RecvFillArea[i], ByteArray, 3096+i); //接收器填充区
|
||||||
}
|
}
|
||||||
|
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].StartTimeUnit, ByteArray, 80,8); //开门时间
|
XtfConvert.ToBytes(curveInfo[CurveNo].StartTimeUnit, ByteArray, 80,8); //开门时间
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].WaveTimeUnit, ByteArray, 72,8); //波形时间
|
XtfConvert.ToBytes(curveInfo[CurveNo].WaveTimeUnit, ByteArray, 72,8); //波形时间
|
||||||
|
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].FixedWaveStartFlag, ByteArray, 2606); //0:阵列声波固定开门时间
|
XtfConvert.ToBytes(curveInfo[CurveNo].FixedWaveStartFlag, ByteArray, 2606); //0:阵列声波固定开门时间
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].FixedWaveGain, ByteArray, 2608); //0:阵列声波固定增益
|
XtfConvert.ToBytes(curveInfo[CurveNo].FixedWaveGain, ByteArray, 2608); //0:阵列声波固定增益
|
||||||
//whp del 2016.6.2
|
//whp del 2016.6.2
|
||||||
//XtfConvert.ToBytes(curveInfo[CurveNo].TimeValuesLevel, ByteArray, 1048); //时间增量,时间采样间隔
|
//XtfConvert.ToBytes(curveInfo[CurveNo].TimeValuesLevel, ByteArray, 1048); //时间增量,时间采样间隔
|
||||||
}
|
}
|
||||||
//whp add 2016.6.2 for 转换阵列数据开始时间和时间间隔
|
//whp add 2016.6.2 for 转换阵列数据开始时间和时间间隔
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].TimeValuesLevel, ByteArray, 1048); //时间增量,时间采样间隔
|
XtfConvert.ToBytes(curveInfo[CurveNo].TimeValuesLevel, ByteArray, 1048); //时间增量,时间采样间隔
|
||||||
XtfConvert.ToBytes(curveInfo[CurveNo].DACTimeOffset, ByteArray, 1052); //DAC起始时间
|
XtfConvert.ToBytes(curveInfo[CurveNo].DACTimeOffset, ByteArray, 1052); //DAC起始时间
|
||||||
//whp add end
|
//whp add end
|
||||||
ByteArray[2618] = 0x01; //仪器号
|
ByteArray[2618] = 0x01; //仪器号
|
||||||
|
|
||||||
ByteArray[0xA00] = 0x00;
|
ByteArray[0xA00] = 0x00;
|
||||||
ByteArray[0xA01] = Version1;
|
ByteArray[0xA01] = Version1;
|
||||||
|
|
@ -1462,7 +1462,7 @@ public :
|
||||||
ByteArray[0xD56] = 0x44;
|
ByteArray[0xD56] = 0x44;
|
||||||
}
|
}
|
||||||
|
|
||||||
ByteArray[4095] = SystemCode;//系统码
|
ByteArray[4095] = SystemCode;//系统码
|
||||||
// XtfConvert.ToBytes(SystemCode, ByteArray, 4095);
|
// XtfConvert.ToBytes(SystemCode, ByteArray, 4095);
|
||||||
return CurveNo;
|
return CurveNo;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#pragma warning(push,0)
|
#pragma warning(push,0)
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include "ConsoleOutputWidget.h"
|
#include "ConsoleOutputWidget.h"
|
||||||
#include "ui_Slf2File.h"
|
#include "ui_SLf2File.h"
|
||||||
#include "NameMapDlg.h"
|
#include "NameMapDlg.h"
|
||||||
#include "DataOutputDefs.h"
|
#include "DataOutputDefs.h"
|
||||||
#include "OSGFramework.h"
|
#include "OSGFramework.h"
|
||||||
|
|
@ -25,7 +25,7 @@ public:
|
||||||
~CSlf2FileDlg();
|
~CSlf2FileDlg();
|
||||||
Ui_Slf2File *m_pUI;
|
Ui_Slf2File *m_pUI;
|
||||||
virtual void execOutputWellLog(const QStringList& namelist);
|
virtual void execOutputWellLog(const QStringList& namelist);
|
||||||
virtual void CSlf2FileDlg::outWellLogRound(const QStringList& nameList1,const QStringList& curveList);
|
virtual void outWellLogRound(const QStringList& nameList1,const QStringList& curveList);
|
||||||
private slots:
|
private slots:
|
||||||
/**
|
/**
|
||||||
*@brief 保存槽函数
|
*@brief 保存槽函数
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
//#include "WisTableTran.h"
|
//#include "WisTableTran.h"
|
||||||
//#include "MemRdWt.h"
|
//#include "MemRdWt.h"
|
||||||
#include "DepthProgress.h"
|
#include "DepthProgress.h"
|
||||||
#include <Windows.h>
|
#ifdef WIN32
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif // WIN32
|
||||||
#include "MemRdWt.h"
|
#include "MemRdWt.h"
|
||||||
//#include "MyXtfLib.h"
|
//#include "MyXtfLib.h"
|
||||||
//#include "MyLisLib.h"
|
//#include "MyLisLib.h"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
|
|
||||||
QT += core gui widgets
|
QT += core gui
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include "TranSlf2Data.h"
|
#include "TranSlf2Data.h"
|
||||||
#include "Slf2FileDlg.h"
|
#include "Slf2FileDlg.h"
|
||||||
#include "ui_Slf2File.h"
|
#include "ui_SLf2File.h"
|
||||||
#include "CStringType.h"
|
#include "CStringType.h"
|
||||||
#include "LogIO.h"
|
#include "LogIO.h"
|
||||||
#include "qfileinfo.h"
|
#include "qfileinfo.h"
|
||||||
#include "qfileDialog.h"
|
#include "qfiledialog.h"
|
||||||
#include "GeometryUtils.h"
|
#include "geometryutils.h"
|
||||||
#include "SetOutDepParDlg.h"
|
#include "SetOutDepParDlg.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "CheckHeadView.h"
|
#include "CheckHeadView.h"
|
||||||
|
|
@ -98,7 +98,7 @@ BEGIN_OSGGRAPHICS_NAMESPACE
|
||||||
m_pUI->tableWidget->setWindowTitle("Well Information");
|
m_pUI->tableWidget->setWindowTitle("Well Information");
|
||||||
m_pUI->tableWidget->setColumnWidth(0,120);m_pUI->tableWidget->setColumnWidth(1,400);
|
m_pUI->tableWidget->setColumnWidth(0,120);m_pUI->tableWidget->setColumnWidth(1,400);
|
||||||
for(int i=2;i<10;i++)m_pUI->tableWidget->setColumnWidth(i,72);
|
for(int i=2;i<10;i++)m_pUI->tableWidget->setColumnWidth(i,72);
|
||||||
//m_pUI->tableWidget->resize(1200,300);//设置表格
|
//m_pUI->tableWidget->resize(1200,300);//设置表格
|
||||||
//m_pUI->tableWidget->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
|
//m_pUI->tableWidget->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
|
||||||
QStringList header;
|
QStringList header;
|
||||||
header<<"Slf\n文件名"<<"输出路径\n及文件名"<<"输出\n起始深度"<<"输出\n终止深度"<<"输出\n采样间距"<<"最小\n起始深度"<<"最大\n起始深度"<<"最小\n结束深度"<<"最大\n结束深度"<<"最小\n采样间隔"<<"最大\n采样间隔";
|
header<<"Slf\n文件名"<<"输出路径\n及文件名"<<"输出\n起始深度"<<"输出\n终止深度"<<"输出\n采样间距"<<"最小\n起始深度"<<"最大\n起始深度"<<"最小\n结束深度"<<"最大\n结束深度"<<"最小\n采样间隔"<<"最大\n采样间隔";
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@
|
||||||
#include "CStringType.h"
|
#include "CStringType.h"
|
||||||
#include "LogIO.h"
|
#include "LogIO.h"
|
||||||
#include "qfileinfo.h"
|
#include "qfileinfo.h"
|
||||||
#include "qfileDialog.h"
|
#include "qfiledialog.h"
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include "GeometryUtils.h"
|
#include "geometryutils.h"
|
||||||
#include "SetOutDepParDlg.h"
|
#include "SetOutDepParDlg.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "CheckHeadView.h"
|
#include "CheckHeadView.h"
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,13 @@
|
||||||
#include "WisTableTran.h"
|
#include "WisTableTran.h"
|
||||||
//#include "MemRdWt.h"
|
//#include "MemRdWt.h"
|
||||||
#include "DepthProgress.h"
|
#include "DepthProgress.h"
|
||||||
#include <Windows.h>
|
#ifdef WIN32
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif // WIN32
|
||||||
#include "MyXtfLib.h"
|
#include "MyXtfLib.h"
|
||||||
#include "MyLisLib.h"
|
#include "MyLisLib.h"
|
||||||
#include "MyLpsLib.h"
|
#include "MyLpsLib.h"
|
||||||
#include "translf2data.h"
|
#include "TranSlf2Data.h"
|
||||||
#include <tutouInfGenerator.h>
|
#include <tutouInfGenerator.h>
|
||||||
|
|
||||||
extern short ReverseShort(short num);
|
extern short ReverseShort(short num);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
#include <QSharedMemory>
|
#include <QSharedMemory>
|
||||||
#include "BaseObject.h"
|
#include "BaseObject.h"
|
||||||
// #include "WelllogCurve.h"
|
// #include "WelllogCurve.h"
|
||||||
#include "GeometryUtils.h"
|
#include "geometryutils.h"
|
||||||
#include "BaseFun.h"
|
#include "BaseFun.h"
|
||||||
// #include "ObjBaseObject.h"
|
// #include "ObjBaseObject.h"
|
||||||
#pragma warning( pop )
|
#pragma warning( pop )
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,12 @@ CObjWellTrack *CObjWellLog::GetWellTrack()
|
||||||
buf[0]=0;
|
buf[0]=0;
|
||||||
float temp=logio->GetData(acurveinfo.RepCode,&vVdl.vchar[kk*acurveinfo.CodeLen],buf);
|
float temp=logio->GetData(acurveinfo.RepCode,&vVdl.vchar[kk*acurveinfo.CodeLen],buf);
|
||||||
if(temp==-9999.0||temp==-999.25||temp==-99999.0) continue;
|
if(temp==-9999.0||temp==-999.25||temp==-99999.0) continue;
|
||||||
if(_isnan(temp)||!_finite(temp)) continue;
|
#ifdef WIN32
|
||||||
|
if(_isnan(temp)||!_finite(temp)) continue;
|
||||||
|
#else
|
||||||
|
if(__isnan(temp)||!__finite(temp)) continue;
|
||||||
|
#endif // WIN32
|
||||||
|
|
||||||
if(acurveinfo.MaxValue<temp) acurveinfo.MaxValue=temp;
|
if(acurveinfo.MaxValue<temp) acurveinfo.MaxValue=temp;
|
||||||
if(acurveinfo.MinValue>temp) acurveinfo.MinValue=temp;
|
if(acurveinfo.MinValue>temp) acurveinfo.MinValue=temp;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,8 @@ typedef void *HANDLE;
|
||||||
typedef unsigned int DWORD;
|
typedef unsigned int DWORD;
|
||||||
typedef DWORD *LPDWORD;
|
typedef DWORD *LPDWORD;
|
||||||
typedef void *HANDLE;
|
typedef void *HANDLE;
|
||||||
|
typedef unsigned char byte;
|
||||||
|
typedef bool BOOL;
|
||||||
#endif
|
#endif
|
||||||
typedef unsigned char BYTE;
|
typedef unsigned char BYTE;
|
||||||
typedef char* LPSTR;
|
typedef char* LPSTR;
|
||||||
|
|
|
||||||
|
|
@ -58,14 +58,15 @@
|
||||||
#define GUJING_OBJECT CARD_OBJECT+0x0010
|
#define GUJING_OBJECT CARD_OBJECT+0x0010
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
typedef unsigned int __time32_t;
|
typedef unsigned int __time32_t;
|
||||||
#define stricmp strcasecmp
|
#define stricmp strcasecmp
|
||||||
char *strupr(char *str);
|
char *strupr(char *str);
|
||||||
|
#define _MAX_PATH 256
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CString SLFIO_EXPORT MemName(CString wellname,CString Curve);
|
CString SLFIO_EXPORT MemName(CString wellname,CString Curve);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <Windows.h>
|
#ifdef WIN32
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif // WIN32
|
||||||
#include "slf.h"
|
#include "slf.h"
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <QTableWidgetSelectionRange>
|
#include <QTableWidgetSelectionRange>
|
||||||
#include <QCache>
|
#include <QCache>
|
||||||
// #include "ObjWellLogWavefile.h"
|
// #include "ObjWellLogWavefile.h"
|
||||||
#include "ObjWellLog.h"
|
#include "ObjWelllog.h"
|
||||||
#include "adapter_defs.h"
|
#include "adapter_defs.h"
|
||||||
|
|
||||||
class AssetCopy : public QObject
|
class AssetCopy : public QObject
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "BaseFun.h"
|
#include "BaseFun.h"
|
||||||
// #include "ObjCoreImage.h"
|
// #include "ObjCoreImage.h"
|
||||||
#include "GeometryUtils.h"
|
#include "geometryutils.h"
|
||||||
// #include "ObjWellLogWavefile.h"
|
// #include "ObjWellLogWavefile.h"
|
||||||
#include "ObjWelllog.h"
|
#include "ObjWelllog.h"
|
||||||
#include "LogIO.h"
|
#include "LogIO.h"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <qtablewidget.h>
|
#include <qtablewidget.h>
|
||||||
#include "ObjWellLogTABLE.h"
|
#include "ObjWelllogTABLE.h"
|
||||||
// #include "ObjDiscreteWellLog.h"
|
// #include "ObjDiscreteWellLog.h"
|
||||||
// #include "BaseDialog.h"
|
// #include "BaseDialog.h"
|
||||||
#include "DepthProgress.h"
|
#include "DepthProgress.h"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <QCustomPlot.h>
|
#include <qcustomplot.h>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QPointF>
|
#include <QPointF>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
|
||||||
|
|
@ -1319,6 +1319,11 @@ void FormDraw::initTableLine(QMyCustomPlot *widget, QString strSlfName, QString
|
||||||
|
|
||||||
m_LeftVal = 0;
|
m_LeftVal = 0;
|
||||||
m_RightVal = 360;
|
m_RightVal = 360;
|
||||||
|
//隐藏刻度
|
||||||
|
widget->xAxis->setTicks(false);
|
||||||
|
widget->yAxis->setTicks(false);
|
||||||
|
widget->xAxis2->setTicks(false);
|
||||||
|
widget->yAxis2->setTicks(false);
|
||||||
//
|
//
|
||||||
if (m_bTableData)
|
if (m_bTableData)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -110,19 +110,19 @@ void QMyCustomPlot::init(QString strName, QVector<double> xx, QVector<double> yy
|
||||||
|
|
||||||
void QMyCustomPlot::mousePressEvent(QMouseEvent *event)
|
void QMyCustomPlot::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (event->button() == Qt::LeftButton) {
|
// if (event->button() == Qt::LeftButton) {
|
||||||
|
|
||||||
if (auto *item = itemAt(event->pos(), true)) {
|
// if (auto *item = itemAt(event->pos(), true)) {
|
||||||
emit mousePress(event); // 由于我们直接返回了,所以要负责将鼠标点击信号发送出去
|
// emit mousePress(event); // 由于我们直接返回了,所以要负责将鼠标点击信号发送出去
|
||||||
|
|
||||||
// deselectAll();
|
// // deselectAll();
|
||||||
mMousePress = true;
|
// mMousePress = true;
|
||||||
mLastPos = event->pos();
|
// mLastPos = event->pos();
|
||||||
item->setSelected(true);
|
// item->setSelected(true);
|
||||||
replot();
|
// replot();
|
||||||
return; // 如果点击的是一个item直接返回,不然QCustomPlot会把事件传递给其它的层对象(例如:轴矩形)
|
// return; // 如果点击的是一个item直接返回,不然QCustomPlot会把事件传递给其它的层对象(例如:轴矩形)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
QCustomPlot::mousePressEvent(event);
|
QCustomPlot::mousePressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
@ -132,24 +132,24 @@ void QMyCustomPlot::mouseMoveEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
QCustomPlot::mouseMoveEvent(event);
|
QCustomPlot::mouseMoveEvent(event);
|
||||||
|
|
||||||
if (mMousePress) {
|
// if (mMousePress) {
|
||||||
auto items = selectedItems();
|
// auto items = selectedItems();
|
||||||
|
|
||||||
foreach (auto *item, items) {
|
// foreach (auto *item, items) {
|
||||||
if (auto *sizeHandle = qobject_cast<QCPSizeHandle *>(item))
|
// if (auto *sizeHandle = qobject_cast<QCPSizeHandle *>(item))
|
||||||
{
|
// {
|
||||||
mSizeHandleManager->handleItemResize(sizeHandle, event->pos() - mLastPos); // 控制item缩放
|
// mSizeHandleManager->handleItemResize(sizeHandle, event->pos() - mLastPos); // 控制item缩放
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
mSizeHandleManager->handleItemMove(item, event->pos() - mLastPos); // 控制item移动
|
// mSizeHandleManager->handleItemMove(item, event->pos() - mLastPos); // 控制item移动
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
mLastPos = event->pos();
|
// mLastPos = event->pos();
|
||||||
replot();
|
// replot();
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
{
|
||||||
// 当前鼠标位置(像素坐标)
|
// 当前鼠标位置(像素坐标)
|
||||||
//int x_pos = event->pos().x();
|
//int x_pos = event->pos().x();
|
||||||
|
|
@ -164,15 +164,15 @@ void QMyCustomPlot::mouseMoveEvent(QMouseEvent *event)
|
||||||
|
|
||||||
void QMyCustomPlot::mouseReleaseEvent(QMouseEvent *event)
|
void QMyCustomPlot::mouseReleaseEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (mMousePress) {
|
// if (mMousePress) {
|
||||||
mMousePress = false;
|
// mMousePress = false;
|
||||||
if (auto *item = itemAt(event->pos(), true)) {
|
// if (auto *item = itemAt(event->pos(), true)) {
|
||||||
emit mouseReleaseEvent(event); // 由于我们直接返回了,所以要负责将鼠标点击信号发送出去
|
// emit mouseReleaseEvent(event); // 由于我们直接返回了,所以要负责将鼠标点击信号发送出去
|
||||||
item->setSelected(false);
|
// item->setSelected(false);
|
||||||
replot();
|
// replot();
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
QCustomPlot::mouseReleaseEvent(event);
|
QCustomPlot::mouseReleaseEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include <QtConcurrent/QtConcurrent>
|
#include <QtConcurrent/QtConcurrent>
|
||||||
#include <functional> // 需要包含这个头文件来使用 std::bind
|
#include <functional> // 需要包含这个头文件来使用 std::bind
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include "MainWindow.h"
|
#include "mainwindow.h"
|
||||||
#include "InDefTableDlg.h"
|
#include "InDefTableDlg.h"
|
||||||
#include "qtcommonclass.h"
|
#include "qtcommonclass.h"
|
||||||
#include "CallManage.h"
|
#include "CallManage.h"
|
||||||
|
|
@ -511,7 +511,12 @@ void QtProjectWidgets::loadWellTree(QTreeWidgetItem *parent, QString fileFull, Q
|
||||||
float buf[200];
|
float buf[200];
|
||||||
buf[0]=0;
|
buf[0]=0;
|
||||||
float temp=logio->GetData(acurveinfo.RepCode,&vVdl.vchar[kk*acurveinfo.CodeLen],buf);
|
float temp=logio->GetData(acurveinfo.RepCode,&vVdl.vchar[kk*acurveinfo.CodeLen],buf);
|
||||||
if(_isnan(temp)||!_finite(temp)) continue;
|
|
||||||
|
#ifdef WIN32
|
||||||
|
if(_isnan(temp)||!_finite(temp)) continue;
|
||||||
|
#else
|
||||||
|
if(__isnan(temp)||!__finite(temp)) continue;
|
||||||
|
#endif // WIN32
|
||||||
|
|
||||||
if(acurveinfo.MaxValue<temp) if(temp!=-9999.0&&temp!=-999.25&&temp!=-99999.0)acurveinfo.MaxValue=temp;
|
if(acurveinfo.MaxValue<temp) if(temp!=-9999.0&&temp!=-999.25&&temp!=-99999.0)acurveinfo.MaxValue=temp;
|
||||||
if(acurveinfo.MinValue>temp) if(temp!=-9999.0&&temp!=-999.25&&temp!=-99999.0)acurveinfo.MinValue=temp;
|
if(acurveinfo.MinValue>temp) if(temp!=-9999.0&&temp!=-999.25&&temp!=-99999.0)acurveinfo.MinValue=temp;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user