Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0743566B2 - Angle calculator - Google Patents
[go: Go Back, main page]

JPH0743566B2 - Angle calculator - Google Patents

Angle calculator

Info

Publication number
JPH0743566B2
JPH0743566B2 JP2325622A JP32562290A JPH0743566B2 JP H0743566 B2 JPH0743566 B2 JP H0743566B2 JP 2325622 A JP2325622 A JP 2325622A JP 32562290 A JP32562290 A JP 32562290A JP H0743566 B2 JPH0743566 B2 JP H0743566B2
Authority
JP
Japan
Prior art keywords
angle
value
expressed
corresponds
calculation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2325622A
Other languages
Japanese (ja)
Other versions
JPH04198975A (en
Inventor
康弘 中谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Ten Ltd
Original Assignee
Denso Ten Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2325622A priority Critical patent/JPH0743566B2/en
Publication of JPH04198975A publication Critical patent/JPH04198975A/en
Publication of JPH0743566B2 publication Critical patent/JPH0743566B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Instructional Devices (AREA)

Description

【発明の詳細な説明】 〔概 要〕 角度データを取り扱う演算装置において角度の演算過程
を簡潔にすることを目的とする。
DETAILED DESCRIPTION [Outline] An object of the present invention is to simplify the angle calculation process in a calculation device that handles angle data.

角度の値は有限ビット長の2進数であってその表現可能
な最小値から最大値までが角度の全周に対応する表現形
式の2進数で入力し、通常の2進演算でオーバーフロー
を無視して演算を行なう。
The value of the angle is a binary number with a finite bit length, and the minimum value and the maximum value that can be expressed are entered in the binary number of the expression format corresponding to the entire circumference of the angle, and overflow is ignored in normal binary operation. Calculate.

〔産業上の利用分野〕[Industrial application field]

本発明は角度データを対象として四則演算等の演算を行
なう角度演算装置に関する。
The present invention relates to an angle calculation device that performs calculations such as four arithmetic operations on angle data.

この種の演算は、例えば自動車等の移動体の移動方向を
検知し、検知した移動方向を加味して移動距離を積算す
ることによって移動体の現在位置を指示するナビゲーシ
ョンシステムにおいて頻繁に行なわれる。
This type of calculation is frequently performed in a navigation system that detects the moving direction of a moving body such as an automobile and adds the detected moving direction and integrates the moving distance to indicate the current position of the moving body.

〔従来の技術〕[Conventional technology]

第3図はこのナビゲーションシステムの構成の一例を表
わす図である。自動車の進行方向を示す角度信号は、地
磁気センサ等の角度センサ100の出力信号をA/D変換器10
2でデジタル信号に変換してコンピュータ110に取り込ま
れる。自動車の走行距離を示すデータは、車速パルスセ
ンサ104の出力パルスをカウンタ106でカウントした値と
して取り込まれる。コンピュータ110は自動車の走行距
離を移動方向を加味して積算することにより現在値を知
り、CD−ROM108内に格納されている地図上にその現在値
を示して表示装置112へ表示する。
FIG. 3 is a diagram showing an example of the configuration of this navigation system. The angle signal indicating the traveling direction of the automobile is obtained by converting the output signal of the angle sensor 100 such as a geomagnetic sensor into the A / D converter 10
In step 2, it is converted into a digital signal and taken into the computer 110. The data indicating the traveling distance of the automobile is captured as a value obtained by counting the output pulses of the vehicle speed pulse sensor 104 by the counter 106. The computer 110 knows the current value by adding up the traveling distance of the automobile in consideration of the moving direction, and displays the current value on the map stored in the CD-ROM 108 and displays it on the display device 112.

ところで、角度センサで検知される進行方向には周知の
如く、多少の誤差が含まれているので、そのまま積算す
ると積算値に大きなずれを生じ、実用的でない。そこ
で、種々の方式により現在値の補正を行ないながら積算
する手法がとられている。例えば、マップマッチング方
式によれば、CD−ROM108に格納されている地図データと
共に、道路の方向を表わすデータを格納しておき、自動
車の進行方向が道路の方向と或る範囲内で一致すればそ
の道路上にあるものとして現在値の補正を行なう。
Incidentally, as is well known, the traveling direction detected by the angle sensor includes some error, so that if integrated as it is, a large deviation occurs in the integrated value, which is not practical. Therefore, various methods are used to correct the current value and perform integration. For example, according to the map matching method, data indicating the direction of the road is stored together with the map data stored in the CD-ROM 108, and if the traveling direction of the vehicle matches the direction of the road within a certain range. The current value is corrected as if it were on the road.

このようにナビゲーションシステムにおいては角度デー
タの四則演算および比較演算等が頻繁に行なわれ、しか
も、その演算は高速に達成されることが要求される。
As described above, in the navigation system, the four arithmetic operations of the angle data and the comparison operation are frequently performed, and the arithmetic operations are required to be achieved at high speed.

第4図は従来行なわれている角度演算の過程を表わすフ
ローチャートであり、(a)欄は角度センサ100からの
データの取り込みの過程を表わし、(b)欄は演算の代
表的な例として、2つの直線の方向を表わす角度データ
からそれらのなす角(夾角)を算出する過程を表わして
いる。
FIG. 4 is a flow chart showing the process of the conventional angle calculation, the (a) column shows the process of fetching data from the angle sensor 100, and the (b) column shows a typical example of the calculation. It represents a process of calculating an angle (an included angle) formed by angle data representing the directions of two straight lines.

角度データを取り扱う演算では、全周を360分割した角
度を単位とする度数、または全周を2πとするラジアン
により角度を表現して四則演算等の演算が行なわれるの
が一般的である。そのため、角度センサから取り込まれ
た電圧値は(ステップa)、オフセット演算を施された
後(ステップb)、例えば(180゜/電圧フルスケー
ル)の値が乗じられて−180゜〜180゜の値に変換される
(ステップc)。
In the calculation for handling the angle data, it is general to perform arithmetic operations such as four arithmetic operations by expressing the angle by a frequency in which the entire circumference is divided into 360 units, or a radian in which the entire circumference is 2π. Therefore, the voltage value taken in from the angle sensor (step a) is subjected to offset calculation (step b), and then multiplied by a value of (180 ° / voltage full scale) to obtain a value of −180 ° to 180 °. Converted to a value (step c).

しかしながら、角度には周期性があるので、(b)欄ス
テップd,eに示されるように演算の前後で−180゜〜180
゜(度数表現の場合)または−π〜π(ラジアン表現の
場合)の範囲で正規化するか、0〜360゜(度数表現の
場合)または0〜2π(ラジアン表現の場合)の範囲で
正規化しないと、実際の角度の見積り(一致の判定、大
小の判定等)を誤ることになる。
However, since the angle has periodicity, as shown in steps (d) and (e) of column (b), -180 ° to 180 ° before and after the calculation.
Normalized in the range of ゜ (in the frequency expression) or in the range of −π to π (in the case of radian expression), or in the range of 0 to 360 ° (in the case of frequency expression) or 0 to 2π (in the case of radian expression) Otherwise, the actual estimation of the angle (judgment of coincidence, judgment of size, etc.) will be erroneous.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

このように、従来では演算の前後で正規化をする必要が
あるので、それだけプログラムステップ数が増大し、演
算時間も増大するという問題があった。
As described above, conventionally, since it is necessary to perform normalization before and after the calculation, there is a problem that the number of program steps increases and the calculation time also increases.

したがって本発明の目的は、このような、角度の正規化
の過程を必要としない角度演算装置を提供することにあ
る。
Therefore, it is an object of the present invention to provide an angle calculation device that does not require such an angle normalization process.

〔課題を解決するための手段〕[Means for Solving the Problems]

第1図は本発明の原理構成図である。図において、本発
明の角度演算装置は、有限桁の位取り記数法による数値
で表現された角度値であって、該有限桁の位取り記数法
で表現が可能な最小値から最大値までを角度の全周に比
較的に対応させる表現形式で表現された角度値を入力す
る角度入力手段10と、該角度入力手段10が入力した該表
現形式のデータを入力の少なくとも1つとし、該有限桁
からの桁上げを無視した演算を行なって、該表現形式の
角度値を出力する角度演算手段20とを具備することを特
徴とするものである。
FIG. 1 is a block diagram showing the principle of the present invention. In the figure, the angle calculation device of the present invention is an angle value represented by a numerical value by the scaled number system of finite digits, and represents the minimum value to the maximum value that can be represented by the scaled number system of finite digits. The angle input means 10 for inputting an angle value expressed in an expression form relatively corresponding to the entire circumference of the angle, and at least one of the data in the expression form input by the angle input means 10 as the input An angle calculating means 20 is provided for performing an operation ignoring carry from a digit and outputting an angle value in the expression format.

前記角度値は2の補数表現の2進数であり、その表現可
能な最小値は角度−180゜にほぼ対応し、最大値は角度1
80゜に対応する構成とすることが好適である。
The angle value is a binary number represented by 2's complement, and the minimum value that can be expressed corresponds to an angle of -180 ° and the maximum value is an angle of 1.
A structure corresponding to 80 ° is preferable.

また、前記角度値は符号なし2進数であり、その表面可
能な最小値は角度0゜にほぼ対応し、最大値は角度360
゜にほぼ対応する構成とすることも好適である。
Further, the angle value is an unsigned binary number, the minimum possible surface value corresponds to an angle of 0 °, and the maximum value is an angle of 360 °.
It is also preferable to adopt a configuration that substantially corresponds to °.

〔作 用〕[Work]

有限桁で表現が可能な最小値から最小値までを角度の全
周に比例的に対応させる角度値の表現形式を使用し、有
限桁からの桁上げ(オーバーフロー)を無視した演算を
行なうことによって、自動的に角度の正規化がなされ、
角度の演算過程が著しく簡潔になる。
By using the expression form of the angle value that proportionally corresponds to the entire circumference of the angle from the minimum value that can be expressed with a finite digit to the minimum value, by performing the operation ignoring the carry (overflow) from the finite digit. , The angle is automatically normalized,
The angle calculation process is significantly simplified.

〔実施例〕〔Example〕

本発明を第3図で説明したナビゲーションシステムに適
用した例について以下に説明する。
An example in which the present invention is applied to the navigation system described in FIG. 3 will be described below.

第4図と同様に、第2図(a)欄は角度センサ100から
のデータの取り込みの過程を表わし、(b)欄は演算の
代表的な例として2直線の夾角を演算する過程を表わし
ている。
Similar to FIG. 4, FIG. 2A shows a process of fetching data from the angle sensor 100, and FIG. 2B shows a process of calculating an included angle of two straight lines as a typical example of calculation. ing.

(a)欄に示すデータ取込み過程において第4図と異な
るところは(215/電圧フルスケール)の値を乗じて変換
を行なっている点にある。こうすることによって基準方
向からの角度が(180−180/32768)゜であるときは16ビ
ットの2の補数表現の2進数が表現可能な最大値である
32767(215−1)に変換され、−180゜であるときは16
ビットの2の補数表現の2進数が表現可能な最小値であ
る−32768(=−215)に変換される。同様に、CD−ROM1
08(第3図)内に格納される角度データもすべてこのス
ケールで格納される。
The difference from FIG. 4 in the data acquisition process shown in the column (a) is that the conversion is performed by multiplying the value of (2 15 / voltage full scale). By doing this, when the angle from the reference direction is (180-180 / 32768) °, the 16-bit binary number in 2's complement representation is the maximum value that can be represented.
16 converted when converted to 32767 (2 15 -1) and -180 °
The binary number of the two's complement representation of the bit is converted into −32768 (= −2 15 ) which is the minimum representable value. Similarly, CD-ROM1
All angle data stored in 08 (Fig. 3) is also stored at this scale.

そして、その後の演算において演算結果が角度値である
場合には常に16ビットの2の補数表現で表わすことと
し、16ビット以上の桁上げはすべて無視することとす
る。
Then, in the subsequent calculation, when the calculation result is an angle value, it is always represented by a 16-bit two's complement expression, and carry of 16 bits or more is ignored.

こうすることによって、第2図(b)欄に示すように、
第4図(a)欄では必要であった正規化の過程(ステッ
プd,e)が不要となる。
By doing so, as shown in FIG. 2 (b),
The normalization process (steps d and e) required in the column (a) of FIG. 4 is unnecessary.

以上は−180゜〜180゜の角度を−2n-1〜2n-1−1の2の
補数表現で表わす方式について説明してきたが、0〜36
0゜を符号なし2進数(0〜2n−1)で表わすことも可
能であり、同様な効果が得られる。
The method of expressing the angle of -180 ° to 180 ° by the two's complement expression of -2 n-1 to 2 n-1 -1 has been described above.
It is also possible to represent 0 ° by an unsigned binary number (0 to 2 n -1), and the same effect can be obtained.

〔発明の効果〕〔The invention's effect〕

以上説明してきたように本発明によれば、演算の前後で
正規化する必要がないので、プログラムステップ数が削
減され、処理速度が速くなるという効果の他に、以下の
効果が得られる。
As described above, according to the present invention, since it is not necessary to perform normalization before and after calculation, the following effects can be obtained in addition to the effect of reducing the number of program steps and increasing the processing speed.

固定少数点形式の整数演算であるので演算ルーチン
が簡単であり、処理が高速である。
Since it is a fixed decimal point type integer operation, the operation routine is simple and the processing is fast.

角度データをN,Sの2方位、N,E,S,Wの4方位或い
は、N,NE,…等の8方位で表わす場合に、単に角度デー
タの最上位から1,2または3ビットをとるだけで良い。
When expressing the angle data in 2 directions of N, S, 4 directions of N, E, S, W, or 8 directions of N, NE, ..., simply use 1, 2 or 3 bits from the highest position of the angle data. Just take it.

【図面の簡単な説明】[Brief description of drawings]

第1図は本発明の原理構成を表わす図、 第2図は本発明の一実施例を表わすフローチャート、 第3図はナビゲーションシステムの一例を表わす図、 第4図は従来の角度演算過程を表わすフローチャート、 図において、 10……角度入力手段、20……角度演算手段。 FIG. 1 is a diagram showing the principle configuration of the present invention, FIG. 2 is a flow chart showing an embodiment of the present invention, FIG. 3 is a diagram showing an example of a navigation system, and FIG. 4 is a conventional angle calculation process. In the flow chart and figure, 10 ... Angle input means, 20 ... Angle calculation means.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】有限桁の位取り記数法による数値で表現さ
れた角度値であって、該有限桁の位取り記数法で表現が
可能な最小値から最大値までを角度の全周に比例的に対
応させる表現形式で表現された角度値を入力する角度入
力手段(10)と、 該角度入力手段(10)が入力した該表現形式のデータを
入力の少なくとも1つとし、該有限桁からの桁上げを無
視した演算を行なって、該表現形式の角度値を出力する
角度演算手段(20)とを具備することを特徴とする角度
演算装置。
1. An angle value expressed as a numerical value by a finite digit scale notation method, wherein a minimum value and a maximum value that can be expressed by the finite digit scale notation method are proportional to the entire circumference of the angle. Angle input means (10) for inputting an angle value expressed in a corresponding expression format, and at least one of the data of the expression format input by the angle input means (10) as an input And an angle calculation means (20) for outputting an angle value in the expression format by performing an operation ignoring the carry of the angle calculation device.
【請求項2】前記角度値は2の補数表現の2進数であ
り、その表現可能な最小値は角度−180゜にほぼ対応
し、最大値は角度180゜にほぼ対応する請求項1記載の
角度演算装置。
2. The angle value is a binary number in a two's complement representation, the minimum representable value of which corresponds to an angle of -180 °, and the maximum value of which corresponds to an angle of 180 °. Angle calculator.
【請求項3】前記角度値は符号なし2進数であり、その
表現可能な最小値は角度0゜にほぼ対応し、最大値は角
度360゜にほぼ対応する請求項1記載の角度演算装置。
3. The angle calculation device according to claim 1, wherein the angle value is an unsigned binary number, the minimum value that can be expressed corresponds to an angle of 0 °, and the maximum value thereof corresponds to an angle of 360 °.
JP2325622A 1990-11-29 1990-11-29 Angle calculator Expired - Lifetime JPH0743566B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2325622A JPH0743566B2 (en) 1990-11-29 1990-11-29 Angle calculator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2325622A JPH0743566B2 (en) 1990-11-29 1990-11-29 Angle calculator

Publications (2)

Publication Number Publication Date
JPH04198975A JPH04198975A (en) 1992-07-20
JPH0743566B2 true JPH0743566B2 (en) 1995-05-15

Family

ID=18178915

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2325622A Expired - Lifetime JPH0743566B2 (en) 1990-11-29 1990-11-29 Angle calculator

Country Status (1)

Country Link
JP (1) JPH0743566B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004249821A (en) * 2003-02-19 2004-09-09 Denso Corp Safe driving scoring device, safe driving scoring system, in-vehicle device and safe driving scoring server

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100468027B1 (en) * 2002-10-01 2005-01-24 주식회사 미래로테크놀러지 Voice recognition doorlock apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004249821A (en) * 2003-02-19 2004-09-09 Denso Corp Safe driving scoring device, safe driving scoring system, in-vehicle device and safe driving scoring server

Also Published As

Publication number Publication date
JPH04198975A (en) 1992-07-20

Similar Documents

Publication Publication Date Title
CN112157651B (en) Pose determination method and device and robot
JPWO1999066423A1 (en) Data Processing Unit
EP1058390B1 (en) R/D converter
JPH0743566B2 (en) Angle calculator
CN112506190B (en) Robot positioning method, robot positioning device and robot
CN114488237A (en) Positioning method, device, electronic device and intelligent driving method
JPS5939774B2 (en) Exponential function calculation method
JPH10187416A (en) Floating point arithmetic unit
JPH0584928B2 (en)
JPS60167030A (en) System and circuit for shift flag generation
JP2574264B2 (en) Trigonometric function operation unit
JPH06105421B2 (en) Inverse trigonometric function calculator
CN120848837A (en) Integer division operation method, device, medium and equipment
SU746538A1 (en) Computer of trigonometric functions
JPS59180422A (en) Running-locus analyzing system
JPS6132428Y2 (en)
JP2998324B2 (en) Normalized shift device and normalized shift method
CN120670425A (en) Table lookup processing system, method, medium, device and chip
JPS62249230A (en) arithmetic processing unit
JPH0419571B2 (en)
JPS6225208B2 (en)
JP2881318B2 (en) Conversion circuit of distance value in character recognition device
JP2606580B2 (en) Numerical data calculation method
JPH06180640A (en) Device and method for division
JPS61248131A (en) trigonometric function calculator

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090515

Year of fee payment: 14

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090515

Year of fee payment: 14

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100515

Year of fee payment: 15

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110515

Year of fee payment: 16

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110515

Year of fee payment: 16