当前位置: 首页>>代码示例>>C++>>正文


C++ DEBUG_EXIT函数代码示例

本文整理汇总了C++中DEBUG_EXIT函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUG_EXIT函数的具体用法?C++ DEBUG_EXIT怎么用?C++ DEBUG_EXIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DEBUG_EXIT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: dgnss_init

void dgnss_init(u8 num_sats, sdiff_t *sdiffs, double receiver_ecef[3])
{
  DEBUG_ENTRY();

  sdiff_t corrected_sdiffs[num_sats];
  init_sats_management(&sats_management, num_sats, sdiffs, corrected_sdiffs);

  create_ambiguity_test(&ambiguity_test);

  if (num_sats <= 1) {
    DEBUG_EXIT();
    return;
  }

  double dd_measurements[2*(num_sats-1)];
  make_measurements(num_sats-1, corrected_sdiffs, dd_measurements);

  set_nkf(
    &nkf,
    dgnss_settings.amb_drift_var,
    dgnss_settings.phase_var_kf, dgnss_settings.code_var_kf,
    dgnss_settings.amb_init_var,
    num_sats, corrected_sdiffs, dd_measurements, receiver_ecef
  );

  DEBUG_EXIT();
}
开发者ID:elecboy,项目名称:libswiftnav,代码行数:27,代码来源:dgnss_management.c

示例2: dgnss_baseline

/** Finds the baseline using low latency sdiffs.
 * The low latency sdiffs are not guaranteed to match up with either the
 * amb_test's or the float sdiffs, and thus care must be taken to transform them
 * accordingly and check their availability in those sat sets.
 *
 * \param num_sdiffs  The number of low-latency sdiffs provided.
 * \param sdiffs      The low-latency sdiffs.
 * \param ref_ecef    The referece position for the baseline.
 *                    (TODO is this the local or remote receiver position?)
 * \param s           Current ambiguity test state.
 * \param num_used    Output number of sdiffs actually used in the baseline
 *                    estimate.
 * \param b           Output baseline.
 * \param disable_raim Flag to turn off raim checks/repair.
 * \param raim_threshold raim check threshold
 * \return  1 if we are using an IAR resolved baseline.
 *          2 if we are using a float baseline.
 *         -1 if we can't give a baseline.
 */
s8 dgnss_baseline(u8 num_sdiffs, const sdiff_t *sdiffs,
                  const double ref_ecef[3], const ambiguity_state_t *s,
                  u8 *num_used, double b[3],
                  bool disable_raim, double raim_threshold)
{
  s8 ret = baseline(num_sdiffs, sdiffs, ref_ecef, &s->fixed_ambs, num_used, b,
                    disable_raim, raim_threshold);
  if (ret >= 0) {
    if (ret == 1) /* TODO: Export this rather than just printing */
      log_warn("dgnss_baseline: Fixed baseline RAIM repair");
    log_debug("fixed solution");
    DEBUG_EXIT();
    return 1;
  }
  /* We weren't able to get an IAR resolved baseline, check if we can get a
   * float baseline. */
  if ((ret = baseline(num_sdiffs, sdiffs, ref_ecef, &s->float_ambs, num_used, b,
                      disable_raim, raim_threshold))
        >= 0) {
    if (ret == 1) /* TODO: Export this rather than just printing */
      log_warn("dgnss_baseline: Float baseline RAIM repair");
    log_debug("float solution");
    DEBUG_EXIT();
    return 2;
  }
  log_debug("no baseline solution");
  DEBUG_EXIT();
  return ret;
}
开发者ID:elecboy,项目名称:libswiftnav,代码行数:48,代码来源:dgnss_management.c

示例3: dgnss_low_latency_baseline

/** Finds the baseline using low latency sdiffs.
 * The low latency sdiffs are not guaranteed to match up with either the
 * amb_test's or the float sdiffs, and thus care must be taken to transform them
 * accordingly and check their availability in those sat sets.
 *
 * \param num_sdiffs  The number of low-latency sdiffs provided.
 * \param sdiffs      The low-latency sdiffs.
 * \param ref_ecef    The referece position for the baseline.
 *                    (TODO is this the local or remote receiver position?)
 * \param num_used    Output number of sdiffs actually used in the baseline
 *                    estimate.
 * \param b           Output baseline.
 * \return  1 if we are using an IAR resolved baseline.
 *          2 if we are using a float baseline.
 *         -1 if we can't give a baseline.
 */
s8 dgnss_low_latency_baseline(u8 num_sdiffs, sdiff_t *sdiffs,
                              double ref_ecef[3], u8 *num_used, double b[3])
{
  DEBUG_ENTRY();
  if (num_sdiffs < 4 || sats_management.num_sats < 4) {
    /* For a position solution, we need at least 4 sats. That means we must
     * have at least 4 sats in common between what the filters are tracking and
     * the sdiffs we give this function. If num_sdiffs, or the number of KF
     * sats is less than 4, this criterion cannot be satisfied. */
    log_debug("Low latency solution can't be computed. Too few observations"
              " or too few sats in the current filter.\n");
    DEBUG_EXIT();
    return -1;
  }
  if (0 == _dgnss_low_latency_IAR_baseline(num_sdiffs, sdiffs,
                                  ref_ecef, num_used, b)) {
    log_debug("low latency IAR solution\n");
    DEBUG_EXIT();
    return 1;
  }
  /* if we get here, we weren't able to get an IAR resolved baseline.
   * Check if we can get a float baseline. */
  s8 float_ret_code = _dgnss_low_latency_float_baseline(num_sdiffs, sdiffs,
                                              ref_ecef, num_used, b);
  if (float_ret_code == 0) {
    log_debug("low latency float solution\n");
    DEBUG_EXIT();
    return 2;
  }
  log_debug("no low latency solution\n");
  DEBUG_EXIT();
  return -1;
}
开发者ID:Jaganathan83,项目名称:libswiftnav,代码行数:49,代码来源:dgnss_management.c

示例4: _dgnss_low_latency_float_baseline

/** Constructs a low latency float baseline measurement.
 * The sdiffs have no particular reason (other than a general tendency
 * brought by hysteresis) to match up with the float filter's sats, so we have
 * to check if we can solve. For now, unless the sdiffs are a superset of the
 * float sats, we don't solve.
 *
 * Requires num_sdiffs >= 4 and (global) sats_management.num_sats >= 4.
 *
 * \TODO solve whenever the information is there.
 *
 * \TODO since we're now using make_dd_measurements_and_sdiffs outside of the
 * amb_test context, pull it into another file.
 *
 * \TODO pull this function into the KF, once we pull the sats_management struct
 *      into the KF too. When we do, do the same for the IAR low lat solution.
 *
 * \param num_sdiffs  The number of sdiffs input. Must be >= 4.
 * \param sdiffs      The sdiffs used to measure. (These should be a superset
 *                    of the float sats).
 * \param ref_ecef    The reference position used for solving, and making
 *                    observation matrices.
 * \param num_used    The number of sats actually used to compute the baseline.
 * \param b           The baseline computed.
 * \return -1 if it can't solve.
 *          0 If it can solve.
 */
s8 _dgnss_low_latency_float_baseline(u8 num_sdiffs, sdiff_t *sdiffs,
                                     double ref_ecef[3], u8 *num_used, double b[3])
{
  DEBUG_ENTRY();
  if (num_sdiffs < 4 || sats_management.num_sats < 4) {
    /* For a position solution, we need at least 4 sats. That means we must
     * have at least 4 sats in common between what the KF is tracking and
     * the sdiffs we give this function. If either is less than 4,
     * this criterion cannot be satisfied. */
    log_debug("Low latency solution can't be computed. Too few observations"
              " or too few sats in the current filter.\n");
    DEBUG_EXIT();
    return -1;
  }

  double float_dd_measurements[2 * (sats_management.num_sats - 1)];
  sdiff_t float_sdiffs[sats_management.num_sats];
  s8 can_make_obs = make_dd_measurements_and_sdiffs(sats_management.prns[0],
             &sats_management.prns[1], sats_management.num_sats - 1,
             num_sdiffs, sdiffs,
             float_dd_measurements, float_sdiffs);
  if (can_make_obs == -1) {
    log_debug("make_float_dd_measurements_and_sdiffs has error code -1\n");
    DEBUG_EXIT();
    return -1;
  }
  least_squares_solve_b(&nkf, float_sdiffs, float_dd_measurements,
                        ref_ecef, b);
  *num_used = sats_management.num_sats;
  DEBUG_EXIT();
  return 0;
}
开发者ID:Jaganathan83,项目名称:libswiftnav,代码行数:58,代码来源:dgnss_management.c

示例5: rebase_sats_management

/** Updates sats to the new measurements' sat set
 */
s8 rebase_sats_management(sats_management_t *sats_management,
                          const u8 num_sdiffs, const sdiff_t *sdiffs, sdiff_t *sdiffs_with_ref_first)
{
  DEBUG_ENTRY();

  s8 return_code;
  u8 ref_prn;

  if (sats_management->num_sats <= 1) {
    // Need to init first.
    init_sats_management(sats_management, num_sdiffs, sdiffs, 0);
  }

  // Check if old reference is in sdiffs
  if (bsearch(&(sats_management->prns[0]), sdiffs, num_sdiffs, sizeof(sdiff_t), &sdiff_search_prn)) {
    ref_prn = sats_management->prns[0];
    return_code = OLD_REF;
  }
  else {
    sdiff_t intersection_sats[num_sdiffs];
    u8 num_intersection = intersect_sats(sats_management->num_sats-1, num_sdiffs,
                                         &(sats_management->prns[1]), sdiffs, intersection_sats);
    if (num_intersection < INTERSECTION_SATS_THRESHOLD_SIZE) {
      DEBUG_EXIT();
      return NEW_REF_START_OVER;
    }
    else {
      if (DEBUG) {
        printf("sdiff prns= {");
        for (u8 yo_mama=0; yo_mama< num_sdiffs; yo_mama++) {
          printf("%u, ", sdiffs[yo_mama].prn);
        }
        printf("}\n");
        printf("sats_man_prns= {");
        for (u8 so_fetch=0; so_fetch < sats_management->num_sats; so_fetch++) {
          printf("%u, ", sats_management->prns[so_fetch]);
        }
        printf("}\n");
        printf("num intersect_sats= %u\nintersection= {", num_intersection);
        for (u8 bork=0; bork<num_intersection; bork++) {
          printf("%u, ", intersection_sats[bork].prn);
        }
        printf("}\n");
      }
      ref_prn = choose_reference_sat(num_intersection, intersection_sats);
      return_code = NEW_REF;
    }
  }
  set_reference_sat(ref_prn, sats_management,
                    num_sdiffs, sdiffs, sdiffs_with_ref_first);

  DEBUG_EXIT();
  return return_code;
}
开发者ID:jacobmcnamee,项目名称:libswiftnav,代码行数:56,代码来源:sats_management.c

示例6: calculateExonViewHighlightBoxBorders

void calculateExonViewHighlightBoxBorders(GtkWidget *exonView)
{
    DEBUG_ENTER("calculateExonViewHighlightBoxBorders");

    ExonViewProperties *properties = exonViewGetProperties(exonView);
    BlxViewContext *bc = bigPictureGetContext(properties->bigPicture);

    /* Get the big picture display range in dna coords */
    IntRange bpRange;
    convertDisplayRangeToDnaRange(bigPictureGetDisplayRange(properties->bigPicture), bc->seqType, bc->numFrames, bc->displayRev, &bc->refSeqRange, &bpRange);

    /* Get the detail view display range in dna coords */
    IntRange dvRange;
    GtkWidget *detailView = bigPictureGetDetailView(properties->bigPicture);
    convertDisplayRangeToDnaRange(detailViewGetDisplayRange(detailView), bc->seqType, bc->numFrames, bc->displayRev, &bc->refSeqRange, &dvRange);

    /* Calculate how many pixels from the left edge of the widget to the first base in the range. */
    const int x1 = convertBaseIdxToRectPos(dvRange.min, &properties->exonViewRect, &bpRange, TRUE, bc->displayRev, TRUE);
    const int x2 = convertBaseIdxToRectPos(dvRange.max + 1, &properties->exonViewRect, &bpRange, TRUE, bc->displayRev, TRUE);

    properties->highlightRect.x = min(x1, x2);
    properties->highlightRect.y = 0;

    properties->highlightRect.width = abs(x1 - x2);
    properties->highlightRect.height = exonView->allocation.height;

    DEBUG_EXIT("calculateExonViewHighlightBoxBorders returning");
}
开发者ID:douglasgscofield,项目名称:seqtools-4.28,代码行数:28,代码来源:exonview.c

示例7: _svg_android_end_group

svg_status_t
_svg_android_end_group (void *closure, double opacity)
{
	svg_android_t *svg_android = closure;

	DEBUG_ENTRY("end_group");
	if (opacity != 1.0) {
		svg_android->state->matrix = ANDROID_IDENTITY_MATRIX(svg_android);
		svg_android->state->matrix =
			(*(svg_android->env))->NewGlobalRef(
				svg_android->env, svg_android->state->matrix);

		ANDROID_DRAW_BITMAP(svg_android, svg_android->state->offscreen_bitmap, svg_android->state->matrix);

		(*(svg_android->env))->DeleteGlobalRef(svg_android->env, svg_android->state->offscreen_bitmap);
		svg_android->state->offscreen_bitmap = NULL;
	}

	_svg_android_pop_state (svg_android);

	ANDROID_RESTORE(svg_android);
	DEBUG_EXIT("end_group");

	return SVG_ANDROID_STATUS_SUCCESS;
}
开发者ID:huzongyao,项目名称:ImageViewSvg,代码行数:25,代码来源:svg_android_render.c

示例8: _svg_android_set_stroke_line_cap

svg_status_t
_svg_android_set_stroke_line_cap (void *closure, svg_stroke_line_cap_t line_cap)
{
	svg_android_t *svg_android = closure;

	DEBUG_ENTRY("set_stroke_line_cap");

	switch (line_cap) {
	case SVG_STROKE_LINE_CAP_BUTT:
		ANDROID_SET_STROKE_CAP(svg_android, svg_android->state->paint, 0);
		break;
	case SVG_STROKE_LINE_CAP_ROUND:
		ANDROID_SET_STROKE_CAP(svg_android, svg_android->state->paint, 1);
		break;
	case SVG_STROKE_LINE_CAP_SQUARE:
		ANDROID_SET_STROKE_CAP(svg_android, svg_android->state->paint, 2);
		break;
	}

	svg_android->state->line_cap = line_cap;

	DEBUG_EXIT("set_stroke_line_cap");

	return SVG_ANDROID_STATUS_SUCCESS;
}
开发者ID:huzongyao,项目名称:ImageViewSvg,代码行数:25,代码来源:svg_android_render.c

示例9: _svg_android_render_line

svg_status_t
_svg_android_render_line (void *closure,
			  svg_length_t *x1_len, svg_length_t *y1_len,
			  svg_length_t *x2_len, svg_length_t *y2_len)
{
	svg_android_t *svg_android = closure;
	svg_status_t status;
	double x1, y1, x2, y2;

	DEBUG_ENTRY("render_line");
	_svg_android_length_to_pixel (svg_android, x1_len, &x1);
	_svg_android_length_to_pixel (svg_android, y1_len, &y1);
	_svg_android_length_to_pixel (svg_android, x2_len, &x2);
	_svg_android_length_to_pixel (svg_android, y2_len, &y2);

	status = _svg_android_move_to (svg_android, x1, y1);
	if (status)
		return status;

	status = _svg_android_line_to (svg_android, x2, y2);
	if (status)
		return status;

	status = _svg_android_render_path (svg_android);
	if (status)
		return status;

	DEBUG_EXIT("render_line");
	return SVG_ANDROID_STATUS_SUCCESS;

}
开发者ID:huzongyao,项目名称:ImageViewSvg,代码行数:31,代码来源:svg_android_render.c

示例10: _svg_android_transform

svg_status_t
_svg_android_transform (void *closure,
			double xx, double yx,
			double xy, double yy,
			double x0, double y0)
{
	svg_android_t *svg_android = closure;

	jobject new_matrix;
	jobject old_matrix = svg_android->state->matrix;
	
	DEBUG_ENTRY("transform");
	new_matrix = ANDROID_MATRIX_INIT(svg_android, xx, yx, xy, yy, x0, y0);

	ANDROID_MATRIX_MULTIPLY(svg_android, new_matrix, old_matrix);

	svg_android->state->matrix =
		(*(svg_android->env))->NewGlobalRef(
			svg_android->env, new_matrix);
	(*(svg_android->env))->DeleteGlobalRef(svg_android->env, old_matrix);

	DEBUG_EXIT("transform");
	
	return SVG_ANDROID_STATUS_SUCCESS;
}
开发者ID:huzongyao,项目名称:ImageViewSvg,代码行数:25,代码来源:svg_android_render.c

示例11: _svg_android_begin_group

svg_status_t
_svg_android_begin_group (void *closure, double opacity)
{
	svg_android_t *svg_android = closure;
	jobject offscreen_bitmap = NULL;

	DEBUG_ENTRY("begin_group");
	
	ANDROID_SAVE(svg_android);
	
	if (opacity != 1.0) {
		opacity *= 255;
		jint opacity_i = opacity;
		opacity_i = ((opacity_i & 0xff) << 24) & 0xffffffff;
		
		offscreen_bitmap = ANDROID_CREATE_BITMAP(svg_android,
							 svg_android->state->viewport_width,
							 svg_android->state->viewport_height);
		ANDROID_FILL_BITMAP(svg_android, offscreen_bitmap, opacity_i);
		
		svg_android->state->offscreen_bitmap = offscreen_bitmap;
	} else svg_android->state->offscreen_bitmap = NULL;

	_svg_android_push_state (svg_android, offscreen_bitmap);

	DEBUG_EXIT("begin_group");
	return SVG_ANDROID_STATUS_SUCCESS;
}
开发者ID:huzongyao,项目名称:ImageViewSvg,代码行数:28,代码来源:svg_android_render.c

示例12: init_sats_management

void init_sats_management(sats_management_t *sats_management,
                          const u8 num_sdiffs, const sdiff_t *sdiffs, sdiff_t *sdiffs_with_ref_first)
{
  DEBUG_ENTRY();

  if (num_sdiffs == 0) {
    sats_management->num_sats = 0;
    DEBUG_EXIT();
    return;
  }

  u8 ref_prn = choose_reference_sat(num_sdiffs, sdiffs);
  set_reference_sat_and_prns(ref_prn, sats_management,
                             num_sdiffs, sdiffs, sdiffs_with_ref_first);
  DEBUG_EXIT();
}
开发者ID:jacobmcnamee,项目名称:libswiftnav,代码行数:16,代码来源:sats_management.c

示例13: dgnss_update_sats

static void dgnss_update_sats(u8 num_sdiffs, double receiver_ecef[3],
                              sdiff_t *sdiffs_with_ref_first,
                              double *dd_measurements)
{
  DEBUG_ENTRY();

  (void)dd_measurements;
  gnss_signal_t new_sids[num_sdiffs];
  sdiffs_to_sids(num_sdiffs, sdiffs_with_ref_first, new_sids);

  gnss_signal_t old_sids[MAX_CHANNELS];
  memcpy(old_sids, sats_management.sids, sats_management.num_sats * sizeof(gnss_signal_t));

  if (!sids_match(&old_sids[1], num_sdiffs-1, &sdiffs_with_ref_first[1])) {
    u8 ndx_of_intersection_in_old[sats_management.num_sats];
    u8 ndx_of_intersection_in_new[sats_management.num_sats];
    ndx_of_intersection_in_old[0] = 0;
    ndx_of_intersection_in_new[0] = 0;
    u8 num_intersection_sats = dgnss_intersect_sats(
        sats_management.num_sats-1, &old_sids[1],
        num_sdiffs-1, &sdiffs_with_ref_first[1],
        &ndx_of_intersection_in_old[1],
        &ndx_of_intersection_in_new[1]) + 1;

    set_nkf_matrices(
      &nkf,
      dgnss_settings.phase_var_kf, dgnss_settings.code_var_kf,
      num_sdiffs, sdiffs_with_ref_first, receiver_ecef
    );

    if (num_intersection_sats < sats_management.num_sats) { /* we lost sats */
      nkf_state_projection(&nkf,
                           sats_management.num_sats-1,
                           num_intersection_sats-1,
                           &ndx_of_intersection_in_old[1]);
    }
    if (num_intersection_sats < num_sdiffs) { /* we gained sats */
      double simple_estimates[num_sdiffs-1];
      dgnss_simple_amb_meas(num_sdiffs, sdiffs_with_ref_first,
                            simple_estimates);
      nkf_state_inclusion(&nkf,
                          num_intersection_sats-1,
                          num_sdiffs-1,
                          &ndx_of_intersection_in_new[1],
                          simple_estimates,
                          dgnss_settings.new_int_var);
    }

    update_sats_sats_management(&sats_management, num_sdiffs-1, &sdiffs_with_ref_first[1]);
  }
  else {
    set_nkf_matrices(
      &nkf,
      dgnss_settings.phase_var_kf, dgnss_settings.code_var_kf,
      num_sdiffs, sdiffs_with_ref_first, receiver_ecef
    );
  }

  DEBUG_EXIT();
}
开发者ID:elecboy,项目名称:libswiftnav,代码行数:60,代码来源:dgnss_management.c

示例14: onSizeAllocateExonView

static void onSizeAllocateExonView(GtkWidget *exonView, GtkAllocation *allocation, gpointer data)
{
    DEBUG_ENTER("onSizeAllocateExonView");

    calculateExonViewBorders(exonView);

    DEBUG_EXIT("onSizeAllocateExonView returning");
}
开发者ID:douglasgscofield,项目名称:seqtools-4.28,代码行数:8,代码来源:exonview.c

示例15: calculateExonViewHeight

void calculateExonViewHeight(GtkWidget *exonView)
{
    DEBUG_ENTER("calculateExonViewHeight");

    ExonViewProperties *properties = exonViewGetProperties(exonView);

    BigPictureProperties *bpProperties = bigPictureGetProperties(properties->bigPicture);
    const IntRange* const displayRange = &bpProperties->displayRange;

    BlxViewContext *bc = blxWindowGetContext(bpProperties->blxWindow);

    /* Calculate the height based on how many exon lines will actually be drawn */
    int numExons = 0;
    int maxExons = properties->expanded ? UNSET_INT : 1; /* unset means no limit */

    /* Loop through all sequences */
    GList *seqItem = bc->matchSeqs;

    for ( ; seqItem; seqItem = seqItem->next)
    {
        /* Loop through all msps */
        const BlxSequence *seq = (BlxSequence*)(seqItem->data);
        GList *mspItem = seq->mspList;

        for ( ; mspItem; mspItem = mspItem->next)
        {
            const MSP *msp = (const MSP*)(mspItem->data);

            if (showMspInExonView(msp, properties->currentStrand, bc))
            {
                const IntRange* const mspDisplayRange = mspGetDisplayRange(msp);

                if (rangesOverlap(mspDisplayRange, displayRange))
                {
                    ++numExons;
                    break; /* break inner loop and move to next sequence */
                }
            }
        }

        /* Break after we've found the maximum number of lines, if a max is specified */
        if (maxExons != UNSET_INT && numExons >= maxExons)
        {
            break;
        }
    }

    const int newHeight = (numExons * (properties->exonHeight + properties->yPad)) + (2 * properties->yPad);

    if (newHeight != properties->exonViewRect.height)
    {
        DEBUG_OUT("Setting new height = %d\n", newHeight);
        properties->exonViewRect.height = newHeight;
        gtk_widget_set_size_request(exonView, -1, properties->exonViewRect.height);
    }

    DEBUG_EXIT("calculateExonViewHeight returning");
}
开发者ID:douglasgscofield,项目名称:seqtools-4.28,代码行数:58,代码来源:exonview.c


注:本文中的DEBUG_EXIT函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。