CN102981673A - Method of measuring parameters set by measuring instrument for the purpose of supporting multi-touch screen - Google Patents

Method of measuring parameters set by measuring instrument for the purpose of supporting multi-touch screen Download PDF

Info

Publication number
CN102981673A
CN102981673A CN2012104439790A CN201210443979A CN102981673A CN 102981673 A CN102981673 A CN 102981673A CN 2012104439790 A CN2012104439790 A CN 2012104439790A CN 201210443979 A CN201210443979 A CN 201210443979A CN 102981673 A CN102981673 A CN 102981673A
Authority
CN
China
Prior art keywords
waveform
ordinate
parameter
horizontal ordinate
main control
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.)
Granted
Application number
CN2012104439790A
Other languages
Chinese (zh)
Other versions
CN102981673B (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.)
Tianjin Deli Instrument Equipment Co., Ltd.
Original Assignee
DELI ELECTRONIC INSTRUMENT Co Ltd TIANJIN CITY
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 DELI ELECTRONIC INSTRUMENT Co Ltd TIANJIN CITY filed Critical DELI ELECTRONIC INSTRUMENT Co Ltd TIANJIN CITY
Priority to CN201210443979.0A priority Critical patent/CN102981673B/en
Publication of CN102981673A publication Critical patent/CN102981673A/en
Application granted granted Critical
Publication of CN102981673B publication Critical patent/CN102981673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method of measuring parameters set by a measuring instrument for the purpose of supporting a multi-touch screen. The measuring instrument for the purpose of supporting the multi-touch screen comprises a main control unit based on an advanced RISC machine (ARM), a measuring module and a display module. A traditional method with a keyboard or a key to set parameters by the measuring instrument is changed, and the measuring parameters are set by using two-touch gesture operation on the multi-touch screen. The ARM-based main control unit calculates central points of connection line segments of starting positions and stopping positions of two touch points, according to an included angle of a connecting line of the two central points and an X-axis and two threshold valve set for the inclined angle, a horizontal coordinate or a vertical coordinate is decided to be independently set as required, or the horizontal coordinate and vertical coordinate parameters are simultaneously set, the set measuring parameters are sent to the measuring module, the measuring module processes wavy data by novel measuring parameters, and then the wavy data is displayed in the display module by the ARM main control unit, and thus the process that the measuring parameters are set by the gesture operation is completed.

Description

Method for the surveying instrument setting measurement parameter of supporting multi-touch screen
Technical field
The invention belongs to the surveying instrument technical field, often need to set measurement parameter in surveying instrument, the present invention just relates to a kind of method to the surveying instrument setting measurement parameter of supporting multi-touch screen.
Background technology
In the surveying instrument field, usually come measurement, processing and the demonstration of control waveform data with the mode of setting measurement parameter.The traditional approach of surveying instrument setting measurement parameter is to utilize keyboard or button that parameters is set one by one.If the measurement parameter of need setting is many, work can be very loaded down with trivial details, and the effect after can not the preview setting parameter.
For multi-touch screen, intelligent terminal is usually realized the convergent-divergent of picture etc. with the mode of carrying out gesture operation thereon, but what this mode only realized is the change of interface display scope, form convergent-divergent on the visual effect with this, can not reach the purpose that we will set the parameter of surveying instrument; And regardless of the moving direction of touch point in the gesture operation, display interface all is carried out the convergent-divergent of same ratio on all directions, and does not realize independent horizontal convergent-divergent, independent vertical convergent-divergent or the convergent-divergent of horizontal and vertical different proportion.
Summary of the invention
The present invention is in order to solve setup parameter operation inconvenience, the loaded down with trivial details problem of work in the surveying instrument of supporting multi-touch screen, and the technical scheme that provides a kind of measurement parameter to set can be saved a large amount of and loaded down with trivial details data setting work.
Technical scheme of the present invention is to be the method for the surveying instrument setting measurement parameter of supporting multi-touch screen, and the surveying instrument of described support multi-touch screen is comprised of main control unit, measurement module and the display module based on ARM, sees accompanying drawing 1.The multi-touch screen of surveying instrument belongs to display module.Method of the present invention is exactly the gesture operation that carries out 2 touches at multi-touch screen, the ARM main control unit is set separately horizontal ordinate or ordinate parameter according to the moving direction of two touch points in the gesture operation, perhaps set simultaneously horizontal ordinate and ordinate parameter, then the measurement parameter of setting is sent to measurement module, measurement module can be processed Wave data with new measurement parameter, again these Wave datas are shown in the display module by the ARM main control unit, have just finished by the process of gesture operation setting measurement parameter like this.
The inventive method specifically needs following several steps to realize:
Step 1, ARM main control unit read original measurement parameter and Wave data from measurement module, and on display module drawing waveforms.Concrete grammar is as follows:
Step 1.1, measurement module provide the data fetch interface, ARM main control unit usage data read functions reads original measurement parameter and the Wave data of waveform horizontal ordinate and ordinate scope by the data fetch interface of measurement module, and Wave data is saved in the storer of ARM main control unit.The corresponding horizontal ordinate of each data point and two data of ordinate.Setting every field measurement waveform has n sampled point, and then a field wave shape has n to data in the main control unit storer.The horizontal ordinate of first point and ordinate store respectively first and second position into, and the horizontal ordinate of second point and ordinate store respectively third and fourth position into, and the rest may be inferred.All horizontal ordinate data are arithmetic progression, the minimum value of the corresponding waveform horizontal ordinate of the abscissa value of first some scope, the maximal value of the corresponding waveform horizontal ordinate of the abscissa value of last some scope.
The screen horizontal ordinate scope of waveform viewing area is X on step 1.2, the set and display module MinTo X Max, screen ordinate scope is Y MinTo Y MaxThe horizontal ordinate of the waveform coordinate system of display module and ordinate scope are respectively horizontal ordinate and the ordinate range parameter that the ARM main control unit is read by measurement module, wherein the minimum value of waveform horizontal ordinate scope and maximal value respectively with minimum value and the maximal value X of screen coordinate system horizontal ordinate scope MinAnd X MaxCorrespondence, the minimum value of waveform ordinate scope and maximal value respectively with maximal value and the minimum value Y of screen coordinate system ordinate scope MaxAnd Y MinCorresponding.The ARM main control unit is determined n coordinate points according to the Wave data of storing in the storer in the waveform coordinate system of display module, n is less than or equal to 100000 integer greater than 0, then use drawing function to connect every two adjacent points, total n-1 bar connecting line has so just drawn whole waveform.
Two screen coordinate positions that the touch point is pressed when step 2:ARM main control unit reads gesture operation and begins from display module.Detailed process is as follows:
In the setting measurement parameter, at first need two fingers by forming two touch points at multi-touch screen, two starting points as gesture operation, then the ARM main control unit uses its touch point coordinate read functions from the screen coordinate position that display module reads respectively two starting points, and the usage data memory function deposits two point coordinate in the storer of ARM main control unit.
Step 3:ARM main control unit is converted to the waveform coordinate with the screen coordinate of two gesture operation starting points on the multi-touch screen.
Screen coordinate is with respect to the device coordinate of position, the on-screen display (osd) area upper left corner (take pixel as unit), and the waveform coordinate is the logical coordinates with respect to position, the lower left corner, waveform viewing area.Use the conversion formula of device coordinate and logical coordinates that screen coordinate is converted to the waveform coordinate.After the screen coordinate of two gesture operation starting points was converted to the waveform coordinate, ARM main control unit usage data memory function was saved in the waveform coordinate in its storer.
Step 4:ARM main control unit obtains on the multi-touch screen screen coordinate position in two touch point moving process.Detailed process is as follows:
When utilizing the gesture operation setting measurement parameter of 2 touches, two touch points keep down state always and are arbitrarily mobile in the waveform viewing area, and the ARM main control unit uses touch point coordinate read functions from the screen coordinate position of two touch points of display module Real-time Obtaining.
Step 5: judge the interim coordinate direction of adjusting of waveform parameter on the display module.Concrete grammar is as follows:
The ARM main control unit at first calculates respectively the intermediate point screen coordinate of the home base coordinate position line of storage in its current screen coordinate position and the step 2 to two touch points, then calculate the line of two intermediate points and the angle α of abscissa axis.
Set two angle threshold θ 1And θ 2, and 0≤θ 1≤ θ 2≤ 90 °, they be used for to be divided on the display module, and waveform horizontal ordinate parameter is adjusted temporarily, the temporarily adjustment of waveform ordinate parameter, horizontal ordinate and ordinate parameter are all adjusted the respectively scope of corresponding angle α of three kinds of situations temporarily.Concrete division methods is, judges after calculating the angle α of two intermediate point lines and abscissa axis, if angle α is less than θ 1, then only adjust waveform horizontal ordinate parameter temporarily, namely only revise the scope of waveform coordinate system abscissa axis temporarily; If angle α is greater than θ 2, then only adjust waveform ordinate parameter temporarily, namely only revise the scope of waveform coordinate system axis of ordinates temporarily; And if angle α is more than or equal to θ 1And less than or equal to θ 2, then waveform horizontal ordinate and ordinate parameter are all adjusted temporarily.
Step 6:ARM main control unit carries out corresponding interim the adjustment according to the judged result of step 5 to the waveform parameter on the display module.
Step 6.1, the interim method of adjusting of waveform horizontal ordinate parameter are according to two touch points principle that corresponding waveform horizontal ordinate remains unchanged in moving process, to revise the scope of waveform coordinate system abscissa axis by the ARM main control unit.
Step 6.2, the interim method of adjusting of waveform ordinate parameter are according to two touch points principle that corresponding waveform ordinate remains unchanged in moving process, to revise the scope of waveform coordinate system axis of ordinates by the ARM main control unit.
If step 6.3 waveform need to carry out the interim adjustment of horizontal ordinate and ordinate parameter simultaneously, then can adjust first waveform horizontal ordinate parameter temporarily, adjust again waveform ordinate parameter temporarily, also can adjust first waveform ordinate parameter temporarily, adjust again waveform horizontal ordinate parameter temporarily.
If step 6.4 ARM main control unit has carried out interim adjustment to waveform horizontal ordinate parameter, then also need to re-construct new Wave data in order to draw according to the original measurement parameter that reads in the waveform horizontal ordinate scope after adjusting and the step 1 and Wave data.Construct new Wave data by take horizontal ordinate as with reference to intercepting or the mode of interpolation is finished, concrete grammar is as follows:
At first, the minimum value of the original waveform horizontal ordinate scope that the ARM main control unit reads in the step 1 is calculated minimum value and the index of maximal value in former horizontal ordinate arithmetic progression of waveform horizontal ordinate scope after adjusting as benchmark (index is as 0).The index of setting the minimum value of the relative original waveform horizontal ordinate with maximal value of the minimum value scope after waveform horizontal ordinate parameter is adjusted temporarily is respectively I MinAnd I Max(the horizontal ordinate stated range minimum after the adjustment is during less than former minimum value, I MinBe negative value), the sampling number of the Wave data that will re-construct so is I Max-I Min+ 1.In order to deposit the Wave data of neotectonics, in the storer of ARM main control unit, distribute one and can place (I Max-I Min+ 1) memory block of a data * 2.
Next determine above-mentioned I Max-I MinWaveform horizontal ordinate and the ordinate of each point in+1 point, and be saved in the newly assigned memory block of storer of ARM main control unit.Explanation in storage mode and the step 1 is similar, I MinFirst and second positions of respectively corresponding this memory block of the horizontal ordinate of the data point of index and ordinate, I MinThird and fourth position of respectively corresponding this memory block of the horizontal ordinate of the data point of+1 index and ordinate, the like, I Max(the I of respectively corresponding this memory block of the horizontal ordinate of the data point of index and ordinate Max-I Min) * 2+1 and (I Max-I MinA) * 2+2 position.
Specific practice is, to I MinAnd I MaxBetween each index value calculate successively waveform horizontal ordinate and the ordinate of the point of its correspondence, setting I is I MinAnd I MaxBetween arbitrary index value, if index value I is less than 0 or greater than n-1, then the waveform ordinate of the point of its correspondence is got default value, default value can be set as arbitrary value, but all are less than 0 or identical greater than default value palpus corresponding to the index value of n-1, obtain again the waveform horizontal ordinate of index I corresponding point by the arithmetic progression formula, the position, memory block that the waveform horizontal ordinate that then will put and ordinate deposit above-mentioned correspondence in; And if index value I is more than or equal to 0 and less than or equal to n-1, index value is horizontal ordinate and the correspondence position that ordinate copies index I in the new data memory block to, the i.e. (I-I of the data point of I in the original waveform data that then step 1 is read Min) * 2+1 and (I-I MinA) * 2+2 position.Calculate so successively I MinAnd I MaxBetween the waveform horizontal ordinate and ordinate of each index value corresponding point after, each position of new data storage area has just deposited data in, these data are exactly the Wave data according to the interim waveform horizontal ordinate parameter renegotiation neotectonics of adjusting.
Step 6.5, last ARM main control unit use interim waveform horizontal stroke, ordinate parameter and the Wave data drawing waveforms on display module of adjusting according to the drawing practice in the step 1.So just can preview part effect before the final setting of measurement parameter.
Step 6.6, two touch points are continued to keep down state and are arbitrarily mobile in the waveform viewing area, by the method repeating step 4 that uses circulation in the accompanying drawing 2,5 and 6 detection and computing, until detecting, the ARM main control unit have at least a touch point to lift rear end.
Step 7: setting measurement parameter.
When having the touch point to lift, the measurement parameter memory interface that ARM main control unit usage data memory function and measurement module provide, the last waveform coordinate parameters that calculates of step 6 is saved in the storer of measurement module, comprises minimum value and the maximal value parameter of the minimum value of waveform horizontal ordinate and maximal value parameter, waveform ordinate.Measurement module will carry out DATA REASONING, processing according to these new measurement parameters, so just finish the process by the gesture operation setting measurement parameter of 2 touches.
Advantage of the present invention and beneficial effect:
The present invention has changed the mode of traditional parameter of utilizing keyboard or button setting measurement instrument, by coming the setting measurement parameter at the multi-touch screen of surveying instrument with the gesture operation of 2 touches; Calculate the mid point of the initial and final position connecting line segment of two touch points of gesture operation, according to the angle of the line of these two mid points and abscissa axis and two threshold values setting of angle for this reason, need to determine to set separately the horizontal ordinate parameter, set the ordinate parameter separately and still set simultaneously horizontal, ordinate parameter; Horizontal, when the ordinate parameter is set simultaneously, can adjust parameter value according to different ratios respectively; After setting separately horizontal ordinate parameter or ordinate parameter or setting horizontal stroke, ordinate parameter simultaneously, surveying instrument is with new parameter measurement, deal with data, the parameter that the final generating algorithm that changes the surveying instrument Wave data relies on affects the generative process of Wave data.
Description of drawings
Fig. 1 is functional module and the mutual relationship synoptic diagram thereof of surveying instrument.
Fig. 2 is the process flow diagram by gesture operation setting measurement parameter.
Fig. 3 carries out gesture operation measured waveform figure before among the embodiment.
Fig. 4 is the effect after waveform horizontal stroke, ordinate parameter are all adjusted temporarily among the embodiment.
Embodiment
Embodiment
1, prepares a spectrum analyzer of supporting multi-touch screen.Spectrum analyzer is comprised of ARM main control unit, DSP measurement module and the display module that comprises multi-touch screen.Android operating system is installed in the ARM main control unit.
The sampling number n that sets spectrum analyzer is 501, and the survey frequency scope is 5MHz-65MHz, and the measuring amplitude scope is 0-80dB μ V.
The screen horizontal ordinate scope of frequency spectrum viewing area is 5 to 849 on the set and display module, and screen ordinate scope is 50 to 354.The waveform horizontal ordinate of frequency spectrum is frequency, and its scope is consistent with the survey frequency scope, is 5 to 65, and the waveform ordinate is amplitude, and its scope is consistent with the measuring amplitude scope, is 0 to 80.
The ARM main control unit uses the data read functions of Android SDK, data fetch interface by DSP reads spectrum measurement parameter and frequency spectrum data in the storer of ARM main control unit, have 501 pairs of frequency spectrum datas (being that sampling number n is 501), can determine 501 coordinate points in the frequency spectrum viewing area of display module according to these data, then the drawing function that uses Android SDK to provide connects every two adjacent points, have 500 connecting lines, so just drawn whole frequency spectrum.See accompanying drawing 3.
2, in the frequency spectrum viewing area, carry out the gesture operation of 2 touches.When had just pressed two touch points, the touch point coordinate read functions that the ARM main control unit uses Android SDK to provide obtained the home base coordinate of two touch points.The screen coordinate of setting two starting points is respectively (300,150), (400,250).
3, the ARM main control unit is converted to the waveform coordinate with the screen coordinate of two starting points.
It is as follows that the screen horizontal ordinate is converted to the formula of waveform horizontal ordinate:
H x = H o min + ( H o max - H o min ) × ( X - X min ) X max - X min
In this formula, H xThe unknown, expression screen horizontal ordinate is the waveform abscissa value of the point of X; H OmaxKnown, be the maximal value of waveform horizontal ordinate scope; H OminKnown, be the minimum value of waveform horizontal ordinate scope; X is known, is the screen horizontal ordinate of touch point; X MaxKnown, for the maximal value of the screen horizontal ordinate scope of waveform viewing area, with waveform horizontal ordinate H OmaxCorresponding; X MinKnown, for the minimum value of the screen horizontal ordinate scope of waveform viewing area, with waveform horizontal ordinate H OminCorresponding.
The waveform horizontal ordinate that calculates first starting point according to this formula is:
5 + ( 65 - 5 ) × ( 300 - 5 ) 849 - 5 = 25.97 MHz
The waveform horizontal ordinate of second starting point is:
5 + ( 65 - 5 ) × ( 400 - 5 ) 849 - 5 = 33.08 MHz
It is as follows that the screen ordinate is converted to the formula of waveform ordinate:
V y = V o max - ( V o max - V o min ) × ( Y - Y min ) Y max - Y min
In this formula, V yThe unknown, expression screen ordinate is the waveform ordinate value of the point of Y; V OmaxKnown, be the maximal value of waveform ordinate scope; V OminKnown, be the minimum value of waveform ordinate scope; Y is known, is the screen ordinate of touch point; Y MaxKnown, for the maximal value of the screen ordinate scope of waveform viewing area, with waveform ordinate V MinCorresponding; Y MinKnown, for the minimum value of the screen ordinate scope of waveform viewing area, with waveform ordinate V MaxCorresponding.
The waveform ordinate that calculates first starting point according to this formula is:
80 - ( 80 - 0 ) × ( 150 - 50 ) 354 - 50 = 53.68 dBμV
The waveform ordinate of second starting point is:
80 - ( 80 - 0 ) × ( 250 - 50 ) 354 - 50 = 27.37 dBμV
Like this, just obtained the waveform coordinate of two touch point reference positions, be respectively (25.97,53.68) and (33.08,27.37).
4, in two touch point moving process, the touch point coordinate read functions that the ARM main control unit uses Android SDK to provide obtains respectively the current screen coordinate of two touch points.
5, judge the interim coordinate direction of adjusting of waveform parameter.Detailed process is as follows:
Setting threshold θ 1Be 30 °, θ 2Be 60 °, 2 current screen coordinates that obtain in the embodiment step 4 are respectively (200,100) and (500,300).
The intermediate point screen horizontal ordinate that calculates first touch point current location and its reference position line according to mean point formula is:
300 + 200 2 = 250
The screen ordinate is:
150 + 100 2 = 125
The intermediate point screen horizontal ordinate that calculates second touch point current location and its reference position line is:
400 + 500 2 = 450
The screen ordinate is:
250 + 300 2 = 275
Then calculate the line of these two intermediate points and the angle α of abscissa axis.If the screen horizontal ordinate of two intermediate points equates that angle is 90 ° so, if unequal then computing formula is as follows:
θ = tan - 1 ( | Y mid 2 - Y mid 1 X mid 2 - X mid 1 | )
In this formula, θ is unknown, represents the angle of two intermediate point lines and abscissa axis; Y Mid2, Y Mid1All known, be respectively the screen ordinate of two intermediate points; X Mid2, X Mid1All known, be respectively the screen horizontal ordinate of two intermediate points.
Because the screen horizontal ordinate result of calculation of two intermediate points is unequal, so calculate the folded acute angle of two intermediate point lines and abscissa axis according to above-mentioned formula be:
Figure BDA00002376182500074
Because angle α is 36.87 °, greater than θ 1(30 °) and less than θ 2(60 °) are so need to all adjust waveform horizontal ordinate, ordinate parameter temporarily.
6, the ARM main control unit carries out corresponding interim the adjustment according to the judged result in the embodiment step 5 to waveform horizontal ordinate, ordinate parameter.
The formula that calculates the rear horizontal ordinate stated range minimum of the interim adjustment of waveform horizontal ordinate parameter is as follows:
H min = H 1 - ( X 1 - X min ) × ( H 2 - H 1 ) X 2 - X 1
In this formula, H MinThe unknown, the minimum value of expression waveform horizontal ordinate scope; X 1, X 2Known, be respectively the current screen horizontal ordinate of two touch points; H 1, H 2Known, be respectively the waveform horizontal ordinate of two gesture operation starting points; X MinKnown, be the minimum value of the screen horizontal ordinate scope of waveform viewing area.
Calculating the interim minimum value of adjusting rear waveform horizontal ordinate scope according to this formula is:
25.97 - ( 200 - 5 ) × ( 33.08 - 25.97 ) 500 - 200 = 21.35 MHz
The peaked formula of horizontal ordinate scope is as follows after calculating the interim adjustment of waveform horizontal ordinate parameter:
H max = H 1 + ( X max - X 1 ) × ( H 2 - H 1 ) X 2 - X 1
In this formula, H MaxThe unknown, the maximal value of expression waveform horizontal ordinate scope; X 1, X 2Known, be respectively the current screen horizontal ordinate of two touch points; H 1, H 2Known, be respectively the waveform horizontal ordinate of two gesture operation starting points; X MaxKnown, be the maximal value of the screen horizontal ordinate scope of waveform viewing area.
Calculating the interim maximal value of adjusting rear waveform horizontal ordinate scope according to this formula is:
25.97 + ( 849 - 200 ) × ( 33.08 - 25.97 ) 500 - 200 = 41.35 MHz
The formula that calculates the rear ordinate stated range minimum of the interim adjustment of waveform ordinate parameter is as follows:
V min = V 1 - ( Y max - Y 1 ) × ( V 1 - V 2 ) Y 2 - Y 1
In this formula, V MinThe unknown, the minimum value of expression waveform ordinate scope; Y 1, Y 2Known, be respectively the current screen ordinate of two touch points; V 1, V 2Known, be respectively the waveform ordinate of two gesture operation starting points; Y MaxKnown, be the maximal value of the screen ordinate scope of waveform viewing area.
Calculating the interim minimum value of adjusting rear waveform ordinate scope according to this formula is:
53.68 - ( 354 - 100 ) × ( 53.68 - 27.37 ) 300 - 100 = 20.27 dBμV
The peaked formula of ordinate scope is as follows after calculating the interim adjustment of waveform ordinate parameter:
V max = V 1 + ( Y 1 - Y min ) × ( V 1 - V 2 ) Y 2 - Y 1
In this formula, V MaxThe unknown, the maximal value of expression waveform ordinate scope; Y 1, Y 2Known, be respectively the current screen ordinate of two touch points; V 1, V 2Known, be respectively the waveform ordinate of two gesture operation starting points; Y MinKnown, be the minimum value of the screen ordinate scope of waveform viewing area.
Calculating the interim maximal value of adjusting rear waveform ordinate scope according to this formula is:
53.68 + ( 100 - 50 ) × ( 53.68 - 27.37 ) 300 - 100 = 60.26 dBμV
As seen, after waveform horizontal stroke, ordinate parameter were all adjusted temporarily, the horizontal ordinate scope became 21.35MHz-41.35MHz, and the ordinate scope becomes 20.27dB μ V-60.26dB μ V.
Because the horizontal ordinate parameter has been carried out interim adjustment, so the ARM main control unit need to be drawn according to the former frequency spectrum data and the parameter reconstruct data that read in the horizontal ordinate scope after adjusting and the embodiment step 1.
Take the minimum value of original waveform horizontal ordinate scope as benchmark, the formula of index that calculates certain data point is as follows:
I = H - H o min H o max - H o min × ( n - 1 )
In this formula, I is unknown, is the index of the minimum value of the relative original waveform horizontal ordinate of certain data point scope; H is known, is the waveform horizontal ordinate of certain data point; H OmaxKnown, be the maximal value of original waveform horizontal ordinate scope; H OminKnown, be the minimum value of original waveform horizontal ordinate scope; N is known, for the waveform of setting in the embodiment step 1 is counted.
Calculate according to this formula, take the minimum value of original waveform horizontal ordinate scope as benchmark, minimum value and the peaked index of waveform horizontal ordinate scope after interim the adjustment.
The index of the minimum value of waveform horizontal ordinate scope is after interim the adjustment:
21.35 - 5 65 - 5 × ( 501 - 1 ) = 136
The peaked index of waveform horizontal ordinate scope is after interim the adjustment:
41.35 - 5 65 - 5 × ( 501 - 1 ) = 303
Then in the storer of the ARM of spectrum analyzer main control unit, redistribute the memory block that to deposit 303-136+1=168 data, and the index value between 136 to 303 processed successively, because these index values are all between 0 to n-1=501-1=500, so only need the original waveform data that each index value is corresponding to store that each self-corresponding position gets final product in the new data memory block into.
The coordinate of setting certain point in the original waveform data is (28.88,40), can calculate its index in original waveform according to the formula of above-mentioned computation index so to be:
28.88 - 5 65 - 5 × ( 501 - 1 ) = 199
After interim adjustment the through above-mentioned waveform parameter, the abscissa value 28.88 of this point will deposit (199-136) * 2+1=127 position in the new data storage area in, and ordinate value 40 will deposit (199-136) * 2+2=128 position in.
After all positions of new data storage area all deposited data in, the ARM main control unit used the horizontal stroke after these data and the adjustment, the drawing function drawing waveforms that the ordinate parameter is passed through Android SDK.See accompanying drawing 4.
In the process that move two touch points, embodiment step 4,5,6 content are that circulation is carried out, until the ARM main control unit detects and has at least a touch point to lift rear circulation to finish.
7. after having at least a touch point to lift, the ARM main control unit just uses the data storage function of Android SDK, the waveform that calculates at last parameter horizontal, ordinate is saved in the storer of DSP measurement module by the data memory interface of DSP, then DSP will process sampled data with new measurement parameter, and the waveform that shows on the display module also can change accordingly.
This process of setting frequency spectrum parameter by gesture operation has just been finished like this.

Claims (4)

1. one kind is the method for supporting the surveying instrument setting measurement parameter of multi-touch screen, it is characterized in that the surveying instrument of described support multi-touch screen is by the main control unit based on ARM, measurement module and display module form, the ARM main control unit is set separately horizontal ordinate or ordinate parameter according to the moving direction of two touch points in the gesture operation, perhaps set simultaneously horizontal ordinate and ordinate parameter, then the measurement parameter of setting is sent to measurement module, measurement module can be processed Wave data with new measurement parameter, these Wave datas is shown in the display module by the ARM main control unit again; The concrete steps of the method are as follows:
Step 1, ARM main control unit read original measurement parameter and Wave data from measurement module, and on display module drawing waveforms;
Two screen coordinate positions that the touch point is pressed when step 2:ARM main control unit reads gesture operation and begins from display module;
Step 3:ARM main control unit is converted to the waveform coordinate with the screen coordinate of two gesture operation starting points on the multi-touch screen;
Screen coordinate position on the step 4:ARM main control unit Real-time Obtaining multi-touch screen in two touch point moving process;
Step 5: judge the interim coordinate direction of adjusting of waveform parameter on the display module;
Step 6:ARM main control unit carries out corresponding interim the adjustment according to the judged result of step 5 to the waveform parameter on the display module;
Step 7: setting measurement parameter
When having the touch point to lift, the measurement parameter memory interface that ARM main control unit usage data memory function and measurement module provide, the last waveform coordinate parameters that calculates of step 6 is saved in the storer of measurement module, measurement module will carry out DATA REASONING, processing according to these new measurement parameters, so just finish the process by the gesture operation setting measurement parameter of 2 touches.
2. method according to claim 1 is characterized in that the concrete grammar of the described drawing waveforms of step 1 is as follows:
Step 1.1, ARM main control unit usage data read functions read original measurement parameter and the Wave data of waveform horizontal ordinate and ordinate scope by the data fetch interface of measurement module, and Wave data are saved in the storer of ARM main control unit; The corresponding horizontal ordinate of each data point and two data of ordinate, set every field measurement waveform n sampled point arranged, then a field wave shape has n to data in the main control unit storer, the horizontal ordinate of first point and ordinate store respectively first and second position into, the horizontal ordinate of second point and ordinate store respectively third and fourth position into, and the rest may be inferred; All horizontal ordinate data are arithmetic progression, the minimum value of the corresponding waveform horizontal ordinate of the abscissa value of first some scope, the maximal value of the corresponding waveform horizontal ordinate of the abscissa value of last some scope;
The screen horizontal ordinate scope of waveform viewing area is X on step 1.2, the set and display module MinTo X Max, screen ordinate scope is Y MinTo Y MaxThe horizontal ordinate of the waveform coordinate system of display module and ordinate scope are respectively horizontal ordinate and the ordinate range parameter that the ARM main control unit is read by measurement module, wherein the minimum value of waveform horizontal ordinate scope and maximal value respectively with minimum value and the maximal value X of screen coordinate system horizontal ordinate scope MinAnd X MaxCorrespondence, the minimum value of waveform ordinate scope and maximal value respectively with maximal value and the minimum value Y of screen coordinate system ordinate scope MaxAnd Y MinCorresponding; The ARM main control unit is determined n coordinate points according to the Wave data of storing in the storer in the waveform coordinate system of display module, n is less than or equal to 100000 integer greater than 0, then use drawing function to connect every two adjacent points, total n-1 bar connecting line has so just drawn whole waveform.
3. method according to claim 1 is characterized in that the method for the interim coordinate direction of adjusting of waveform parameter on the described judgement display module of step 5 is:
The ARM main control unit at first calculates respectively the intermediate point screen coordinate of the home base coordinate position line of storage in current screen coordinate position and the step 2 to two touch points, then calculate the line of two intermediate points and the angle α of abscissa axis;
Set two angle threshold θ 1And θ 2, and 0≤θ 1≤ θ 2≤ 90 °, be used for to divide on the display module that waveform horizontal ordinate parameter is adjusted temporarily, the temporarily adjustment of waveform ordinate parameter, horizontal ordinate and ordinate parameter all adjust the respectively scope of corresponding angle α of three kinds of situations temporarily.Concrete division methods is, if angle α is less than θ 1, then only adjust waveform horizontal ordinate parameter temporarily, namely only revise the scope of waveform coordinate system abscissa axis temporarily; If angle α is greater than θ 2, then only adjust waveform ordinate parameter temporarily, namely only revise the scope of waveform coordinate system axis of ordinates temporarily; And if angle α is more than or equal to θ 1And less than or equal to θ 2, then waveform horizontal ordinate and ordinate parameter are all adjusted temporarily.
4. method according to claim 1 is characterized in that waveform parameter on the described display module of step 6 carries out the corresponding interim method of adjusting and be:
Step 6.1, the interim method of adjusting of waveform horizontal ordinate parameter according to two touch points principle that corresponding waveform horizontal ordinate remains unchanged in moving process, are revised the scope of waveform coordinate system abscissa axis by the ARM main control unit;
Step 6.2, the interim method of adjusting of waveform ordinate parameter according to two touch points principle that corresponding waveform ordinate remains unchanged in moving process, are revised the scope of waveform coordinate system axis of ordinates by the ARM main control unit;
If step 6.3 waveform need to carry out the interim adjustment of horizontal ordinate and ordinate parameter simultaneously, then can adjust first waveform horizontal ordinate parameter temporarily, adjust again waveform ordinate parameter temporarily, also can adjust first waveform ordinate parameter temporarily, adjust again waveform horizontal ordinate parameter temporarily;
If step 6.4 ARM main control unit has carried out interim adjustment to waveform horizontal ordinate parameter, then also need to re-construct new Wave data in order to draw according to the original measurement parameter that reads in the waveform horizontal ordinate scope after adjusting and the step 1 and Wave data, construct new Wave data by take horizontal ordinate as with reference to intercepting or the mode of interpolation is finished, concrete grammar is as follows:
At first, the minimum value of the original waveform horizontal ordinate scope that the ARM main control unit reads in the step 1 is as benchmark, and index is 0, calculates minimum value and the index of maximal value in former horizontal ordinate arithmetic progression of waveform horizontal ordinate scope after adjusting;
The index of setting the minimum value of the relative original waveform horizontal ordinate with maximal value of the minimum value scope after waveform horizontal ordinate parameter is adjusted temporarily is respectively I MinAnd I Max, the horizontal ordinate stated range minimum after the adjustment is during less than former minimum value, I MinBe negative value, the sampling number of the Wave data that will re-construct so is I Max-I Min+ 1; In order to deposit the Wave data of neotectonics, in the storer of ARM main control unit, distribute one and can place (I Max-I Min+ 1) memory block of a data * 2;
Next determine above-mentioned I Max-I MinWaveform horizontal ordinate and the ordinate of each point in+1 point, and be saved in the newly assigned memory block of storer of ARM main control unit.Explanation in storage mode and the step 1 is similar, I MinFirst and second positions of respectively corresponding this memory block of the horizontal ordinate of the data point of index and ordinate, I MinThird and fourth position of respectively corresponding this memory block of the horizontal ordinate of the data point of+1 index and ordinate, the like, I Max(the I of respectively corresponding this memory block of the horizontal ordinate of the data point of index and ordinate Max-I Min) * 2+1 and (I Max-I MinA) * 2+2 position;
Specific practice is, to I MinAnd I MaxBetween each index value calculate successively waveform horizontal ordinate and the ordinate of the point of its correspondence, setting I is I MinAnd I MaxBetween arbitrary index value, if index value I is less than 0 or greater than n-1, then the waveform ordinate of the point of its correspondence is got default value, this default value can be set as arbitrary value, but all are less than 0 or identical greater than default value palpus corresponding to the index value of n-1, obtain again the waveform horizontal ordinate of index I corresponding point by the arithmetic progression formula, the position, memory block that the waveform horizontal ordinate that then will put and ordinate deposit above-mentioned correspondence in; And if index value I is more than or equal to 0 and less than or equal to n-1, index value is horizontal ordinate and the correspondence position that ordinate copies index I in the new data memory block to, the i.e. (I-I of the data point of I in the original waveform data that then step 1 is read Min) * 2-1 and (I-I MinA) * 2+2 position; Calculate so successively I MinAnd I MaxBetween the waveform horizontal ordinate and ordinate of each index value corresponding point after, each position of new data storage area has just deposited data in, these data are exactly the Wave data according to the interim waveform horizontal ordinate parameter renegotiation neotectonics of adjusting;
Step 6.5, last ARM main control unit use interim waveform horizontal ordinate, ordinate parameter and the Wave data drawing waveforms on display module of adjusting according to the drawing practice in the step 1, like this measurement parameter is final just can preview part effect before setting;
Step 6.6, two touch points are continued to keep down state and are arbitrarily mobile in the waveform viewing area, by the method repeating step 4 that uses circulation, 5 and 6 detection and computing, have at least a touch point to lift rear end until the ARM main control unit detects.
CN201210443979.0A 2012-11-08 2012-11-08 Method of measuring parameters set by measuring instrument for the purpose of supporting multi-touch screen Active CN102981673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210443979.0A CN102981673B (en) 2012-11-08 2012-11-08 Method of measuring parameters set by measuring instrument for the purpose of supporting multi-touch screen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210443979.0A CN102981673B (en) 2012-11-08 2012-11-08 Method of measuring parameters set by measuring instrument for the purpose of supporting multi-touch screen

Publications (2)

Publication Number Publication Date
CN102981673A true CN102981673A (en) 2013-03-20
CN102981673B CN102981673B (en) 2015-06-24

Family

ID=47855781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210443979.0A Active CN102981673B (en) 2012-11-08 2012-11-08 Method of measuring parameters set by measuring instrument for the purpose of supporting multi-touch screen

Country Status (1)

Country Link
CN (1) CN102981673B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104181365A (en) * 2013-05-24 2014-12-03 苏州普源精电科技有限公司 Measurement device with zoom display function

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030142142A1 (en) * 2002-01-25 2003-07-31 Jaffe Stanley Edward Rapid graphical analysis of waveforms using a pointing device
CN101131404A (en) * 2006-08-25 2008-02-27 王悦 Digital oscillograph and its waveshape displaying method
CN101413968A (en) * 2008-09-30 2009-04-22 中国电子科技集团公司第四十一研究所 Digital oscilloscope and method for controlling display waveform
US20090265126A1 (en) * 2006-05-22 2009-10-22 Rohde & Schwarz Gmbh & Co. Kg Measuring device for a preview display of several time-variable electrical signals

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030142142A1 (en) * 2002-01-25 2003-07-31 Jaffe Stanley Edward Rapid graphical analysis of waveforms using a pointing device
US20090265126A1 (en) * 2006-05-22 2009-10-22 Rohde & Schwarz Gmbh & Co. Kg Measuring device for a preview display of several time-variable electrical signals
CN101131404A (en) * 2006-08-25 2008-02-27 王悦 Digital oscillograph and its waveshape displaying method
CN101413968A (en) * 2008-09-30 2009-04-22 中国电子科技集团公司第四十一研究所 Digital oscilloscope and method for controlling display waveform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104181365A (en) * 2013-05-24 2014-12-03 苏州普源精电科技有限公司 Measurement device with zoom display function
CN104181365B (en) * 2013-05-24 2019-01-29 苏州普源精电科技有限公司 A kind of measuring device with zooming display function

Also Published As

Publication number Publication date
CN102981673B (en) 2015-06-24

Similar Documents

Publication Publication Date Title
CN102799358B (en) The determination method and device of display position of cursor
CN102902407B (en) A kind of touch-screen output display touches the method and apparatus of person's handwriting
CN104898981B (en) Method, apparatus and terminal for identifying a gesture
CN102903134B (en) Fast Drawing is the method for curve repeatedly
CN103488413B (en) Touch control device and show control method and the device at 3D interface on touch control device
CN103164865B (en) A kind of method and apparatus that handwriting input is beautified
CN104317398B (en) A kind of gestural control method, Wearable and electronic equipment
CN110727496B (en) Layout method and device of graphical user interface, electronic equipment and storage medium
CN105094440B (en) A kind of touch screen anti-fluttering method, system and mobile terminal based on mobile terminal
CN106527915A (en) Information processing method and electronic equipment
CN102937850A (en) Method for beautifying handwriting in real time and electronic equipment
CN107329644A (en) A kind of icon moving method and device
CN102681742B (en) Touch signal detection method for capacitive touch screen
CN106441221A (en) Method for treating surveying and mapping cross section based on secondary development of AutoCAD
CN104102450A (en) Touch screen based gesture recognition method and system
CN115587552B (en) Grid optimization method and device, terminal equipment and storage medium
CN103049102B (en) Mouse data treating apparatus and mouse data disposal route
CN102981673A (en) Method of measuring parameters set by measuring instrument for the purpose of supporting multi-touch screen
CN106951166A (en) Person's handwriting method for drafting and device
CN108279846A (en) A kind of gesture model establishes, the method and device of gesture authentication
CN106095158B (en) Computational methods, device and the system of control cursor movement of the displacement vector of cursor
CN104123748A (en) Screen space point light source based method for achieving real-time dynamic shadows
CN109408566A (en) A kind of intelligence chart recommended method and device
US10318150B2 (en) Segment length measurement using a touch screen system in response to gesture input
CN104808055A (en) Electrical signal frequency digitized measurement method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 300384, Tianjin Xiqing District New Technology Industrial Park (outside the ring), Hai Tai innovation, No. three, 8 Road

Patentee after: Tianjin Deli Instrument Equipment Co., Ltd.

Address before: 300384, Tianjin Xiqing District New Technology Industrial Park (outside the ring), Hai Tai innovation, No. three, 8 Road

Patentee before: Deli Electronic Instrument Co., Ltd., Tianjin City