Fahim Dalvi:
Allow setting the maximum runway slope on the command line.
This commit is contained in:
parent
868fa76d23
commit
4f815e8703
2 changed files with 5 additions and 2 deletions
|
@ -36,7 +36,7 @@ const double coarse_grid = 300.0;
|
|||
const double max_clamp = 100.0;
|
||||
|
||||
// maximum slope (rise/run) allowed on an airport surface
|
||||
const double slope_max = 0.02;
|
||||
extern double slope_max; // = 0.02;
|
||||
const double slope_eps = 0.00001;
|
||||
|
||||
// nurbs query/search epsilon
|
||||
|
|
|
@ -60,6 +60,7 @@ using std::endl;
|
|||
|
||||
|
||||
int nudge = 10;
|
||||
double slope_max = 0.2;
|
||||
|
||||
static int is_in_range( string_list & runway_list, float min_lat, float max_lat, float min_lon, float max_lon );
|
||||
|
||||
|
@ -69,7 +70,7 @@ static void usage( int argc, char **argv ) {
|
|||
"Usage " << argv[0] << " --input=<apt_file> "
|
||||
<< "--work=<work_dir> [ --start-id=abcd ] [ --nudge=n ] "
|
||||
<< "[--min-lon=<deg>] [--max-lon=<deg>] [--min-lat=<deg>] [--max-lat=<deg>] "
|
||||
<< "[--clear-dem-path] [--dem-path=<path>] "
|
||||
<< "[--clear-dem-path] [--dem-path=<path>] [--max-slope=<decimal>] "
|
||||
<< "[ --airport=abcd ] [--tile=<tile>] [--chunk=<chunk>] [--verbose] [--help]");
|
||||
}
|
||||
|
||||
|
@ -186,6 +187,8 @@ int main( int argc, char **argv ) {
|
|||
elev_src.push_back( arg.substr(11) );
|
||||
} else if ( (arg.find("--verbose") == 0) || (arg.find("-v") == 0) ) {
|
||||
sglog().setLogLevels( SG_GENERAL, SG_BULK );
|
||||
} else if ( (arg.find("--max-slope=") == 0) ) {
|
||||
slope_max = atof( arg.substr(12).c_str() );
|
||||
} else if ( (arg.find("--help") == 0) || (arg.find("-h") == 0) ) {
|
||||
help( argc, argv, elev_src );
|
||||
exit(-1);
|
||||
|
|
Loading…
Add table
Reference in a new issue