Distance reduction with the use of UDF and Mathematica Redukcija dolžin z uporabo MS Excel-ovih lastnih funkcij in programa Mathematica Milivoj Vulic 1, Uroš Brecelj2 1 University of Ljubljana, Faculty of Natural sciences and Engineering, Department of Geo-technology and Mining Engineering, Aškerčeva cesta 12, SI-1000 Ljubljana, Slovenia; E-mail: milivoj.vulic@ntf.uni-lj.si 2 Primorje d.d., Vipavska cesta 3, 5270 Ajdovščina, Slovenia; E-mail: uros.brecelj@primorje.si Received: September 2, 2007 Accepted: September 26, 2007 Abstract: On market exist plenty of computer programs for distance reductions. Mostly the programs are not for free and we do not have insight into their working. To avoid these disadvantages we can create our own program in Microsoft Excel. In Microsoft Excel is possible to create user defined functions (UDF), which we could use just like the build-in Microsoft Excel functions. With user defined functions (UDF) in combination with Add-in program it is possible to upload Excel files on our or other computers. In the sequel is rewiev of the functions, which we need for reduction measured distance into the referential plane and later on the plane on choosen projectional plane. For all function are carried out equations for standard errors and influence of intakes on final result. Izvleček: Na tržišču je prisotnih več programov za redukcijo dolžin, ki pa niso brezplačni, poleg tega pa nimamo vpogleda v njihovo delovanje. V izogib temu si lahko izdelamo lasten program v Microsoft Excelu. V Microsoft Excelu je mogoča izdelava lastnih funkcij, ki jih uporabljamo enako kot že izdelane Excelove funkcije. S kombinacijo lastnih funkcij in Add-in programa lahko nadgrajujemo Excelove datoteke na svojem ali na drugih računalnikih. V nadaljevanju sledi pregled funkcij, ki jih potrebujemo pri redukciji merjene dolžine na referenčno ploskev in nato na izbrano projekcijsko ravnino. Za vse funkcije so v programu Mathematica izpeljane enačbe standardnih pogreškov in njihov vpliv na končni rezultat. Key words: distance reduction, MS Excel, user defined function (UDF), Add-in, standard error Ključne besede: redukcija dolžin, MS Excell, lastne funkcije, Add-in, Mathematica, standardni pogrešek Distance reduction Measured distance is not adequate for direct use in mine surveying. It must be corrected for several reasons: - Meteorological corrections: laser beam is passing through the layers of air with different density, what is reason for refraction of the laser beam and con-sequentaly measured distance. - Geometrical corrections: show difference between space curve and slope distance on level of a ground points, correction for refractional curve and horizontal eccentricity of distance meters. - Projectional corrections: means transmission of slope distance on spherical arc lenght on level of referential plane and later on choosen projectional plane. No measuring system is perfect, and so it will show more or less small defiencies in mechanical, optical and electronical components. These instrumental errors have influence on reduced distance and therefore must be investegated. Add-in program Distance reduction Purpose of the Add-in program Distance reduction is to facilitate process of reduction them which are involved in surveying distances. It is a free program, which you can download from http://www.geo.ntf.uni-lj. si/mvulic/diplome/Brecelj/Distance_re-ductions.xla. Program can use everyone with basic knowledge of Excell. Design of the program enable distance reduction without knowing the theory of reduction, with simple intake of measured quantitys program return reduced distance. About using Add-in program Add-in is a supplemental program that adds custom comands or custom featues to Microsoft Office. These commands is possible to define as a user defined functions in Microsoft Visual Basic for Applications. User defined functions are created after our own requires, we can define function which we need for our needs and is impossible to found it in build-in Excel functions. With this we save our time because once defined function is allways on disposal. Add-in is possible to use in all MS Excell files on your or on other computers that you use. Add-in have an .xla file extension, which we get in the Save as dialog box, Save as type. After installing an add-in on your computer, you must load it into Excel. Loading an add-in makes the feature available in Excel and adds any associated commands to the appropriate menus In the Add-Ins available box, select the check box next to the add-in you want to load, and then click OK. If you don't use often add-ins unload it to conserve memory and improve performance. Unloading an add-in removes its features and commands from Excel, but the add-in program remains on your computer so you can easily reload it. Once tested function or program is in further use as a black box. Figure 1. Saving Excel file as Add-in Slika 1. Shranjevanje Excelove datoteke kot Add-in Figure 2. Loading Add-in program Slika 2. Nalaganje Add-in programa Presentation of the functions Functions for reduction with measured zenith distance and reduction with known heights are described in following text. mDsurvey This function returns the value of standard error of measured distance. Entry: measured distance [Dsurvey], accuracy of distance meter [mm] and [ppm]. Exit: standard error of measured distance [mDsurvey]. Meteorological corrections Em This function returns the value of saturated pressure of water steam. Entry: constant a [alpha], constant ß [beta], constant y [gamma], wet temperature [Twet]. Exit: saturated pressure of water steam [Em]. eP This function returns the value of partial pressure of water steam. Entry: temperature [T], wet temperature [Twet], constant K [Kcons], air pressure [p], saturated pressure of water steam [Em]. Exit: partial pressure of water steam [Ep]. Ngroup This function returns the value of group break quotient. Entry: constant A [Acons], constant B [Bcons], constant C [Ccons], wavelenght [LambdaNeff]. Exit: group break quotient [Ngroup]. Nact This function returns the value of actual break quotient. Entry: group break quotient [Ngroup], air pressure [p], wet temperature [Twet]. Exit: actual break quotient [Nact]. distDmet This function returns the value of distance reduced with meteorological correction. Entry: measured distance [distDsurvey], actual break quotient [Nact], referential break quotient [N0]. Exit: distance reduced with meteorological correction [distDmet]. mDmeteoCorr This function returns the value of standard error of distance reduced with meteorological correction. Entry: measured distance [distDsurvey], standard error of measured distance [mD-survey], temperature [T], standard error of temperature [mT], wet temperature [Twet], standard error of wet temperature [mTwet], air pressure [p], standard error of air pressure [mp], referential break quotient [N0], standard error of referential break quotient [mN0], wavelenght [LambdaNeff], standard error of wavelenght [mLambdaNeff], extensional coefficient of air [AlphaAir], standard error of extensional coefficient of air [mAlphaAir], constant A [Acons], standard error of constant A [mAcons], constant B [Bcons], standard error of constant B [mBcons], constant C [Ccons], standard error of constant C [mCcons], constant a [alpha], standard error of constant a [mAlpha], constant p [beta], standard error of constant p [mBeta], constant y [gamma], standard error of constant y [mGamma], constant K [Kcons], standard error of constant K [mKcons]. Exit: standard error of distance reduced with meteorological correction [mDmete-oCorr], without intermediate results. StdErrDsurveyDmet This function returns influence of standard error of measured distance on distance reduced with meteorological correction. Entry: standard error of measured distance [mDsurvey], referential break quotient [N0], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelenght [LambdaNeff], constant a [alpha], constant / [beta], constant Y [gamma], constant K [Kcons]. Exit: influence of standard error of measured distance on distance reduced with meteorological correction [StdErrDsurveyDmet]. StdErrNoDmet This function returns influence of referential break quotient on distance reduced with meteorological correction. Entry: standard error of referential break quotient [mN0], measured distance [dis-tDsurvey], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelenght [LambdaNeff], constant a [alpha], constant / [beta], constant Y [gamma], constant K [Kcons]. Exit: influence of standard error of referential break quotient on distance reduced with meteorological correction [StdEr-rN0Dmet]. StdErrPDmet This function returns influence of standard error of air pressure on distance reduced with meteorological correction. Entry: standard error of air pressure [mp], measured distance [distDsurvey], referential break quotient [N0], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelenght [LambdaNeff], constant a [alpha], constant / [beta], constant y [gamma], constant K [Kcons]. Exit: vpliv influence of standard error of air pressure on distance reduced with meteorological correction [StdErrPDmet]. StdErrTmet This function returns influence of standard error of temperature on distance reduced with meteorological correction. Entry: standard error of temperature [mT], measured distance [distDsurvey], referential break quotient [N0], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelenght [LambdaNeff], constant a [alpha], constant / [beta], constant y [gamma], constant K [Kcons]. Exit: influence of standard error of temperature on distance reduced with meteorological correction [StdErrTDmet]. StdErrTwetDmet This function returns influence of standard error of wet temperature on distance reduced with meteorological correction. Entry: standard error of wet temperature [mTwet], measured distance [distDsurvey], referential break quotient [N0], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelen-ght [LambdaNefi], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: influence of standard error of wet temperature on distance reduced with meteorological correction [StdErrTwetD-met]. StdErrAlphaAirDmet This function returns influence of standard error of extensional coefficient of air on distance reduced with meteorological correction. Entry: standard error of extensional coefficient of air [mAlphaAir], measured distance [distDsurvey], referential break quotient [N0], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelenght [LambdaNeff], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: influence of standard error of extensi-onal coefficient of air on distance reduced with meteorological correction [StdEr-rAlphaAirDmet]. StdErrKDmet This function returns influence of constant K on distance reduced with meteorological correction. Entry: standard error of constant K [mK-cons], measured distance [distDsurvey], referential break quotient [N0], temperature [T], wet temperature [Twet], air pressure [p extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelenght [Lambda- Neff], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: influence of standard error of con-stantK on distance reduced with meteorological correction [StdErrKconsDmet]. StdErrAlphaDmet This function returns influence of constant a on distance reduced with meteorological correction. Entry: standard error of constant a [mAlpha], measured distance [distDsurvey], referential break quotient [N0], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelen-ght [LambdaNeff], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: influence of standard error of constant a on distance reduced with meteorological correction [StdErrAlphaDmet]. StdErrBetaDmet This function returns influence of constant P on distance reduced with meteorological correction. Entry: standard error of constant p [mBe-ta], measured distance [distDsurvey], referential break quotient [N0], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelenght [Lambda-Neff], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: influence of standard error of constant p on distance reduced with meteorological correction [StdErrBetaDmet]. StdErrGammaDmet This function returns influence of constant y on distance reduced with meteorological correction. Entry: standard error of constant y [mGam-ma], measured distance [distDsurvey], referential break quotient [N0], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelenght [Lambda-Neff], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: influence of standard error of constant y on distance reduced with meteorological correction [StdErrGammaDmet]. StdErrAconsDmet This function returns influence of constant A on distance reduced with meteorological correction. Entry: standard error of constant A [mA-cons], measured distance [distDsurvey], referential break coefficient [N0],temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelength [Lambda-Neff], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: standard error of constant A on distance reduced with meteorological correction [StdErrAconsDmet]. StdErrBconsDmet This function returns influence of constant B on distance reduced with meteorological correction. Entry: standard error of constant B [mB-cons], measured distance [distDsurvey], referential break coefficient [N0],temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelength [Lambda-Neff], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: standard error of constant B on distance reduced with meteorological correction [StdErrBconsDmet]. StdErrCconsDmet This function returns influence of constant C on distance reduced with meteorological correction. Entry: standard error of constant C [mC-cons], measured distance [distDsurvey], referential break coefficient [N0],temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelength [Lambda-Neff], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: standard error of constant C on distance reduced with meteorological correction [StdErrCconsDmet]. StdErrLambdaNeffDmet This function returns influence of wave-lenght [LambdaNeff] on distance reduced with meteorological correction. Entry: standard error of wavelenght [mLambdaNeff], measured distance [distDsurvey], referential break coefficient [N0], temperature [T], wet temperature [Twet], air pressure [p], extensional coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], wavelength [LambdaNeff], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: standard error of wavelenght on distance reduced with meteorological correc- tion [StdErrLambdaNeffDmet]. Geometrical corrections distDr This function returns the value of distance reduced with additional constant. Entry: distance reduced with meteorological correction [distDmet], additional constant [Ka]. Exit: distance reduced with additional constant [distDr]. mDr This function returns the value of standard error of distance reduced with additional constant. Entry: distance reduced with meteorological correction [distDmet], standard error of distance reduced with meteorological correction [mDmet], additional constant [Ka], standard error of additional constant [mKa]. Exit: standard error of distance reduced with additional constant [mDr]. StdErrDmetDr This function returns influence of standard error of distance reduced with meteorological correction on distance reduced with additional constant. Entry: standard error of distance reduced with meteorological correction [mDmet]. Exit: influence of standard error of distance reduced with meteorological correction on distance reduced with additional constant. [StdErrDmetDr]. StdErrKaDr This function returns influence of standard error of additional constant on distance reduced with additional constant. Entry: standard error of additional constant [mKa]. Exit: influence of standard error of additional constant on distance reduced with additional constant [StdErrKaDr]. distDslopeZen This function returns the value of slope distance, defined with zenith distance. Entry: distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R]. Exit: slope distance, defined with zenith distance [distDslopeZen]. mDslopeZen This function returns the value of standard error of slope distance, defined with zenith distance. Entry: distance reduced with additional constant [distDr], standard error of distance reduced with additional constant [mDr], height of instrument [i], standard error of height of instrument [mi], height of reflector [l], standard error of height of reflector [ml], height of reflector standing [Hi], standard error of height of reflector standing [mHi], zenith distance [zd], standard error of zenith distance [mzd], radius of Earth [R] , standard error of radius of Earth [mR]. Exit: standard error of slope distance, defined with zenith distance [mDslopeZen]. StdErrlDslopeZen This function returns influence of standard error of height of instrument on slope distance, defined with zenith distance. Entry: standard error of height of instrument [mi], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], zenith distance [zd], radius of Earth[R]. Exit: influence of standard error of height of instrument na slope distance, defined with zenith distance [StdErrIDslopeZen]. StdErrLDslopeZen This function returns influence of standard error of height of reflector on slope distance, defined with zenith distance. Entry: standard error of height of reflector [ml], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], zenith distance [zd], radius of Earth[R]. Exit: influence of standard error of height of reflector na slope distance, defined with zenith distance [StdErrLDslopeZen]. StdErrHiDslopeZen This function returns influence of standard error of height of instrument standing on slope distance, defined with zenith distance. Entry: standard error of height of instrument standing [mHi], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], zenith distance [zd], radius of Earth[R]. Exit: influence of standard error of height of instrument standing on slope distance, defined with zenith distance [StdErrHiD-slopeZen]. StdErrRDslopeZen This function returns influence of standard error of radius of earth on slope distance, defined with zenith distance. Entry: standard error of radius of Earth [mR], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], zenith distance [zd], radius of Earth[R]. Exit: influence of standard error of radius of Earth on slope distance, defined with zenith distance [StdErrRDslopeZen]. StdErrDrDslopeZen This function returns influence of standard error of distance reduced with additional constanton slope distance, defined with zenith distance. Entry: standard error of distance reduced with additional constant [mDr], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], zenith distance [zd], radius of Earth[R]. Exit: influence of standard error of distance reduced with additional constant on slope distance, defined with zenith distance [StdErrDrDslopeZen]. StdErrZdDslopeZen This function returns influence of standard error of zenith distance on slope distance, defined with zenith distance. Entry: standard error of zenith distance [mzd], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R]. Exit: influence of standard error of zenith distance on slope distance, defined with zenith distance [StdErrZdDslopeZen]. distDslope This function returns the value of slope distance, defined with known heights. Entry: distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: slope distance, defined with known heights [distDslope]. mDslope This function returns the value of standard error of slope distance, defined with known heights. Entry: distance reduced with additional constant [distDr], standard error of distance reduced with additional constant [mDr], height of instrument [i], standard error of height of instrument [mi], height of reflector [l], standard error of height of reflector [ml], height of instrument standing [Hi], standard error of height of instrument standing [mHi], height of reflector standing [Hl], standard error of height of reflector standing [mHl], radius of Earth [R], standard error of radius of Earth [mR]. Exit: standard error of slope distance, defined with known heights [mDslope]. StdErrlDslope This function returns influence of standard error of height of instrument on slope distance, defined with known heights. Entry: standard error of height of instrument [mi], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of height of instrument na slope distance [StdErrID- slope]. StdErrLDslope This function returns influence of standard error of height of reflector on slope distance, defined with known heights. Entry: standard error of height of reflector [ml], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of height of reflector na slope distance [StdErrLD-slope]. StdErrHiDslope This function returns influence of standard error of height of instrument standing on slope distance, defined with known heights. Entry: standard error of height of instrument standing [mHi], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l]. Exit: influence of standard error of height of instrument standing na slope distance [StdErrHiDslope]. StdErrHlDslope This function returns influence of standard error of height of reflector standing on slope distance, defined with known heights. Entry: standard error of height of reflector standing [mHl], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l]. Exit: influence of standard error of height of reflector standing na slope distance [StdErrHlDslope]. StdErrRDslope This function returns influence of standard error of radius of Earth on slope distance, defined with known heights. Entry: standard error of radius of Earth [mR], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l]. Exit: influence of standard error of radius of Earth na slope distance [StdErrRDslope]. StdErrDrDslope This function returns influence of standard error of distance reduced with additional constanton slope distance, defined with known heights. Entry: standard error of distance reduced with additional constant [mDr], distance reduced with additional constant [distDr], height of instrument [i], height of reflector [l], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of radius of Earth na slope distance [StdErrDrDslo-pe]. Projectional corrections distDzenDir This function returns the value of spherical arc length on referential plane of the earth, this is a plane of referential sphere, defined with zenith distance and direct reduction. Entry: slope distance [distDslopeZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R], refracti- onal coefficient [k]. Exit: spherical arc lenght [distDzenDir]. mDzenDir This function returns the value of standard error of spherical arc length on referential plane of the earth, defined with zenith distance and direct reduction. Entry: slope distance [distDslopeZen], standard error of slope distance [mDslope-Zen], height of instrument standing [Hi], standard error of height of reflector standing [mHi], zenith distance [zd], standard error of zenith distance [mzd], radius of Earth [R], standard error of radius of Earth [mR], refractional coefficient [k], standard error of refractional coefficient [k]. Exit: standard error of spherical arc lenght [mDzenDir]. StdErrHiDzenDir This function returns influence of standard error of height of instrument standing on spherical arc lenght on referential plane of Earth, defined with zenith distance and direct reduction. Entry: standard error of height of reflector standing [mHi], slope distance [distDslo-peZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of height of reflector standing [StdErrHiDzenDir]. StdErrRDzenDir This function returns influence of standard error of radius of Earth on spherical arc lenght on referential plane of Earth, defined with zenith distance and direct reduction. Entry: standard error of radius of Earth [mR], slope distance [distDslopeZen], hei- ght of instrument standing [Hi], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of radius of Earth [StdErrRDzenDir]. StdErrDslopeDzenDir This function returns influence of standard error of slope distance on spherical arc lenght on referential plane of Earth, defined with zenith distance and direct reduction. Entry: standard error of slope distance [mR], slope distance [distDslopeZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of slope distance [StdErrDslopeDzenDir]. StdErrZdDzenDir This function returns influence of standard error of zenith distance on spherical arc lenght on referential plane of Earth, defined with zenith distance and direct reduction. Entry: standard error of zenith distance [mzd], slope distance [distDslopeZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of zenith distance [StdErrZdDzenDir]. StdErrKDzenDir This function returns influence of standard error of refractional coefficient [k] on spherical arc lenght on referential plane of Earth, defined with zenith distance and direct reduction. Entry: standard error of refractional coefficient [mk], slope distance [distDslopeZen], height of instrument standing [Hi], height of reflector standing [Hl], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of refractional coefficient [StdErrKDzenDir]. distDzenGrad This function returns the value of spherical arc length on referential plane of the earth, this is a plane of referential sphere, defined with zenith distance and gradual reduction. Entry: slope distance [distDslopeZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R], height of reflector standing [Hl], refractional coefficient [k]. Exit: spherical arc lenght [distDzenGrad]. mDzenGrad This function returns the value of standard error of spherical arc length on referential plane of the earth, defined with zenith distance and gradual reduction. Entry: slope distance [distDslopeZen], standard error of slope distance [mDslope-Zen], height of instrument standing [Hi], standard error of height of reflector standing [mHi], height of reflector standing [Hl], standard error of height of reflector standing [mHl], zenith distance [zd], standard error of zenith distance [mzd], radius of Earth [R], standard error of radius of Earth [mR], refractional coefficient [k], standard error of refractional coefficient [mk]. Exit: standard error of spherical arc lenght [mDzenGrad]. StdErrHiDzenGrad This function returns influence of standard error of height of instrument standing on spherical arc lenght on referential plane of Earth, defined with zenith distance and gradual reduction. Entry: standard error of height of reflector standing [mHi], slope distance [distDslo-peZen], height of instrument standing [Hi], height of reflector standing [Hl], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of height of reflector standing [StdErrHiDzenDir]. StdErrHlDzenGrad This function returns influence of standard error of height of reflector standing on spherical arc lenght on referential plane of Earth, defined with zenith distance and gradual reduction. Entry: standard error of height of reflector standing [mHl], slope distance [distDslo-peZen], height of instrument standing [Hi], height of reflector standing [Hl], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of height of reflector standing [StdErrHlDzenDir]. StdErrRDzenGrad This function returns influence of standard error of radius of Earth on spherical arc lenght on referential plane of Earth, defined with zenith distance and gradual reduction. Entry: standard error of radius of Earth [mR], slope distance [distDslopeZen], height of instrument standing [Hi], height of reflector standing [Hl], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of radius of Earth [StdErrRDzenDir]. StdErrDslopeDzenGrad This function returns influence of standard error of slope distance on spherical arc lenght on referential plane of Earth, defined with zenith distance and gradual reduction. Entry: standard error of slope distance [mDslope], slope distance [distDslope-Zen], height of instrument standing [Hi], height of reflector standing [Hl], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of slope distance [StdErrDslopeDzenDir]. StdErrZdDzenGrad This function returns influence of standard error of zenith distance on spherical arc lenght on referential plane of Earth, defined with zenith distance and gradual reduction. Entry: standard error of zenith distance [mzd], slope distance [distDslopeZen], height of instrument standing [Hi], height of reflector standing [Hl], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of zenith distance [StdErrZdDzenDir]. StdErrKDzenGrad This function returns influence of standard error of refractional coefficient on spherical arc lenght on referential plane of Earth, defined with zenith distance and gradual reduction. Entry: standard error of refractional coefficient [mk], slope distance [distDslopeZen], height of instrument standing [Hi], height of reflector standing [Hl], zenith distance [zd], radius of Earth [R], refractional coefficient [k]. Exit: influence of standard error of refractional coefficient [StdErrKDzenDir]. distDoDir This function returns distance of chord in level of horizont, defined with known heights and direct reduction. Entry: slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: chord lenght in horizontal level [di-stDoDir]. mDoDir This function returns the value of standard error of distance of chord with known heights and direct reduction. Entry: slope distance [distDslope], standard error of slope distance [mDslope], height of instrument standing [Hi], standard error of height of instrument standing [mHi], height of reflector standing [Hl], standard error of height of reflector standing [mHl], radius of Earth [R], standard error of radius of Earth [mR]. Exit: standard error of chord lenght in horizontal level [mDoDir]. StdErrDslopeDoDir This function returns influence of standard error of slope distance on chord lenght on horizontal level, defined with direct reduction. Entry: standard error of slope distance [mDslope], slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of slope distance [StdErrDslopeDoDir]. StdErrHiDoDir This function returns influence of standard error of height of instrument standing on chord lenght on horizontal level, defined with direct reduction. Entry: standard error of height of instrument standing [mHi], slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of height of instrument standing [StdErrHiDoDir]. StdErrHlDoDir This function returns influence of standard error of height of reflector standing on chord lenght on horizontal level, defined with direct reduction. Entry: standard error of height of reflector standing [mHl], slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of height of reflector standing [StdErrHlDoDir]. StdErrRDoDir This function returns influence of standard error of radius of Earth on chord lenght on horizontal level, defined with direct reduction. Entry: standard error of radius of Earth [mR], slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of radius of Earth [StdErrRDoDir]. distDoGrad This function returns distance of chord in level of horizont, defined with known heights and gradual reduction. Entry: slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: chord lenght in horizontal level [dis-tDoGrad]. mDoGrad This function returns the value of standard error of distance of chord with known heights and gradual reduction. Entry: slope distance [distDslope], standard error of slope distance [mDslope], height of instrument standing [Hi], standard error of height of instrument standing [mHi], height of reflector standing [Hl], standard error of height of reflector standing [mHl], radius of Earth [R], standard error of radius of Earth [mR]. Exit: standard error of chord lenght in horizontal level [mDoGrad]. StdErrDslopeDoGrad This function returns influence of standard error of slope distance on chord lenght on horizontal level, defined with gradual reduction. Entry: standard error of slope distance [mDslope], slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of slope distance [StdErrDslopeDoGrad]. StdErrHiDoGrad This function returns influence of standard error of height of instrument standing on chord lenght on horizontal level, defined with gradual reduction. Entry: standard error of height of instrument standing [mHi], slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of height of instrument standing [StdErrHiDoDir]. StdErrHlDoGrad This function returns influence of standard error of height of reflector standing on chord lenght on horizontal level, defined with gradual reduction. Entry: standard error of height of reflector standing [mHl], slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of height of reflector standing [StdErrHlDoDir]. StdErrRDoGrad This function returns influence of standard error of radius of Earth on chord lenght on horizontal level, defined with gradual reduction. Entry: standard error of radius of Earth [mR], slope distance [distDslope], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: influence of standard error of radius of Earth [StdErrRDoDir]. distDrefPlane This function returns the value of spherical arc length on referential plane of the earth, this is a plane of referential sphere, defined with known heights. Entry: chord lenght in horizontal level [di- stDoDir], radius of Earth [R]. Exit: spheric arc lenght [distDrefPlane]. mDrefPlane This function returns the value of standard error of spherical arc length on referenti- al plane of the earth, defined with known heights. Entry: chord lenght in horizontal level [di-stDoDir], standard error of chord lenght in horizontal level [mDoDir], radius of Earth [R], standard error of radius of Earth [mR]. Exit: standard error of spheric arc lenght [mDrefPlane]. StdErrRDrefPlane This function returns influence of standard error of radius of Earth on spherical arc lenght on referential plane of Earth, defined with known heights. Entry: standard error of radius of Earth [mR], chord lenght in horizontal level [di-stDoDir], radius of Earth [R]. Exit: influence of standard error of radius of Earth [StdErrRDrefPlane]. StdErrDoDirDrefPlane This function returns influence of standard error of chord lenght on spherical arc leng-ht on referential plane of Earth, defined with known heights. Entry: standard error of chord lenght in horizontal level [mDoDir], chord lenght in horizontal level [distDoDir], radius of Earth [R]. Exit: influence of standard error of chord lenght in horizontal level [StdErrDoDir-DrefPlane]. distDgkm This function returns the value of Gauss -Kruger modulate distance. Entry: spheric arc lenght [distDrefPlane], radius of Earth [R], coordinate of instrument standing [yi], coordinate of reflector standing [yl], projectional module [module]. Exit: Gauss Krueger modulate distance [distDgkm]. mDgkm This function returns the value of standard error of Gauss - Kruger modulate distance. Entry: spheric arc lenght [distDrefPlane], standard error of spherical arc lenght [mdi-stDrefPlane], radius of Earth [R], standard error of radius of Earth [mR], coordinate of instrument standing [yi], standard error of coordinate of instrument standing [myi], coordinate of reflector standing [yl], standard error of coordinate of reflector standing [myl], projectional module [module], standard error of projection module [mModule]. Exit: standard error of Gauss Krueger modulate distance [mDgkm]. StdErrDrefPlaneDgkm This function returns influence of standard error of spherical arc lenght on Gauss Kruger modulate distance. Entry: standard error of spheric arc lenght [mDrefPlane], spheric arc lenght [DrefPlane], radius of Earth [R], coordinate of instrument standing [yi], coordinate of reflector standing [yl], projectional module [module]. Exit: influence of standard error of spheric arc lenght [StdErrDrefPlaneDgkm]. StdErrRDgkm This function returns influence of standard error of radius of Earth on Gauss Kruger modulate distance. Entry: standard error of radius of Earth [mR], spheric arc lenght [DrefPlane], radius of Earth [R], coordinate of instrument standing [yi], coordinate of reflector stan- ding [yl]. Exit: influence of standard error of radius of Earth [StdErrRDgkm]. StdErrYiDgkm This function returns influence of standard error of coordinate standing of instrument on Gauss Kruger modulate distance. Entry: standard error of coordinate of instrument standing [myi], spheric arc lenght [DrefPlane], radius of Earth [R], coordinate of instrument standing [yi], coordinate of reflector standing [yl]. Exit: influence of standard error of coordinate of instrument standing [StdErrYiDgkm]. StdErrYiDgkm This function returns influence of standard error of coordinate standing of reflector on Gauss Kruger modulate distance. Entry: standard error of coordinate of reflector standing [myl], spheric arc lenght [DrefPlane], radius of Earth [R], coordinate of instrument standing [yi], coordinate of reflector standing [yl]. Exit: influence of standard error of coordinate of reflector standing [StdErrYlD-gkm]. StdErrYlDgkm This function returns influence of standard error of projectional module on Gauss Kruger modulate distance. Entry: standard error of modula projekcije [mModule], spheric arc lenght [DrefPlane]. Exit: influence of standard error of modula projekcije [StdErrModuleDgkm]. DefHl This function returns the value of height of second end point. Entry: slope distance [distDslopeZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R]. Exit: height of second end point[DefHl]. mHl This function returns the value of standard error of height of second end point. Entry: slope distance [distDslopeZen], standard error of slope distance [mDslope-Zen], height of instrument standing [Hi], standard error of height of instrument standing [mHi], zenith distance [zd], standard error of zenith distance [mzd], radius of Earth [R], standard error of radius of Earth [mR]. Exit: standard error of height of second end point[mHl]. StdErrHiHl This function returns influence of standard error of height of instrument standing on height of second end point. Entry: standard error of height of instrument standing [mHi], slope distance [di-stDslopeZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R]. Exit: influence of standard error of height of instrument standing [StdErrHiHl]. StdErrRHl This function returns influence of standard error of radius of Earth on height of second end point. Entry: standard error of radius of Earth [mR], slope distance [distDslopeZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R]. Exit: influence of standard error of radius of Earth [StdErrRHl]. StdErrDslopeZenHl This function returns influence of standard error of slope distance on height of second end point. Entry: standard error of slope distance [mDslope], slope distance [distDslope-Zen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R]. Exit: influence of standard error of slope distance [StdErrDslopeHl]. StdErrZdDzenDir This function returns influence of standard error of zenith distance on height of second end point. Entry: standard error of zenith distance [mzd], slope distance [distDslopeZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R]. Exit: influence of standard error of zenith distance [StdErrZdHl]. defRadiusR This function returns the value of radius of Earth. Entry: large half axis of referential elipso-id [a], small half axis of referential elipsoid [b], elipsoidal latitude [Phi]. Exit: radius of Earth [DefRadiusR]. mR This function returns the value of standard error of radius of Earth. Entry: large half axis of referential elipsoid [a], standard error of large half axis of referential elipsoid [ma], small half axis of referential elipsoid [b], standard error of small half axis of referential elipsoid [mb], elipsoidal latitude [Phi], standard error of elipsoidal latitude [mPhi]. Exit: standard error of radius of Earth [mR]. StdErrAR This function returns influence of standard error of big half axis of referential elipsoid on radius of Earth. Entry: standard error of large half axis of referential elipsoid [ma], large half axis of referential elipsoid [a], small half axis of referential elipsoid [b], elipsoidal latitude [Phi]. Exit: influence of standard error of large half axis of referential elipsoid [StdErrAR]. StdErrBR This function returns influence of standard error of small half axis of referential elip-soid on radius of Earth. Entry: standard error of small half axis of referential elipsoid [ma], large half axis of referential elipsoid [a], small half axis of referential elipsoid [b], elipsoidal latitude [Phi]. Exit: influence of standard error of small half axis of referential elipsoid [StdErr-BR]. StdErrPhiR This function returns influence of standard error of elipsoidal latitude on radius of Earth. Entry: standard error of elipsoidal latitude [mPhi], large half axis of referential elipsoid [a], small half axis of referential elipsoid [b], elipsoidal latitude [Phi]. Exit: influence of standard error of elipsoidal latitude [StdErrPhiR]. User define functions for reduction without intermediate results This function returns the value of reduced distance and standard error without intermediate results. In the function are entered all measured entrys and function directly return reduced distance. distMeteoCorr This function returns the value of distance reduced with meteorological correction, without intermediate result. Entry: measured distance [distDsurvey], temperature [T], wet temperature [Twet], air pressure [p], referential break quotient [N0], wavelenght [LambdaNeff], extensi-onal coefficient of air [AlphaAir], constant A [Acons], constant B [Bcons], constant C [Ccons], constant a [alpha], constant p [beta], constant y [gamma], constant K [Kcons]. Exit: distance reduced with meteorological correction [distMeteoCorr]. mDmeteoCorr This function returns the value of standard error of distance reduced with meteorological correction. Entry: measured distance [distDsurvey], standard error of measured distance [mD-survey], temperature [T], standard error of temperature [mT], wet temperature [Twet], standard error of wet temperature [mTwet], air pressure [p], standard error of air pressure [mp], referential break quotient [N0], standard error of referential break quotient [mN0], wavelenght [LambdaNeff], standard error of wavelenght [mLambdaNeff], extensional coefficient of air [AlphaAir], standard error of extensional coefficient of air [mAlphaAir], constant A [Acons], stan- dard error of constant A [mAcons], constant B [Bcons], standard error of constant B [mBcons], constant C [Ccons], standard error of constant C [mCcons], constant a [alpha], standard error of constant a [mAlpha], constant ft [beta], standard error of constant ft [mBeta], constant y [gamma], standard error of constant y [mGam-ma], constant K [Kcons], standard error of constant K [mKcons]. Exit: standard error of distance reduced with meteorological correction [mDmeteoCorr], without intermediate results. distGeomCorrZen This function returns the value of distance reduced with geometrical corrections. It is a slope distance, defined with zenith distance. Entry: distance reduced with meteorological correction [distMeteoCorr], additional constant [Ka], height of instrument [i], height of reflector [l], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R]. Exit: slope distance - distance corrected with geometrical corrections, defined with zenith distance [distGeomCorrZen]. mDgeomCorrZen This function returns the value of standard error of geometrical corrections on slope distance, defined with zenith distance. Entry: distance reduced with meteorological correction [distMeteoCorr], standard error of distance reduced with meteorological correction [mDmeteoCorr], additional constant [Ka], standard error of additional constant [mKa], height of instrument [i], standard error of height of instrument [mi], height of reflector [l], standard error of height of reflector [ml], height of instrument standing [Hi], standard error of height of instrument standing [mHi], zenith distance [zd], standard error of zenith distance [mzd], radius of Earth [R], standard error of radius of Earth [mR]. Exit: standard error of slope distance - distance corrected with geometrical corrections, defined with zenith distance [mDge-omCorrZen]. distGeomCorr This function returns the value of distance reduced with geometrical corrections. It is a slope distance, defined with known heights. Entry: distance reduced with meteorological correction [distMeteoCorr], additional constant [Ka], height of instrument [i], height of reflector [l], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R]. Exit: slope distance - distance corrected with geometrical corrections, defined with known heights [distGeomCorr]. mDgeomCorr This function returns the value of standard error of distance corrected with geometrical corrections, defined with known heights. Entry: distance reduced with meteorological correction [distMeteoCorr], standard error of distance reduced with meteorological correction [mDmeteoCorr], additional constant [Ka], standard error of additional constant [mKa], height of instrument [i], standard error of height of instrument [mi], height of reflector [l], standard error of height of reflector [ml], height of instrument standing [Hi], standard error of height of instrument standing [mHi], height of reflector standing [Hl], standard error of height of reflector standing [mHl], radius of Earth [R], standard error of radius of Earth [mR]. Exit: standard error of slope distance - distance corrected with geometrical corrections, defined with known heights [mDgeomCorr]. distProjCorrZen This function returns the value of distance reduced with projectional corrections. It is a Gauss - Kruger modulate distance, defined with zenith distance. Entry: distance corrected with geometrical corrections, defined with zenith distance [distGeomCorrZen], height of instrument standing [Hi], zenith distance [zd], radius of Earth [R], refractional coefficient [k], coordinate of instrument standing [yi], coordinate of reflector standing [yl], projecti-onal module [module]. Exit: Gauss - Krueger modulate distance- distance corrected with projectional corrections, defined with zenith distance [distProjCorrZen]. mDprojCorrZen This function returns the value of standard error of projectional corrections on Gauss - Kruger modulate distance, defined with zenith distance. Entry: distance corrected with geometrical corrections, defined with zenith distance [distGeomCorrZen], standard error of distance corrected with geometrical corrections, defined with zenith distance [mDgeomCorrZen], height of instrument standing [Hi], standard error of height of instrument standing [mHi], zenith distance [zd], standard error of zenith distance [mzd], radius of Earth [R], standard error of radius of Earth [mR], refractional co- efficient [k], standard error of refractional coefficient [mk], coordinate of instrument standing [yi], standard error of coordinate of instrument standing [myi], coordinate of reflector standing [yl], standard error of coordinate of reflector standing [myl], pro-jectional module [module]. standard error of projectional module [mModule]. Exit: standard error of Gauss - Krueger modulate distance - distance corrected with projectional corrections, defined with zenith distance [mDprojCorrZen]. distProjCorr This function returns the value of standard error of projectional corrections on Gauss - Kruger modulate distance, defined with known heights. Entry: distance corrected with geometrical corrections [distGeomCorr], height of instrument standing [Hi], height of reflector standing [Hl], radius of Earth [R], coordinate of instrument standing [yi], coordinate of reflector standing [yl], projectional module [module]. Exit: Gauss - Krueger modulate distance - distance corrected with projectional corrections, [distProjCorr]. mDprojCorr This function returns the value of standard error of projectional corrections on Gauss - Kruger modulate distance. Entry: distance corrected with geometrical corrections [distGeomCorr], standard error of distance corrected with geometrical corrections [mDgeomCorr], height of instrument standing [Hi], standard error of height of instrument standing [mHi], height of reflector standing [Hl], standard error of height of reflector standing [mHl], radius of Earth [R], standard error of radi- us of Earth [mR], coordinate of instrument standing [yi], standard error of coordinate of instrument standing [myi], coordinate of reflector standing [yl], standard error of coordinate of reflector standing [myl], projectional module [module], standard error of projectional module [mModule]. Exit: standard error of Gauss - Krueger modulate distance - distance corrected with projectional corrections [mDprojCorr]. Conclusions In the gradual thesis was made Add-in program Distance reduction. Add-in program is designed for those, who are dealing with distance surveying. It is a free program, which we can found on internet site http:// www.geo.ntf.uni-lj.si/mvulic/diplome/ Brecelj/Distance_reductions.xla. In article is shown use of the user defined functions for reduction with measured zenith distance. On internet site http://www.geo. ntf.uni-lj.si/mvulic/diplome/Brecelj/Dis-tance_reductions.xla are located functions for reduction with known height above sea level with detail description of all functions. Standard error functions are evaluated in program for simbolic matethematic Mathematica, which enable us to define partial derivative of functions. Povzetki References V diplomski nalogi je bil narejen Add-in [1] program Redukcije dolžin. Brezplačni program, ki je namenjen uporabnikom, ki se ukvarjajo z merjenjem dolžin se nahaja na spletni strani http://www.geo.ntf.uni-lj.si/ mvulic/diplome/Brecelj/Distance_reduc-tions.xla, V članku je prikazana uporaba [3] lastnih funkcij za redukcijo dolžin z merjeno zenitno razdaljo, na navedeni spletni [4] strani pa se nahajajo tudi lastne funkcije za redukcijo z znanimi nadmorskimi višinami z detajlnim opisom vseh funkcij. Funkcije standardnih pogreškov so bile izdelane v programu za simbolično matematiko Mathematica, ki omogoča izpeljavo parcialnih odvodov funkcij. [5] Kogoj, D. (2002): Merjenje dolžin z elektronskimi razdaljemeri. Fakulteta za gradbeništvo in geodezijo, Ljubljana. Bronštejn J. N., Semendjajev K. A.(1978): Matematični priročnik. Tehniška založba Slovenije v Ljubljani. Vidav, I. (1949): Višja matematika. Ljubljana, DZS. Vulič, M. (2004): Pogreški funkcij (zapiski s predavanj). Naravoslovnotehniška fakulteta, Oddelek za geotehnologi-jo in rudarstvo, Ljubljana. Brecelj, u. (2005): Kreiranje lastnih funkcij (UDF) v Excelu zaradi redukcije dolžin in izpeljava natančnosti le teh v Mathematici. Naravo-slovnotehniška fakulteta, Oddelek za geotehnologijo in rudarstvo, Ljubljana.