@@ -324,7 +324,7 @@ void update_ambiguity_test(double ref_ecef[3], double phase_var, double code_var
324324
325325 /* Error */
326326 if (valid_sdiffs != 0 ) {
327- log_error ("update_ambiguity_test: invalid sdiffs. return code: %i\n " , valid_sdiffs );
327+ log_error ("update_ambiguity_test: invalid sdiffs. return code: %i" , valid_sdiffs );
328328 DEBUG_EXIT ();
329329 return ;
330330 }
@@ -509,7 +509,7 @@ void test_ambiguities(ambiguity_test_t *amb_test, double *dd_measurements)
509509 memory_pool_filter (amb_test -> pool , (void * ) & x , & update_and_get_max_ll );
510510 memory_pool_filter (amb_test -> pool , (void * ) & x , & filter_and_renormalize );
511511 if (memory_pool_empty (amb_test -> pool )) {
512- log_debug ("Ambiguity pool empty\n " );
512+ log_debug ("Ambiguity pool empty" );
513513 /* Initialize pool with single element with num_dds = 0, i.e.
514514 * zero length N vector, i.e. no satellites. When we take the
515515 * product of this single element with the set of new satellites
@@ -583,7 +583,7 @@ s8 sats_match(const ambiguity_test_t *amb_test, const u8 num_sdiffs, const sdiff
583583 printf ("}\n" );
584584 }
585585 if (amb_test -> sats .num_sats != num_sdiffs ) {
586- log_debug ("sats don't match (different length)\n " );
586+ log_debug ("sats don't match (different length)" );
587587 DEBUG_EXIT ();
588588 return 0 ;
589589 }
@@ -592,7 +592,7 @@ s8 sats_match(const ambiguity_test_t *amb_test, const u8 num_sdiffs, const sdiff
592592 u8 j = 0 ;
593593 for (u8 i = 1 ; i < amb_test -> sats .num_sats ; i ++ ) { //TODO will not having a j condition cause le fault du seg?
594594 if (j >= num_sdiffs ) {
595- log_debug ("sats don't match\n " );
595+ log_debug ("sats don't match" );
596596 DEBUG_EXIT ();
597597 return 0 ;
598598 }
@@ -604,7 +604,7 @@ s8 sats_match(const ambiguity_test_t *amb_test, const u8 num_sdiffs, const sdiff
604604 i -- ;
605605 }
606606 else {
607- log_debug ("sats don't match\n " );
607+ log_debug ("sats don't match" );
608608 DEBUG_EXIT ();
609609 return 0 ;
610610 }
@@ -675,7 +675,7 @@ u8 ambiguity_update_reference(ambiguity_test_t *amb_test, const u8 num_sdiffs, c
675675
676676 s8 sats_management_code = rebase_sats_management (& amb_test -> sats , num_sdiffs , sdiffs , sdiffs_with_ref_first );
677677 if (sats_management_code != OLD_REF ) {
678- log_debug ("updating iar reference sat\n " );
678+ log_debug ("updating iar reference sat" );
679679 changed_ref = 1 ;
680680 if (sats_management_code == NEW_REF_START_OVER ) {
681681 create_ambiguity_test (amb_test );
@@ -752,7 +752,7 @@ u8 ambiguity_sat_projection(ambiguity_test_t *amb_test, const u8 num_dds_in_inte
752752
753753 u8 num_dds_before_proj = CLAMP_DIFF (amb_test -> sats .num_sats , 1 );
754754 if (num_dds_before_proj == num_dds_in_intersection ) {
755- log_debug ("no need for projection\n " );
755+ log_debug ("no need for projection" );
756756 DEBUG_EXIT ();
757757 return 0 ;
758758 }
@@ -761,13 +761,13 @@ u8 ambiguity_sat_projection(ambiguity_test_t *amb_test, const u8 num_dds_in_inte
761761 memcpy (intersection .intersection_ndxs , dd_intersection_ndxs , num_dds_in_intersection * sizeof (u8 ));
762762
763763
764- log_info ("IAR: %" PRIu32 " hypotheses before projection\n " , memory_pool_n_allocated (amb_test -> pool ));
764+ log_info ("IAR: %" PRIu32 " hypotheses before projection" , memory_pool_n_allocated (amb_test -> pool ));
765765 memory_pool_group_by (amb_test -> pool ,
766766 & intersection , & projection_comparator ,
767767 & intersection , sizeof (intersection ),
768768 & projection_aggregator );
769- log_info ("IAR: updates to %" PRIu32 "\n " , memory_pool_n_allocated (amb_test -> pool ));
770- log_info ("After projection, num_sats = %d\n " , num_dds_in_intersection + 1 );
769+ log_info ("IAR: updates to %" PRIu32 "" , memory_pool_n_allocated (amb_test -> pool ));
770+ log_info ("After projection, num_sats = %d" , num_dds_in_intersection + 1 );
771771 u8 work_prns [MAX_CHANNELS ];
772772 memcpy (work_prns , amb_test -> sats .prns , amb_test -> sats .num_sats * sizeof (u8 ));
773773 for (u8 i = 0 ; i < num_dds_in_intersection ; i ++ ) {
@@ -902,7 +902,7 @@ static void remap_prns(ambiguity_test_t *amb_test, u8 ref_prn,
902902 j ++ ;
903903 k ++ ;
904904 } else {
905- log_error ("remap_prns: impossible condition reached.\n " );
905+ log_error ("remap_prns: impossible condition reached." );
906906 printf ("old_prns = [" );
907907 for (u8 ii = 0 ; ii < x -> old_dim ; ii ++ ) {
908908 printf ("%d, " ,old_prns [ii ]);
@@ -1001,8 +1001,8 @@ static s32 add_sats(ambiguity_test_t *amb_test,
10011001 & intersection_hypothesis_prod );
10021002 (void ) count ;
10031003 s32 num_hyps = memory_pool_n_allocated (amb_test -> pool );
1004- log_info ("IAR: updates to %" PRIu32 "\n " , num_hyps );
1005- log_info ("add_sats. num sats: %i\n " , amb_test -> sats .num_sats );
1004+ log_info ("IAR: updates to %" PRIu32 "" , num_hyps );
1005+ log_info ("add_sats. num sats: %i" , amb_test -> sats .num_sats );
10061006 return num_hyps ;
10071007}
10081008
@@ -1071,18 +1071,18 @@ static u8 inclusion_loop_body(
10711071 compute_Z (num_current_dds , num_dds_to_add , x -> Z1 , x -> Z2_inv , x -> Z );
10721072
10731073 if (full_size <= max_num_hyps ) {
1074- log_debug ("BRANCH 1: num dds: %i. full size: %" PRIu32 ", itr size: %" PRIu32 "\n " , num_dds_to_add , full_size , box_size );
1074+ log_debug ("BRANCH 1: num dds: %i. full size: %" PRIu32 ", itr size: %" PRIu32 "" , num_dds_to_add , full_size , box_size );
10751075 /* The hypotheses generated for these double-differences fit. */
10761076 return 1 ;
10771077 } else if (box_size * current_num_hyps <= max_iteration_size ) {
1078- log_debug ("BRANCH 2: num dds: %i. full size: %" PRIu32 ", itr size: %" PRIu32 "\n " , num_dds_to_add , full_size , box_size );
1078+ log_debug ("BRANCH 2: num dds: %i. full size: %" PRIu32 ", itr size: %" PRIu32 "" , num_dds_to_add , full_size , box_size );
10791079
10801080 x -> intersection_size = 0 ;
10811081
10821082 /* Do intersection */
10831083 memory_pool_fold (pool , (void * )x , & fold_intersection_count );
10841084
1085- log_debug ("intersection size: %i\n " , x -> intersection_size );
1085+ log_debug ("intersection size: %i" , x -> intersection_size );
10861086
10871087 if (x -> intersection_size < max_num_hyps ) {
10881088 /* The hypotheses generated for these double-differences fit. */
@@ -1264,7 +1264,7 @@ u8 ambiguity_sat_inclusion(ambiguity_test_t *amb_test, const u8 num_dds_in_inter
12641264 }
12651265 }
12661266 }
1267- log_debug ("BRANCH 3: covariance too large. full: %" PRIu32 "\n " , full_size );
1267+ log_debug ("BRANCH 3: covariance too large. full: %" PRIu32 "" , full_size );
12681268 /* Covariance too large, nothing added. */
12691269 return 0 ;
12701270}
@@ -1277,7 +1277,7 @@ u8 ambiguity_sat_inclusion_old(ambiguity_test_t *amb_test, u8 num_dds_in_interse
12771277 DEBUG_ENTRY ();
12781278
12791279 if (float_sats -> num_sats <= num_dds_in_intersection + 1 || float_sats -> num_sats < 2 ) {
1280- log_debug ("no need for inclusion\n " );
1280+ log_debug ("no need for inclusion" );
12811281 DEBUG_EXIT ();
12821282 return 0 ;
12831283 }
@@ -1340,11 +1340,11 @@ u8 ambiguity_sat_inclusion_old(ambiguity_test_t *amb_test, u8 num_dds_in_interse
13401340 Z_inv );
13411341 if (add_any_sats == 1 ) {
13421342 add_sats_old (amb_test , float_prns [0 ], num_dds_to_add , new_dd_prns , lower_bounds , upper_bounds , Z_inv );
1343- log_debug ("adding sats\n " );
1343+ log_debug ("adding sats" );
13441344 DEBUG_EXIT ();
13451345 return 1 ;
13461346 } else {
1347- log_debug ("not adding sats\n " );
1347+ log_debug ("not adding sats" );
13481348 DEBUG_EXIT ();
13491349 return 0 ;
13501350 }
@@ -1484,7 +1484,7 @@ u8 ambiguity_update_sats(ambiguity_test_t *amb_test, const u8 num_sdiffs,
14841484
14851485 if (num_sdiffs < 2 ) {
14861486 create_ambiguity_test (amb_test );
1487- log_debug ("< 2 sdiffs, starting over\n " );
1487+ log_debug ("< 2 sdiffs, starting over" );
14881488 DEBUG_EXIT ();
14891489 return 0 ; // I chose 0 because it doesn't lead to anything dynamic
14901490 }
@@ -1526,7 +1526,7 @@ u8 ambiguity_update_sats(ambiguity_test_t *amb_test, const u8 num_sdiffs,
15261526 changed_sats = 1 ;
15271527 }
15281528 }
1529- log_debug ("changed_sats = %u\n " , changed_sats );
1529+ log_debug ("changed_sats = %u" , changed_sats );
15301530
15311531 DEBUG_EXIT ();
15321532 return changed_sats ;
@@ -1559,20 +1559,20 @@ u8 find_indices_of_intersection_sats(const ambiguity_test_t *amb_test, const u8
15591559 u8 k = 0 ;
15601560 while (i < amb_test -> sats .num_sats && j < num_sdiffs ) {
15611561 if (amb_test -> sats .prns [i ] == sdiffs_with_ref_first [j ].prn ) {
1562- log_debug ("(%u, \t%u, \t%u, \t%u, \t%u)\t\t\tamb_test->sats.prns[i] == sdiffs_with_ref_first[j].prn; i,j,k++\n " ,
1562+ log_debug ("(%u, \t%u, \t%u, \t%u, \t%u)\t\t\tamb_test->sats.prns[i] == sdiffs_with_ref_first[j].prn; i,j,k++" ,
15631563 i , j , k , amb_test -> sats .prns [i ], sdiffs_with_ref_first [j ].prn );
15641564 intersection_ndxs [k ] = i - 1 ;
15651565 i ++ ;
15661566 j ++ ;
15671567 k ++ ;
15681568 }
15691569 else if (amb_test -> sats .prns [i ] < sdiffs_with_ref_first [j ].prn ) {
1570- log_debug ("(%u, \t%u, \t%u, \t%u, \t%u)\t\t\tamb_test->sats.prns[i] < sdiffs_with_ref_first[j].prn; i++\n " ,
1570+ log_debug ("(%u, \t%u, \t%u, \t%u, \t%u)\t\t\tamb_test->sats.prns[i] < sdiffs_with_ref_first[j].prn; i++" ,
15711571 i , j , k , amb_test -> sats .prns [i ], sdiffs_with_ref_first [j ].prn );
15721572 i ++ ;
15731573 }
15741574 else {
1575- log_debug ("(%u, \t%u, \t%u, \t%u, \t%u)\t\t\tamb_test->sats.prns[i] > sdiffs_with_ref_first[j].prn; j++\n " ,
1575+ log_debug ("(%u, \t%u, \t%u, \t%u, \t%u)\t\t\tamb_test->sats.prns[i] > sdiffs_with_ref_first[j].prn; j++" ,
15761576 i , j , k , amb_test -> sats .prns [i ], sdiffs_with_ref_first [j ].prn );
15771577 j ++ ;
15781578 }
@@ -1685,7 +1685,7 @@ void add_sats_old(ambiguity_test_t *amb_test,
16851685 j ++ ;
16861686 k ++ ;
16871687 } else {
1688- log_error ("add_sats_old: impossible condition reached.\n " );
1688+ log_error ("add_sats_old: impossible condition reached." );
16891689 printf ("old_prns = [" );
16901690 for (u8 ii = 0 ; ii < x0 .num_old_dds ; ii ++ ) {
16911691 printf ("%d, " ,old_prns [ii ]);
@@ -1708,15 +1708,15 @@ void add_sats_old(ambiguity_test_t *amb_test,
17081708 empty_element -> ll = 0 ; // only in init
17091709 }
17101710
1711- log_info ("IAR: %" PRIu32 " hypotheses before inclusion\n " , memory_pool_n_allocated (amb_test -> pool ));
1711+ log_info ("IAR: %" PRIu32 " hypotheses before inclusion" , memory_pool_n_allocated (amb_test -> pool ));
17121712 if (DEBUG ) {
17131713 memory_pool_map (amb_test -> pool , & x0 .num_old_dds , & print_hyp );
17141714 }
17151715 memcpy (x0 .Z_inv , Z_inv , num_added_dds * num_added_dds * sizeof (z_t ));
17161716 /* Take the product of our current hypothesis state with the generator, recorrelating the new ones as we go. */
17171717 memory_pool_product_generator (amb_test -> pool , & x0 , MAX_HYPOTHESES , sizeof (x0 ),
17181718 & no_init , & generate_next_hypothesis , & hypothesis_prod );
1719- log_info ("IAR: updates to %" PRIu32 "\n " , memory_pool_n_allocated (amb_test -> pool ));
1719+ log_info ("IAR: updates to %" PRIu32 "" , memory_pool_n_allocated (amb_test -> pool ));
17201720 if (DEBUG ) {
17211721 memory_pool_map (amb_test -> pool , & k , & print_hyp );
17221722 }
0 commit comments