Skip to content

Commit

Permalink
Per issue #2476, added new function get_diag_val() that will retrieve…
Browse files Browse the repository at this point in the history
… a value based on the diag name. SL ci-skip-all
  • Loading branch information
Seth Linden committed Sep 22, 2023
1 parent 5840c93 commit 20d2e25
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/libcode/vx_tc_util/track_point.cc
Original file line number Diff line number Diff line change
Expand Up @@ -730,3 +730,18 @@ void TrackPoint::add_diag_value(double val) {
}

////////////////////////////////////////////////////////////////////////

double TrackPoint::get_diag_val(const StringArray &diag_names, const string cur_diag_name) const {

int i;
double diag_val;

if(diag_names.has(cur_diag_name, i))
diag_val = DiagVal[i];
else
diag_val = bad_data_double;

return(diag_val);
}

////////////////////////////////////////////////////////////////////////
3 changes: 2 additions & 1 deletion src/libcode/vx_tc_util/track_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ class TrackPoint {
bool is_match(const ATCFTrackLine &) const;
void clear_diag_value();
void add_diag_value(double);

double get_diag_val(const StringArray &, const string) const;

};

////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 20d2e25

Please sign in to comment.