-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c2fb095
Showing
476 changed files
with
66,677 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
|
||
#ignore thumbnails created by windows | ||
Thumbs.db | ||
#Ignore files build by Visual Studio | ||
*.obj | ||
*.exe | ||
*.pdb | ||
*.user | ||
*.aps | ||
*.pch | ||
*.vspscc | ||
*_i.c | ||
*_p.c | ||
*.ncb | ||
*.suo | ||
*.tlb | ||
*.tlh | ||
*.bak | ||
*.cache | ||
*.ilk | ||
*.log | ||
[Bb]in | ||
[Dd]ebug*/ | ||
*.lib | ||
*.sbr | ||
obj/ | ||
[Rr]elease*/ | ||
_ReSharper*/ | ||
[Tt]est[Rr]esult* | ||
*.dll | ||
*.csv | ||
*.xlsx | ||
*.cd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
connection: host=127.0.0.1 dbname=BMCC user=postgres password=1017 | ||
grid_tablename: grid_0_1 | ||
cellinfo_tablename: cells20120217_yql | ||
maincell_tablename: field_gsm900 | ||
inter_tablename:field_gsm900_interf_yql | ||
time: 20120323 | ||
celltype:SECTOR | ||
frequency:900 | ||
networksort:GSM900 | ||
cellcover_path_name:F:\\BMCC\\FinalResult\\field | ||
geo_path_name:F:\\BMCC\\FinalResult\\geo_info | ||
mrinfo_path_name:F:\\BMCC\\FinalResult\\mrtraffic | ||
tchinter_neighbor_path_name:F:\\BMCC\\FinalResult\\tchinterference\\tchinterference_neighborfre_GSM900 | ||
tchinter_same_path_name:F:\\BMCC\\FinalResult\\tchinterference\\tchinterference_samefre_GSM900 | ||
result_path_name:F:\\BMCC | ||
region_info:359617946 630 1060 | ||
To_Big_Matrix:true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 10.00 | ||
# Visual Studio 2008 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Evaluation_Compute", "Evaluation_Compute\Evaluation_Compute.vcproj", "{CE678E76-032B-482A-8827-F27D4D56705B}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4) | ||
Debug|Win32 = Debug|Win32 | ||
Debug|x64 = Debug|x64 | ||
Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4) | ||
Release|Win32 = Release|Win32 | ||
Release|x64 = Release|x64 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Debug|Win32.Build.0 = Debug|Win32 | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Debug|x64.ActiveCfg = Debug|Pocket PC 2003 (ARMV4) | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Release|Win32.ActiveCfg = Release|Win32 | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Release|Win32.Build.0 = Release|Win32 | ||
{CE678E76-032B-482A-8827-F27D4D56705B}.Release|x64.ActiveCfg = Release|x64 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
#include "StdAfx.h" | ||
#include "Cellinfo_Class.h" | ||
|
||
Cellinfo_Class::Cellinfo_Class(void) | ||
{ | ||
} | ||
|
||
Cellinfo_Class::~Cellinfo_Class(void) | ||
{ | ||
} | ||
void Cellinfo_Class::setdefault(){ | ||
//cout<<"cell set"<<endl; | ||
Set(default_cell_tablename,default_cell_field,default_cell_keyfield_cellid); | ||
} | ||
bool Cellinfo_Class::selectonecondition(string value, Cellinfo &cell){ | ||
//cout<<"select ok\n"; | ||
PGresult* res=VSelectOneCondition(value.c_str()); | ||
//cout<<"PQ select is ok\n"; | ||
return FormatConver(res,cell); | ||
} | ||
bool Cellinfo_Class::FormatConver(PGresult *res,Cellinfo & cell){ | ||
//cout<<"this format is ok\n"; | ||
if(PQntuples(res)<1) | ||
return false; | ||
cell.cell_id=(string)PQgetvalue(res,0,0); | ||
cell.grid_id=atoi(PQgetvalue(res,0,1)); | ||
cell.celltype=(string)PQgetvalue(res,0,2); | ||
cell.bcchno=atoi(PQgetvalue(res,0,3)); | ||
//cout<<1<<endl; | ||
if(cell.bcchno>=512 && cell.bcchno<=998){ | ||
cell.frequency=1800; | ||
} | ||
else{ | ||
cell.frequency=900; | ||
} | ||
// cout<<2<<endl; | ||
cell.height=(float)atof(PQgetvalue(res,0,5)); | ||
int type_code=atoi(PQgetvalue(res,0,6)); | ||
if(type_code==2 ||type_code==3){//二、三功分天线 | ||
std::string tempstr=(std::string)PQgetvalue(res,0,4); | ||
size_t k=0,record_index=0; | ||
int direction=0; | ||
for(k=0;k<tempstr.length();k++){ | ||
if(tempstr[k]=='/'){ | ||
direction=direction*400+atoi((tempstr.substr(record_index,k-record_index)).c_str()); | ||
record_index=k+1; | ||
} | ||
} | ||
direction=direction*400+atoi((tempstr.substr(record_index,k-record_index)).c_str()); | ||
cell.direction=(float)direction; | ||
} | ||
else{ | ||
cell.direction=(float)atof(PQgetvalue(res,0,4)); | ||
} | ||
// cout<<3<<endl; | ||
PQclear(res); | ||
return true; | ||
} | ||
|
||
bool Cellinfo_Class::selectonecondition(string value, vector<Cellinfo> &cell){ | ||
PGresult* res=VSelectOneCondition(value.c_str()); | ||
return FormatConver(res,cell); | ||
} | ||
bool Cellinfo_Class::selectall(vector<Cellinfo>&cell){ | ||
std::string query=(std::string)"Select "+Vfield+(std::string)" From "+Vtablename; | ||
PGresult* res=PQexec(Vconn,query.c_str()); | ||
return FormatConver(res,cell); | ||
} | ||
bool Cellinfo_Class::FormatConver(PGresult *res,vector<Cellinfo> & cell){ | ||
if(PQntuples(res)<1) | ||
return false; | ||
cell.clear(); | ||
cell.resize(PQntuples(res)); | ||
for(int i=0;i<PQntuples(res);i++){ | ||
cell[i].cell_id=(string)PQgetvalue(res,i,0); | ||
cell[i].grid_id=atoi(PQgetvalue(res,i,1)); | ||
cell[i].celltype=(string)PQgetvalue(res,i,2); | ||
cell[i].bcchno=atoi(PQgetvalue(res,i,3)); | ||
if(cell[i].bcchno>=512 && cell[i].bcchno<=998){ | ||
cell[i].frequency=1800; | ||
} | ||
else{ | ||
cell[i].frequency=900; | ||
} | ||
cell[i].height=(float)atof(PQgetvalue(res,i,5)); | ||
int type_code=atoi(PQgetvalue(res,i,6)); | ||
if(type_code==2 ||type_code==3){//二、三功分天线 | ||
std::string tempstr=(std::string)PQgetvalue(res,i,4); | ||
size_t k=0,record_index=0; | ||
int direction=0; | ||
for(k=0;k<tempstr.length();k++){ | ||
if(tempstr[k]=='/'){ | ||
direction=direction*400+atoi((tempstr.substr(record_index,k-record_index)).c_str()); | ||
record_index=k+1; | ||
} | ||
} | ||
direction=direction*400+atoi((tempstr.substr(record_index,k-record_index)).c_str()); | ||
cell[i].direction=(float)direction; | ||
} | ||
else{ | ||
cell[i].direction=(float)atof(PQgetvalue(res,i,4)); | ||
} | ||
} | ||
PQclear(res); | ||
return true; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
#include"SQLclass.h" | ||
|
||
class Cellinfo_Class:public SQLclass | ||
{ | ||
public: | ||
Cellinfo_Class(void); | ||
~Cellinfo_Class(void); | ||
void setdefault();//设定天线信息默认表名 属性名 关键属性名 | ||
bool selectonecondition(string value,Cellinfo &cell);//读取关键属性值为value的天线信息存入cell | ||
bool selectall(vector<Cellinfo> &cell); | ||
bool FormatConver(PGresult* res,Cellinfo &cell); | ||
bool selectonecondition(string value,vector<Cellinfo> &cell);//读取关键属性值为value的天线信息存入cell | ||
bool FormatConver(PGresult* res,vector<Cellinfo> &cell); | ||
|
||
}; |
Oops, something went wrong.