1 / 12

Obliczanie miar

Obliczanie miar. ortogonalnych. 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ć odcięte i rzędne, które pozwolą na wyniesienie projektowanych punktów w teren. B. h i. a.

marsha
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 ortogonalnych

  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ć odcięte i rzędne, które pozwolą na wyniesienie projektowanych punktów w teren.

  3. B hi a li Pi A

  4. Zmienne globalne: Umieszcza się je na samym początku programu: '*************** OBLICZENIE MIAR ORTOGONALNYCH ******************* 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, rze() as double, odc() 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") Ciąg dalszy na następnym slajdzie

  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 dim i as integer azab=azymut(xa,ya,xb,yb) sn=sin(azab/200*pi) : cs=cos(azab/200*pi) redim rze(lip) : redim odc(lip) for i = 1 to lip dxap=xp(i)- xa : dyap=yp(i)- ya odc(i)=dyap*sn+dxap*cs rze(i)=dyap*cs-dxap*sn 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:\ortorap.txt","RAPORT Z OBLICZENIA MIAR ORTOGONALNYCH") Open plikrap for output as #1 print #1," Obliczenie miar ortogonalnych 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 ortogonalne punktów projektu" print #1," Nr punktu X Y Odcięta Rzędna " for i=1 to lip print #1,nrp(i), format$(xp(i),"0.00"),format$(yp(i),"0.00"),format$(odc(i),"0.00"), format$(rze(i),"0.00") next i close #1 end sub

  12. Obliczenie miar ortogonalnych 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 ortogonalne punktów projektu Nr punktu X Y Odcięta Rzędna 1 992.22 1004.97 -2.81 12.75 2 993.64 1002.06 -4.30 8.42 3 990.83 1000.70 -8.47 9.87 4 992.21 997.87 -9.92 5.66 8 985.15 997.82 -17.03 12.67 12 980.17 997.17 -22.66 17.00

More Related