You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.8 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//////////////////////////////////////////////////////////////////////////////
//文件: CWellTrack类井轨迹计算类
//主要功能:
// 根据指定的参数计算平面井轨迹坐标
//
//程序编写: 2012-07-03
//
//
/////////////////////////////////////////////////////////////////////////////
#pragma once
#include "Point2D.h"
class AFX_EXT_CLASS CWellTrack
{
public:
CWellTrack();
virtual ~CWellTrack(void);
class AFX_EXT_CLASS CWellTrackPoint
{
public:
CWellTrackPoint(void) { InitPoint(); }
dfPoint point; //井口坐标
double xh; //斜深
double vh; //垂深
double bevel; //井斜角
double azimuth; //方位角
double dx, dy; //横偏移,纵偏移
double dh; //该段的斜深|垂深间隔
void InitPoint(void);
};
enum ETrackType //为了与导入时的类型相同
{
typeWellOffset = 5, //斜井轨迹一偏移法(需要:井口坐标、横偏移、纵偏移)
typeWellAvgAngle1 = 6, //斜井轨迹二平均角法(需要:井口坐标、斜深、井斜角、方位角)
typeWellAvgAngle2 = 7, //斜井轨迹三平均角法(需要:井口坐标、垂深、井斜角、方位角)
typeWellMinCurvature = 8, //斜井轨迹四最小曲率法一(需要:井口坐标、斜深、井斜角、方位角)
};
//返回值当为四列数据时Z值为垂深L值为斜深
int CreateTrack(CList<CWellTrackPoint, CWellTrackPoint>& arrPoint, CPointList &out_dp, ETrackType nMode);
protected:
//根据原点坐标x,y,(垂深,斜角bevel,方位角azimuth----三个参数相对于原点坐标)计算坐标
void GetCoordinate(CWellTrackPoint& wp);
double ToVerticalDepth(double h, double bevel); //斜深,斜角
//最小曲率法minimum curvature method
int MinimumCurvatureMethod(CList<CWellTrackPoint, CWellTrackPoint>& arrPoint, CPointList &out_dp);
//平均角法
int AverageAngleMethod(CList<CWellTrackPoint, CWellTrackPoint>& arrPoint, CPointList &out_dp, ETrackType nMode);
};
typedef CList<CWellTrack::CWellTrackPoint, CWellTrack::CWellTrackPoint> CWellTrackPointList;