Minor tweaks related to FGBucket usage.
This commit is contained in:
parent
e774a38dc7
commit
48e3734e8f
3 changed files with 12 additions and 17 deletions
|
@ -443,14 +443,13 @@ void FGArray::outputmesh_output_nodes( const string& fg_root, FGBucket& p )
|
|||
{
|
||||
double exnodes[MAX_EX_NODES][3];
|
||||
struct stat stat_buf;
|
||||
string dir;
|
||||
char file[256], exfile[256];
|
||||
string dir, file;
|
||||
char exfile[256];
|
||||
#ifdef WIN32
|
||||
char tmp_path[256];
|
||||
#endif
|
||||
string command;
|
||||
FILE *fd;
|
||||
long int index;
|
||||
int colmin, colmax, rowmin, rowmax;
|
||||
int i, j, count, excount, result;
|
||||
|
||||
|
@ -481,13 +480,11 @@ void FGArray::outputmesh_output_nodes( const string& fg_root, FGBucket& p )
|
|||
}
|
||||
|
||||
// get index and generate output file name
|
||||
index = p.gen_index();
|
||||
sprintf(file, "%s/%ld.node", dir.c_str(), index);
|
||||
file = dir + "/" + p.gen_index_str() + ".node";
|
||||
|
||||
// get (optional) extra node file name (in case there is matching
|
||||
// .poly file.
|
||||
strcpy(exfile, file);
|
||||
strcat(exfile, ".ex");
|
||||
exfile = file + ".ex";
|
||||
|
||||
// load extra nodes if they exist
|
||||
excount = 0;
|
||||
|
@ -560,6 +557,9 @@ FGArray::~FGArray( void ) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.5 1999/03/25 19:03:50 curt
|
||||
// Minor tweaks related to FGBucket usage.
|
||||
//
|
||||
// Revision 1.4 1999/03/20 20:32:51 curt
|
||||
// First mostly successful tile triangulation works. There's plenty of tweaking
|
||||
// to do, but we are marching in the right direction.
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "array.hxx"
|
||||
|
||||
main(int argc, char **argv) {
|
||||
char tile_name[256];
|
||||
double lon, lat;
|
||||
|
||||
if ( argc != 2 ) {
|
||||
|
@ -12,7 +11,6 @@ main(int argc, char **argv) {
|
|||
}
|
||||
|
||||
string work_dir = argv[1];
|
||||
|
||||
|
||||
lon = -146.248360; lat = 61.133950; // PAVD (Valdez, AK)
|
||||
lon = -110.664244; lat = 33.352890; // P13
|
||||
|
@ -21,9 +19,7 @@ main(int argc, char **argv) {
|
|||
string base = b.gen_base_path();
|
||||
string path = work_dir + "/Scenery/" + base;
|
||||
|
||||
long int b_index = b.gen_index();
|
||||
sprintf(tile_name, "%ld", b_index);
|
||||
string arrayfile = path + "/" + tile_name + ".dem";
|
||||
string arrayfile = path + "/" + b.gen_index_str() + ".dem";
|
||||
cout << "arrayfile = " << arrayfile << endl;
|
||||
|
||||
FGArray a(arrayfile);
|
||||
|
|
|
@ -371,8 +371,6 @@ FGDem::parse( ) {
|
|||
// corner.
|
||||
int
|
||||
FGDem::write_area( const string& root, FGBucket& b, bool compress ) {
|
||||
char tile_name[256];
|
||||
|
||||
// calculate some boundaries
|
||||
double min_x = ( b.get_center_lon() - 0.5 * b.get_width() ) * 3600.0;
|
||||
double max_x = ( b.get_center_lon() + 0.5 * b.get_width() ) * 3600.0;
|
||||
|
@ -412,9 +410,7 @@ FGDem::write_area( const string& root, FGBucket& b, bool compress ) {
|
|||
string command = "mkdir -p " + path;
|
||||
system( command.c_str() );
|
||||
|
||||
long int b_index = b.gen_index();
|
||||
sprintf(tile_name, "%ld", b_index);
|
||||
string demfile = path + "/" + tile_name + ".dem";
|
||||
string demfile = path + "/" + b.gen_index_str() + ".dem";
|
||||
cout << "demfile = " << demfile << endl;
|
||||
|
||||
// write the file
|
||||
|
@ -869,6 +865,9 @@ FGDem::~FGDem( void ) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.27 1999/03/25 19:04:36 curt
|
||||
// Minor tweaks related to FGBucket usage.
|
||||
//
|
||||
// Revision 1.26 1999/03/13 17:40:37 curt
|
||||
// Moved point interpolation and least squares fitting to contruction program
|
||||
// area.
|
||||
|
|
Loading…
Add table
Reference in a new issue