• R/O
  • SSH
  • HTTPS

qrobosdk: コミット


コミットメタ情報

リビジョン101 (tree)
日時2008-06-25 20:56:49
作者satofumi

ログメッセージ

fix method name

変更サマリ

差分

--- trunk/libs/ranges/UrgCtrl.cpp (revision 100)
+++ trunk/libs/ranges/UrgCtrl.cpp (revision 101)
@@ -505,21 +505,15 @@
505505 }
506506
507507
508-double UrgCtrl::index2rad(int index) const {
508+double UrgCtrl::index2rad(const int index) const {
509509
510- // !!! sensor_parameter_ を用いて計算する
511- // !!!
512-
513510 return (index - pimpl->sensor_parameter_.area_front)
514511 * 2.0*M_PI / pimpl->sensor_parameter_.area_total;
515-
516- //return 0.0;
517512 }
518513
519514
520-int UrgCtrl::rad2index(double radian) const {
515+int UrgCtrl::rad2index(const double radian) const {
521516
522- // !!! 仮実装
523517 int index = static_cast<int>((radian * pimpl->sensor_parameter_.area_total)
524518 / (2.0*M_PI))
525519 + pimpl->sensor_parameter_.area_front;
@@ -530,10 +524,6 @@
530524 index = pimpl->sensor_parameter_.area_max;
531525 }
532526 return index;
533-
534- // !!! sensor_parameter_ を用いて計算する
535- // !!!
536- return 0;
537527 }
538528
539529
--- trunk/libs/ranges/UrgCtrl.h (revision 100)
+++ trunk/libs/ranges/UrgCtrl.h (revision 101)
@@ -147,8 +147,8 @@
147147 int getTimestamp(void);
148148
149149 // 角度変換
150- double index2rad(int index) const;
151- int rad2index(double radian) const;
150+ double index2rad(const int index) const;
151+ int rad2index(const double radian) const;
152152
153153 /*!
154154 \brief 取得バッファ数の設定
旧リポジトリブラウザで表示