Skip to content

Commit

Permalink
apps/radar/Qucid - working on terrain params
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-dixon committed Feb 20, 2024
1 parent e6d9922 commit 46d010c
Show file tree
Hide file tree
Showing 16 changed files with 159 additions and 457 deletions.
13 changes: 7 additions & 6 deletions codebase/apps/radar/src/Qucid/Args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include "Args.hh"
#include "Params.hh"
#include "LegacyParams.hh"
#include "cidd.h"
#include <cstring>
#include <cstdlib>
Expand Down Expand Up @@ -349,7 +350,7 @@ int Args::_processLegacyArgs(int argc, const char **argv)
const char *token;
UTIMstruct temp_utime;

gd.db_name = strdup(""); /* Set the default data base name */
// gd.db_name = strdup(""); /* Set the default data base name */
TDRP_str_replace(&_params.http_proxy_url, "");

gd.argv = (char **) argv;
Expand Down Expand Up @@ -379,17 +380,17 @@ int Args::_processLegacyArgs(int argc, const char **argv)

if (ii < argc - 1) {
const char *optarg = argv[++ii];
gd.db_name = strdup(optarg);
// gd.db_name = strdup(optarg);
_usingLegacyParams = true;
_legacyParamsPath = gd.db_name;
_legacyParamsPath = strdup(optarg);
} else {
iret = -1;
}

} else if (!strcmp(argv[ii], "-print_legacy_params")) {
load_db_data("");
fputs(gd.db_data,stdout);

LegacyParams lparams;
lparams.printLegacyDefaults(cout);
exit(0);

} else if (!strcmp(argv[ii], "-vvv")) {
Expand Down
34 changes: 34 additions & 0 deletions codebase/apps/radar/src/Qucid/LegacyParams.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2926,3 +2926,37 @@ int LegacyParams::_readImageGenTdrp()
return 0;

}

/////////////////////////////////////////////////////////////////////////////
// print the legacy params default

void LegacyParams::printLegacyDefaults(ostream &out)
{

// Generate the full params string. The non-TDRP portions are kept in
// static strings while the TDRP portions are loaded from the default
// parameters

Cgui_P gui_P;
Csyprod_P syprod_P;
Cdraw_P draw_P;
Cimages_P images_P;
Cterrain_P terrain_P;
Croutes_P routes_P;

string params_text = ParamsTextMasterHeader;
params_text += _getDefaultTdrpParams("GUI_CONFIG", &gui_P);
params_text += ParamsTextGrids;
params_text += ParamsTextWinds;
params_text += ParamsTextMaps;
params_text += ParamsTextMainParams;
params_text += _getDefaultTdrpParams("DRAW_EXPORT", &draw_P);
params_text += _getDefaultTdrpParams("IMAGE_GENERATION", &images_P);
params_text += _getDefaultTdrpParams("SYMPRODS", &syprod_P);
params_text += _getDefaultTdrpParams("TERRAIN", &terrain_P);
params_text += _getDefaultTdrpParams("ROUTE_WINDS", &routes_P);

out << params_text << endl;

}

4 changes: 4 additions & 0 deletions codebase/apps/radar/src/Qucid/LegacyParams.hh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public:
int translateToTdrp(const string &legacyParamsPath,
const string &tdrpParamsPath);

// print the defaults for legacy params

void printLegacyDefaults(ostream &out);

private:

static const int MAX_PARSE_FIELDS = 32;
Expand Down
2 changes: 0 additions & 2 deletions codebase/apps/radar/src/Qucid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ NORM_SRCS = \
cidd_coords.cc \
cidd_font.cc \
cidd_init.cc \
cidd_params.cc \
cidd_remote_commands.cc \
cidd_reset.cc \
cidd_signals.cc \
Expand Down Expand Up @@ -165,7 +164,6 @@ NORM_SRCS = \
movie_pu_proc.cc \
overlay_init.cc \
page_pu_proc.cc \
process_args.cc \
render_azimuths.cc \
render_bottom_margin.cc \
render_cart_grid.cc \
Expand Down
Loading

0 comments on commit 46d010c

Please sign in to comment.