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

📄 test_gauss_proj.cpp

📁 这是一个高斯投影变换的类
💻 CPP
字号:
// test_gauss_proj.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include "GaussProj.h"

int _tmain(int argc, _TCHAR* argv[])
{
	CProjection m_GaussProj;
	double L0, Val1, Val2;
	bool   fgDirect;

	if(argc < 5)
    {
        printf("test L0 val1 val2 direct \n");
        printf("direct: 0 -- convert B,l to x,y\n");
        printf("        1 -- convert x,y to B,l\n");
        return 0;
    }

	L0  = atof(argv[1]);
	Val1 = atof(argv[2]);
	Val2 = atof(argv[3]);

	fgDirect = (bool)atoi(argv[4]);

	m_GaussProj.fgSetCurL0(L0);

	if(fgDirect)
	{
		printf("convert x,y to B,l now:\n");

		m_GaussProj.fgConvertxy2Bl(Val1, Val2);
		m_GaussProj.fgGetConvertedBl(&Val1, &Val2);

		printf("in L0: %f, converted B,l are: %f, %f \n", L0, Val1, Val2);
	}
	else
	{
		printf("convert B,l to x,y now:\n");

		m_GaussProj.fgConvertBl2xy(Val1, Val2);
		m_GaussProj.fgGetConvertedxy(&Val1, &Val2);

		printf("in L0: %f, converted x,y are: %f, %f \n", L0, Val1, Val2);
	}

	return 0;
}

⌨️ 快捷键说明

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