minor tweaks to clean a few additional things up after the rewrite.
This commit is contained in:
parent
fba995d01a
commit
ef1e08e474
1 changed files with 12 additions and 8 deletions
20
DEM/dem.cxx
20
DEM/dem.cxx
|
@ -145,7 +145,7 @@ string fgDEM::next_token() {
|
||||||
|
|
||||||
in->stream() >> token;
|
in->stream() >> token;
|
||||||
|
|
||||||
cout << " returning " + token + "\n";
|
// cout << " returning " + token + "\n";
|
||||||
|
|
||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ int fgDEM::next_exp() {
|
||||||
|
|
||||||
sscanf(token.c_str(), "%lfD%d", &mantissa, &exp);
|
sscanf(token.c_str(), "%lfD%d", &mantissa, &exp);
|
||||||
|
|
||||||
cout << " Mantissa = " << mantissa << " Exp = " << exp << "\n";
|
// cout << " Mantissa = " << mantissa << " Exp = " << exp << "\n";
|
||||||
|
|
||||||
acc = 1;
|
acc = 1;
|
||||||
if ( exp > 0 ) {
|
if ( exp > 0 ) {
|
||||||
|
@ -214,7 +214,7 @@ int fgDEM::read_a_record() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean off the trailing whitespace
|
// clean off the trailing whitespace
|
||||||
name = trimleft(name);
|
name = trim(name);
|
||||||
cout << " Quad name field: " + name + "\n";
|
cout << " Quad name field: " + name + "\n";
|
||||||
|
|
||||||
// DEM level code, 3 reflects processing by DMA
|
// DEM level code, 3 reflects processing by DMA
|
||||||
|
@ -285,7 +285,7 @@ int fgDEM::read_a_record() {
|
||||||
// Minimum/maximum elevations in meters
|
// Minimum/maximum elevations in meters
|
||||||
dem_z1 = next_exp();
|
dem_z1 = next_exp();
|
||||||
dem_z2 = next_exp();
|
dem_z2 = next_exp();
|
||||||
cout << " Elevation range " << dem_z1 << dem_z2 << "\n";
|
cout << " Elevation range " << dem_z1 << " to " << dem_z2 << "\n";
|
||||||
|
|
||||||
// Counterclockwise angle from the primary axis of ground
|
// Counterclockwise angle from the primary axis of ground
|
||||||
// planimetric referenced to the primary axis of the DEM local
|
// planimetric referenced to the primary axis of the DEM local
|
||||||
|
@ -391,7 +391,7 @@ int fgDEM::parse( ) {
|
||||||
cur_col++;
|
cur_col++;
|
||||||
|
|
||||||
if ( cur_col % 100 == 0 ) {
|
if ( cur_col % 100 == 0 ) {
|
||||||
cout << " loaded " << cur_col << "profiles of data\n";
|
cout << " loaded " << cur_col << " profiles of data\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,8 +520,9 @@ void fgDEM::fit( double error, fgBUCKET *p ) {
|
||||||
double x[DEM_SIZE_1], y[DEM_SIZE_1];
|
double x[DEM_SIZE_1], y[DEM_SIZE_1];
|
||||||
double m, b, ave_error, max_error;
|
double m, b, ave_error, max_error;
|
||||||
double cury, lasty;
|
double cury, lasty;
|
||||||
int n, row, start, end, good_fit;
|
int n, row, start, end;
|
||||||
int colmin, colmax, rowmin, rowmax;
|
int colmin, colmax, rowmin, rowmax;
|
||||||
|
bool good_fit;
|
||||||
// FILE *dem, *fit, *fit1;
|
// FILE *dem, *fit, *fit1;
|
||||||
|
|
||||||
printf("Initializing output mesh structure\n");
|
printf("Initializing output mesh structure\n");
|
||||||
|
@ -552,7 +553,7 @@ void fgDEM::fit( double error, fgBUCKET *p ) {
|
||||||
|
|
||||||
while ( start < colmax ) {
|
while ( start < colmax ) {
|
||||||
end = start + 1;
|
end = start + 1;
|
||||||
good_fit = 1;
|
good_fit = true;
|
||||||
|
|
||||||
x[(end - start) - 1] = 0.0 + ( start * col_step );
|
x[(end - start) - 1] = 0.0 + ( start * col_step );
|
||||||
y[(end - start) - 1] = dem_data[start][row];
|
y[(end - start) - 1] = dem_data[start][row];
|
||||||
|
@ -585,7 +586,7 @@ void fgDEM::fit( double error, fgBUCKET *p ) {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( max_error > error ) {
|
if ( max_error > error ) {
|
||||||
good_fit = 0;
|
good_fit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
end++;
|
end++;
|
||||||
|
@ -818,6 +819,9 @@ fgDEM::~fgDEM( void ) {
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.15 1998/09/21 20:53:59 curt
|
||||||
|
// minor tweaks to clean a few additional things up after the rewrite.
|
||||||
|
//
|
||||||
// Revision 1.14 1998/09/19 17:59:45 curt
|
// Revision 1.14 1998/09/19 17:59:45 curt
|
||||||
// Use c++ streams (fg_gzifstream). Also converted many character arrays to
|
// Use c++ streams (fg_gzifstream). Also converted many character arrays to
|
||||||
// the string class.
|
// the string class.
|
||||||
|
|
Loading…
Add table
Reference in a new issue