Skip to content

Commit

Permalink
little improvement of sample for Dubins3p
Browse files Browse the repository at this point in the history
  • Loading branch information
ebertolazzi committed Jun 30, 2024
1 parent e78464e commit 1910f59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Dubins3p_pattern.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace G2lib {
real_type a{ i == 0 ? ang[npts-1]-Utils::m_2pi : ang[i-1] };
//real_type b{ i == npts ? ang[0]+Utils::m_2pi : ang[i] };
real_type b{ ang[i] };
real_type delta{ std::min( (b-a)/3, m_sample_angle ) };
real_type delta{ std::min( (b-a)/2.99999, m_sample_angle ) };
while ( a < b ) {
real_type aa{ a };
if ( aa < 0 ) aa += Utils::m_2pi;
Expand Down
4 changes: 2 additions & 2 deletions src_tests/testDubins3p1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ main() {
lengthsTable_PT(i, 4) = DB_PT.length4();
lengthsTable_PT(i, 5) = DB_PT.length5();

if ( 1.013*DB_SD.length() < DB_PT.length() ) {
if ( 1.0014*DB_SD.length() < DB_PT.length() ) {
fmt::print(
"x0 = {:30.20};\n"
"y0 = {:30.20};\n"
Expand Down Expand Up @@ -294,7 +294,7 @@ main() {
integer o_PS{ integer( (rappPS.array() > r).count() ) };
integer o_PT{ integer( (rappPT.array() > r).count() ) };
fmt::print(
"num outliers > {:>8.3f} EL = {:>6} PS = {:>6} PT = {:>6}\n",
"num outliers > {:>12.8f} EL = {:>6} PS = {:>6} PT = {:>6}\n",
r, o_EL, o_PS, o_PT
);
if ( o_EL == 0 && o_PS == 0 && o_PT == 0 ) break;
Expand Down

0 comments on commit 1910f59

Please sign in to comment.