DOWNLOADS
Bird Codes
PROGRAMS
Software
Programs 1
Programs 2
Programs 3
BREADCRUMBS
Home
Palm Software
|
| |
Basic Programs for Palm (Page 2)
Important Note.
I am a programmer and am comfortable with these software tools, but I do not warrant them to be suitable for your needs. Further, I will not support others who wish to follow my steps and use their Palm PDAs to record bird sightings. This is not a commercial Bird Records system. The software interfaces are poor or totally non-existent. Do not use this software if you are not a programmer and do not understand exactly what each step is doing. You use the software listed at my site at your own risk.
Note: to copy these programs to your Palm, highlight the program text and paste it into a memo field in your Palm Desktop application, then HotSynch your Palm.
Basic Programs that update or use the Bird Summary Table
EmptySummary.bas
The following program empties the Bird Summary Table. Normal operation has the Sighting Summary updated periodically from the Bird Sighting file, but there are times when you want to reset the summaries and start over. This program does that. It doesn't matter what sequence the Bird Summary File is in.
#EmptySummary.bas
new
10 d1$="2000 Bird Summary"
20 x=db.open d1$
30 n$= "0.0.0.0.0.0.0.0.0.0.0.0"
40 L%=db.len(d1$):L%=L%-1
50 p%=44
70 p%=p%+1
80 if p>L% then 1000
90 b$=db$(x,p%,6)
100 e=err(0)
110 if e<0 then 1000
120 rem msgbox("Code " & b$,0)
130 db$ (x,p%,4)=n$
140 goto 70
1000 quit
run
|
Recordsightings.bas
The following program reads the Bird Sighting data and updates the Sighting Summary Table. The Bird Summary must be sorted by Bird Code for this to work. The sequence of the Bird Sightings file is not crutial, but it works lots faster if it is also in bird code order.
#recordsightings.bas
new
10 d1$="2000 Bird Sightings"
20 d2$="2000 Bird Summary"
30 x=db.open d1$
40 y=db.open d2$
50 L%=db.len(d1$)
60L%=L%-1
70 p%= -1
80 p%=p%+1
90 if p%>L% then 1000
100 b$=db$(x,p%,1)
110 e=err(0)
120 if e<0 then 1000
130 gosub 400
131 rem ?"looking for ",b$,r%,k%
132 if r%=k% then 270
134 z$=b$
140 a%=r%
150 n%=256:i%=256:q%=0
160 if i%=1 then q%=1
170 i%=int(i%/2)
180 if n%>383 then 330
190 if n%<45 then 300
200 b$=db$(y,n%,6)
210 e=err(0)
220 if e<0 then 370
230 gosub 400
232 rem ?"summary ",n%,i%,b$,r%
240 if (r%
250 if (r%>a%) then 330
260 n$=db$(y,n%,4)
262 k%=r%
264 z=0
270 rem?"Found ",n$,r%,a%
280 gosub 800
290 goto 80
300 rem - greater than
302 rem ?"greater-",b$,n%,i%,r%
310 n%=n%+i%
320 goto 350
330 rem - less than
332 rem ?"less ",b$,n%,i%,r%
340 n%=n%-i%
350 if q%<>1 then 160
360 ? "****Not found ****", z$
362 k%=0
370 goto 80
400 rem change b$ code to number
410 c$=mid$(b$,1,1)
420 gosub 600
430 r%=c%*19683
440 c$=mid$(b$,2,1)
450 gosub 600
460 r%=r%+c%*729
470 c$=mid$(b$,3,1)
480 gosub 600
490 r%=r%+c%*27
500 c$=mid$(b$,4,1)
510 gosub 600
520 r%=r%+c%
530 return
600 rem return 0 to 27
610 c%=asc(ucase$(c$))-64
620 return
800 rem record sightings
810 m%=val(left$(db$(x,p%,7),2))
820 if (len(n$)<>23) then 880
830 v%=m%+m%-1
832 rem ?n$,v%
840 if (mid$(n$,v%,1)="1") then 860
850 n$=left$(n$,v%-1) +"1"+right$(n$,23-v%)
852 db$(y,n%,4)=n$
860 z=z+1
865 z$=str$(z)
870 rem db$(y,n%,9)=z$
880 return
1000 ?"Done",p%,e
run
|
Summary.bas
This program will create a memo with a summarization of the Sird Summary, showing the count of species per month, quarted and year. The sequence of the Bird Summary table is not crutial.
#summary.bas
new
2 dim m(12)
4 dim j(17)
10 d1$="2000 Bird Summary"
20 x=db.open d1$
30 p%= -1
40 p%=p%+1
50 n$=db$(x,p%,4)
60 e=err(0)
70 if e <0 then 400
80 if n$="" then 40
82 rem ?n$,p%
90 a%=0
100 q1%=0:q2%=0:q3%=0:q4%=0
110 for i=1 to 12
120 m(i)=0
130 next i
140 for i=1 to 12
150 n%=i+ i-1
152 c$=mid$(n$,n%,1)
160 if (c$="0") then 240
162 rem?i,n%,c$,n$
170 m(i)=1
180 a%=1
190 if i<4 then q1%=1
200 if (i>3) and (i<7) then q2%=1
210 if (i>6) and (i<10) then q3%=1
220 if i>9 then q4%=1
230 rem ?n$,n%,i,a%
240 next i
250 for i=1 to 12
260 j(i)=j(i)+m(i)
270 next i
280 j(13)=j(13)+a%
290 j(14)=j(14)+q1%
300 j(15)=j(15)+q2%
310 j(16)=j(16)+q3%
320 j(17)=j(17)+q4%
390 goto 40
400 t$="Summary of Sightings"
410 open new "memo",t$ as #4
412 print #4," "
420 print #4, "To Date ",j(13)
422 print #4," "
430 print #4, " Qtr 1 ", j(14)
440 print #4, " Qtr 2 ", j(15)
450 print #4, " Qtr 3 ", j(16)
460 print #4, " Qtr 4 ", j(17)
462 print #4, " "
470 print #4, " Jan ", j(1)
480 print #4, " Feb ", j(2)
490 print #4, " Mar ", j(3)
500 print #4, " Apr ", j(4)
510 print #4, " May ", j(5)
520 print #4, " Jun ", j(6)
530 print #4, " Jul ", j(7)
540 print #4, " Aug ", j(8)
560 print #4, " Sep ", j(9)
570 print #4, " Oct ", j(10)
580 print #4, " Nov ", j(11)
590 print #4, " Dec ", j(12)
600 close #4
610 stop
run
|
YetToSee.bas
This program reads the Bird Summary table and creates a memo listing common birds that have not yet been seen. The Bird Summary table ought to be sorted in taxonomic order, sorting on the sort field.
#YetToSee.bas
new
2 gosub 400
10 d1$="2000 Bird Summary"
20 x=db.open d1$
30 p%= -1
40 p%=p%+1
50 n$=db$(d1$,p%,4)
60 e=err(0)
70 if e <0 then 1000
80 if n$="" then 40
82 rem ?n$,p%
90 if (n$<>"0.0.0.0.0.0.0.0.0.0.0.0") then 40
100 m$=db$(d1$,p%,2)
110 t$=left$(m$,2)
120 if (t$="CS") then 200
130 if (t$="FC") then 200
140 if (t$="CP") then 200
150 if (t$="CW") then 200
160 goto 40
200 rem bird is common
210 q$=db$(d1$,p%,1)
220 h$=db$(d1$,p%,3)
230 print #4,q$, chr$(9),m$, chr$(9),h$
240 goto 40
400 t$="Easy Birds yet to see"
410 open new "memo",t$ as #4
420 print #4,""
430 return
1000 close #4
1010 stop
|
CountSeenBirds.bas
This older program (which may need updating - shows how much I've used it) displays quarterly counts of bird species seen by sumarizing the Bird Summary table. Tie Bird Summary table may be in any order.
# count seen birds
new
1 input "Enter Month ",f
5 f = f + f - 1
10 p = -1
20 p = p + 1
30 w = op "dbrd", "JBas:Utah Birds", p
40 if (w <> 0) then 200
50 if (len(s$(3)) < 5) then 20
52 if (s$(3) = "0.0.0.0.0.0.0.0.0.0.0.0") then 60
54 g = g + 1
60 a$ = mid$(s$(3),f,1)
70 if (val(a$) <>1) then 100
90 e = e + 1
100 m = val(mid$(s$(3),1,1))
105 m = m + val(mid$(s$(3),3,1))
110 m = m + val(mid$(s$(3),5,1))
115 if (m = 0) then 125
117 rem ?s$(3)," ",m
120 a = a + 1
125 m = val(mid$(s$(3),7,1))
130 m = m + val(mid$(s$(3),9,1))
135 m = m + val(mid$(s$(3),11,1))
140 if (m = 0) then 150
145 b = b + 1
150 m = val(mid$(s$(3),13,1))
155 m = m + val(mid$(s$(3),15,1))
160 m = m + val(mid$(s$(3),17,1))
165 if (m = 0) then 175
170 c = c + 1
175 m = val(mid$(s$(3),19,1))
180 m = m + val(mid$(s$(3),21,1))
185 m = m + val(mid$(s$(3),23,1))
190 if (m = 0) then 199
195 d = d + 1
199 goto 20
200 rem display answers
300 s$(0) = "Year"
310 s$(2) = "Month"
320 s$(4) = "Qtr 1"
330 s$(6) = "Qtr 2"
340 s$(8) = "Qtr 3"
350 s$(10) = "Qtr 4"
360 s$(1) = str$(g)
370 s$(3) = str$(e)
380 s$(5) = str$(a)
390 s$(7) = str$(b)
400 s$(9) = str$(c)
420 s$(11) = str$(d)
422 s$(12) = "Average"
424 a = (a + b + c + d) / 4
426 s$(13) = str$(a)
430 x = fn 30
run
|
|

Cascade and Provo Mountains, part of the Wasatch Front
|
|