Post Reply 
HP 48G Linear Regression Best Fit Line
12-23-2021, 04:32 PM (This post was last modified: 12-23-2021 04:41 PM by Rodger Rosenbaum.)
Post: #59
RE: HP 48G Linear Regression Best Fit Line
(12-23-2021 04:01 PM)MNH Wrote:  
(12-23-2021 01:07 PM)Rodger Rosenbaum Wrote:  When you execute ORTH the first number (.008321172 for the data we've been testing with) is the slope. The angle the line makes with the x axis is just the atan of the slope.

Perfect! I get 0.476757033 decimal degrees, which equals 0°28'36". That would be in the first (northeast) quadrant turning clockwise from 0° north. I have to test the slope angle in all 4 quadrants because the angle might be restricted to 0° through 90°. I'm wondering if the slope angle for quadrants 3 (southwest) and 4 (northwest) would be a negative number because the x-values in those quadrants are negative.

Another thing I have to do is get coordinates for both ends of the BFL. Depending on which direction I'm coming from along the line, I need to be able to define the line by entering a coordinate and a direction. In this case our line runs on an azimuth of 0°28'36" (N 0°28'36" E) along the west side of a road. I will need to check the perpendicular offsets from our line to points on the other side of the road. Coordinates will be necessary to do this.

Have a look at this: https://www.chilimath.com/lessons/interm...cept-form/

and also look at this article: https://en.wikipedia.org/wiki/Azimuth

In the Wikipedia article a little over halfway down the page under the heading "in Cartography" see:

"Remark that the reference axes are swapped relative to the (counterclockwise) mathematical polar coordinate system and that the azimuth is clockwise relative to the north. This is the reason why the X and Y axis in the above formula are swapped. If the azimuth becomes negative, one can always add 360°. "

The result from ORTH and OFIT are in the mathematical polar coordinate system. The angle of the line ORTH got for your test data is measured counter-clockwise from the positive X axis, so the azimuth you want is atan(1/.008321172) = 89.5232429674 decimal degrees clockwise from north.

For coordinates of the end of the BFL, you can pick an arbitrary X1 value near one end of the line and plug it into the formula Y1 = m*X1 + b, where m=.008321172 and b = 672.344948942

Then pick another arbitrary X2 near the other end of the line and plug it in the formula Y2 = m*X2 +b.

This will give a couple of coordinates (X1,Y1) and (X2,Y2) in the mathematical rectangular coordinate system. You may need to convert these to the system surveyors use if it's different.

It occurs to me that I assumed the data you gave:

The actual survey data is

PT # Northing Easting Elevation Description

248 29945.480 921.773 0.000 PROP_COR
249 30002.951 922.245 0.000 PROP_COR
250 30006.678 982.237 0.000 PROP_COR
251 30058.926 921.687 0.000 PROP_COR
252 30114.903 923.001 0.000 PROP_COR
253 30119.876 983.350 0.000 PROP_COR
254 30221.977 924.059 0.000 PROP_COR'

is in standard mathematical rectangular coordinates, and the results from ORTH and OFIT being in the same system will apply to the system being used by the survey data as far as coordinates go. Plainly, the azimuth will have be derived from the polar coordinate system assumed by ORTH and OFIT.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-23-2021 04:32 PM



User(s) browsing this thread: 1 Guest(s)