1 / 12

Obliczanie miar

Obliczanie miar. biegunowych. Dane są współrzędne punktów osnowy realizacyjnej, oraz współrzędne projektowanych punktów inwestycji. Należy - w oparciu o jeden z boków osnowy realizacyjnej - obliczyć kąty i długości, które pozwolą na wyniesienie projektowanych punktów w teren. B. P. l i. A.

wylie
Télécharger la présentation

Obliczanie miar

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Obliczanie miar biegunowych

  2. Dane są współrzędne punktów osnowy realizacyjnej, oraz współrzędne projektowanych punktów inwestycji. Należy - w oparciu o jeden z boków osnowy realizacyjnej - obliczyć kąty i długości, które pozwolą na wyniesienie projektowanych punktów w teren.

  3. B P li A

  4. Zmienne globalne umieszczane na początku programu '*************** OBLICZENIE MIAR BIEGUNOWYCH ******************* Public nra as integer, nrb as integer Public xa as double, ya as double, xb as double, yb as double Public lip as integer Public xp() as double, yp() as double, beta() as double, bok() as double Public nrp() as integer

  5. Główna część programu : MAIN '************************ MAIN ********************** sub main osnowa projektxy miary raport end sub

  6. '******************************* OSNOWA ********************************************* sub osnowa Dim plikos as string,nras as string,nrbs as string Dim i as integer, n as integer Dim x as double, y as double, c as integer plikos = MbeInputBox("Podaj nazwę pliku z danymi osnowy","D:\osnxy.txt","PUNKTY OSNOWY") nras=MbeInputBox("Podaj nazwę punktu A","1001","PUNKTY A") nrbs=MbeInputBox("Podaj nazwę punktu B","1002","PUNKTY B")

  7. Procedura osnowa ciąg dalszy: open plikos for input as #1 i=0 while not eof(1) input #1, n,x,y if n=val(nras) then nra=n: xa=x: ya=y i=i+1 end if if n=val(nrbs) then nrb=n : xb=x : yb=y i=i+1 end if wend close #1 end sub

  8. '**********WSPÓŁRZĘDNE PROJEKTOWANYCH PUNKTÓW Z PLIKU ************ sub projektxy Dim plikxy as string,nras as string,nrbs as string Dim i as integer, n as integer Dim x as double, y as double plikxy=MbeInputBox("Podaj nazwę pliku ze współrzędnymi projektu", "D:\pikietyxy.txt","WSPÓŁRZĘDNE PROJEKTU") open plikxy for input as #1 lip=0 While not eof(1) lip=lip+1 redim preserve nrp(lip) redimpreserve xp(lip) redim preserve yp(lip) input #1,nrp(lip),xp(lip),yp(lip) wend close #1 end sub

  9. '************************************** MIARY *********************** sub miary dim azab as double, dxap as double, dyap as double, azi as double dim i as integer azab=azymut(xa,ya,xb,yb) redim beta(lip) : redim bok(lip) for i = 1 to lip dxap=xp(i)- xa : dyap=yp(i)- ya azi=azymut(xa,ya,xp(i),yp(i)) beta(i)=azi -azab if beta(i)<0 then beta(i)=beta(i)+400 bok(i)=sqr(dxap^2+dyap^2) next i end sub

  10. '***************************AZYMUT ********************************************** Function Azymut(xa as double, ya as double, xb as double, yb as double) as double Dim dx as double, dy as double, az as double dx=xb-xa: dy=yb-ya if dx=0 then if dy<0 then az=300 if dy>0 then az=100 else az=atn(dy/dx)*200/pi end if if dx<0 then az=az+200 if az<0 then az=az+400 azymut=az end function

  11. '************************************** RAPORT *********************** sub raport Dim plikrap as string plikrap=MbeInputBox("Podaj nazwę pliku raportu","D:\biegrap.txt","RAPORT Z OBLICZENIA MIAR BIEGUNOWYCH") Open plikrap for output as #1 print #1," Obliczenie miar biegunowych do wyniesienia projektu w teren" print #1," " print #1,"Punkty onowy: nr x y" print #1,"A",nra,format$(xa,"0.00"),format$(ya,"0.00") print #1,"B",nrb,format$(xb,"0.00"),format$(yb,"0.00") print #1," " print #1,"Współrzędne i miary biegunowe punktów projektu" print #1," Nr punktu X Y Beta Bok " for i=1 to lip print #1,nrp(i), format$(xp(i),"0.00"), format$(yp(i),"0.00"), format$(beta(i),"0.0000"), format$(bok(i),"0.00") next i close #1 end sub

  12. Obliczenie miar biegunowych do wyniesienia projektu w teren Punkty onowy: nr x y A 1001 1000.00 1000.00 B 1002 1028.30 1028.27 Współrzędne i miary biegunowe punktów projektu Nr punktu X Y Beta Bok 1 992.22 1004.97 113.8436 9.23 2 993.64 1002.06 130.0925 6.69 3 990.83 1000.70 145.1835 9.20 4 992.21 997.87 167.0254 8.08 8 985.15 997.82 159.3131 15.01 12 980.17 997.17 159.0582 20.03

More Related