/ db / include /
/db/include/constants.m4
1 dnl Copyright (C) 2012, 2013, 2015 The Meme Factory, Inc. http://www.meme.com/
2 dnl Copyright (C) 2004, 2008-2011, Karl O. Pinc <kop@meme.com>
3 dnl
4 dnl This file is part of Gombe-MI.
5 dnl
6 dnl Gombe-MI is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 3 of the License, or
9 dnl (at your option) any later version.
10 dnl
11 dnl This program is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
15 dnl
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with Gombe-MI. If not, see <http://www.gnu.org/licenses/>.
18 dnl
19 dnl Constant data values hardcoded into the system.
20 dnl
21 dnl Karl O. Pinc <kop@meme.com>
22 dnl
23 dnl Bugs:
24 dnl This file is processed by Makefiles (with m4toentityconstants)
25 dnl to produce xml entities for use in the documentation and the
26 dnl view definitions. This processing is simplistic and requires
27 dnl defines be a single line and arguments be quoted.
28 dnl
29 dnl
30 changequote([{[,]}])dnl m4 foolery so includes include only once.
31 dnl Once the macro is in the text, change the quotes back
32 ifdef([{[_constants.m4]}], [{[changequote(`,')]}], [{[dnl
33 changequote(`,')dnl
34 dnl
35 dnl Standard test for having already included the file.
36 define(`_constants.m4')dnl
37 dnl
38 dnl Turn output off. This file produces no output.
39 divert(-1)
40
41 dnl
42 dnl Constants for data types.
43 dnl (Lengths and so forth)
44 dnl
45
46 dnl Maximum length of the AnimID column.
47 define(`gmi_animid_len', `5')
48
49 dnl Maximum length of the AnimID_Num column.
50 define(`gmi_animid_num_len', `20')
51
52 dnl Maximum length of BEHAVIORS.Behavior.
53 define(`gmi_behavior_len', `5')
54
55 dnl Maximum length of FOODKINDS.FoodKind.
56 dnl Max length in the data is 16 (I think), but who's counting?
57 define(`gmi_foodkind_len', `20')
58
59 dnl Maximum length of FOODPARTS.Foodpart
60 define(`gmi_foodpart_len', `3')
61
62 dnl Maximum length of PLAYS.Play.
63 define(`gmi_play_len', `3')
64
65 dnl
66 dnl Constants for imported data.
67 dnl
68
69 dnl The suffix attached to dadid in the access db when the
70 dnl assigment is preliminary.
71 define(`gmi_dadid_prelim', `_prelim')
72
73 dnl
74 dnl Constants for db data.
75 dnl
76
77 dnl biography_data
78
79 dnl Unknown individuals
80 dnl The unknown stranger
81 define(`gmi_stranger', `MGE')
82 dnl The unknown individual
83 define(`gmi_unk_animid', `UNK')
84
85 dnl Birth group certanity.
86 define(`gmi_bgcertain', `C')
87 define(`gmi_bguncertain', `U')
88
89 dnl sex
90 define(`gmi_male', `M')
91 define(`gmi_female', `F')
92 define(`gmi_unk_sex', `U')
93
94 dnl firstborn
95 define(`gmi_fb', `Y')
96 define(`gmi_not_fb', `N')
97 define(`gmi_unk_fb', `U')
98
99 -- Constants involving follows.
100
101 dnl When follows were first done. Apparently really May 28, 1970, but....
102 define(`gmi_first_date', `1970-01-01')
103
104 dnl The last date FOLLOWS.EntryDate can be NULL.
105 define(`gmi_max_null_entrydate', `2011-06-30')
106
107 dnl Maximum age of infant or sib in follow
108 define(`gmi_notmom_maxage', `15 years')
109
110 dnl When the observation starts and stops every day.
111 define(`gmi_day_start', `06:00')
112 define(`gmi_day_end', `20:00')
113
114 dnl followroles.function
115 define(`gmi_mom', `M')
116 define(`gmi_infant', `I')
117 define(`gmi_sib', `S')
118 define(`gmi_nonfocal', `NF') dnl never used in followroles.function
119 dnl but used instead of NULL in views
120
121 dnl
122 dnl UPLOAD_BEHAVIORS
123 dnl
124
125 dnl The beahvior delimiter
126 define(`gmi_behavior_delim', `;')dnl
127
128 dnl The chimpid delimiter
129 define(`gmi_chimpid_delim', `,')dnl
130
131 dnl followroles.role
132 dnl Used by UPLOAD_BEHAVIORS and FOCAL_FOLLOWS; breaks followroles abstraction.
133 define(`gmi_mom_role', `M')
134 define(`gmi_infant_role', `I')
135 define(`gmi_sib_role', `S')
136
137 dnl badobs values
138 define(`gmi_badobs_y', `Y')dnl All uncertain
139 define(`gmi_badobs_w', `W')dnl All uncertain (swahili)
140 define(`gmi_badobs_m', `M')dnl Mom is uncertain (swahili and english)
141 define(`gmi_badobs_i', `I')dnl Infant is uncertain
142 define(`gmi_badobs_t', `T')dnl Infant is uncertain (swahili)
143 define(`gmi_badobs_s', `S')dnl Sib is uncertain
144 define(`gmi_badobs_k', `K')dnl Sib is uncertain (swahili)
145 define(`gmi_badobs_mi', `M/I')dnl Mom and infant are uncertain
146 define(`gmi_badobs_mt', `M,T')dnl Mom and infant are uncertain (swahili)
147 define(`gmi_badobs_ms', `M/S')dnl Mom and sib are uncertain
148 define(`gmi_badobs_mk', `M,K')dnl Mom and sib are uncertain (swahili)
149 define(`gmi_badobs_is', `I/S')dnl Infant and sib are uncertain
150 define(`gmi_badobs_kt', `K,T')dnl Infant and sib are uncertain (swahili)
151
152 dnl Animid codes with special meaning
153 define(`gmi_animid_qmark', `?')
154 define(`gmi_animid_y', `Y')
155 define(`gmi_animid_baboon', `NYA')
156
157 dnl The behavior code to ignore, no behavior.
158 define(`gmi_ignore_mark', `-')
159
160 dnl The semi-boolean values.
161 define(`gmi_sb_y', `Y')
162 define(`gmi_sb_qmark', `?')
163
164 dnl The default fishing result.
165 define(`gmi_fishing_success', `S')
166
167 dnl The devbeh string literal.
168 define(`gmi_devbeh', `DEVBEH!')
169
170 dnl The hardcoded column names looked up on behavior_trans.
171 define(`gmi_ma_foodpart', `ma_foodpart')
172 define(`gmi_ma_fishpart', `ma_fishpart')
173 define(`gmi_ma_voc', `ma_voc')
174 define(`gmi_ma_grooming', `ma_grooming')
175 define(`gmi_ma_groomed_by', `ma_groomed_by')
176 define(`gmi_ma_play', `ma_play')
177 define(`gmi_inf_foodpart', `inf_foodpart')
178 define(`gmi_inf_fishpart', `inf_fishpart')
179 define(`gmi_inf_nurse', `inf_nurse')
180 define(`gmi_inf_travel', `inf_travel')
181 define(`gmi_inf_eat', `inf_eat')
182 define(`gmi_inf_solitary_play', `inf_solitary_play')
183 define(`gmi_inf_rest', `inf_rest')
184 define(`gmi_inf_ride_on_belly', `inf_ride_on_belly')
185 define(`gmi_inf_ride_on_back', `inf_ride_on_back')
186 define(`gmi_inf_ride_on_unk', `inf_ride_on_unk')
187 define(`gmi_inf_dangle', `inf_dangle')
188 define(`gmi_inf_rejection', `inf_rejection')
189 define(`gmi_inf_touching_another', `inf_touching_another')
190 define(`gmi_inf_grooming', `inf_grooming')
191 define(`gmi_inf_being_groomed', `inf_being_groomed')
192 define(`gmi_inf_social_play', `inf_social_play')
193 define(`gmi_inf_display', `inf_display')
194 define(`gmi_inf_cry', `inf_cry')
195 define(`gmi_inf_voc', `inf_voc')
196 define(`gmi_inf_beg', `inf_beg')
197 define(`gmi_inf_assr', `inf_assr')
198 define(`gmi_inf_sex_related', `inf_sex_related')
199 define(`gmi_inf_tooluse', `inf_tooluse')
200 define(`gmi_inf_directaggression', `inf_directaggression')
201 define(`gmi_devbeh_col', `devbeh')
202 define(`gmi_sib_foodpart', `sib_foodpart')
203 define(`gmi_sib_fishpart', `sib_fishpart')
204 define(`gmi_sib_grooming', `sib_grooming')
205 define(`gmi_sib_groomed_by', `sib_groomed_by')
206 define(`gmi_sib_play', `sib_play')
207 define(`gmi_sib_voc', `sib_voc')
208
209 dnl The hardcoded column names looked up on distance_trans.
210 define(`gmi_inf_distance_1', `inf_distance_1')
211 define(`gmi_inf_distance_2', `inf_distance_2')
212 define(`gmi_inf_distance_3', `inf_distance_3')
213 define(`gmi_inf_distance_4', `inf_distance_4')
214 define(`gmi_inf_distance_5', `inf_distance_5')
215 define(`gmi_inf_distance_over_5m', `inf_distance_over_5m')
216
217 dnl
218 dnl infer_gc() constants
219 dnl
220 dnl How often are virtual group comps taken?
221 define(`gmi_gc_interval', `15 minutes')
222 dnl How much of a gap in observation is required to reset the
223 dnl group comp start time to a new set of intervals?
224 define(`gmi_gc_reset_interval', `15 minutes')
225 dnl The FIELDFOLLOWS.GCStatus value to use for inferred group comps.
226 define(`gmi_automatic_gcstatus', `A')
227
228 dnl Other data constants.
229
230
231 dnl groupmembers.swelling legal values
232 define(`gmi_0', `0')
233 define(`gmi_1_4', `1/4')
234 define(`gmi_1_2', `1/2')
235 define(`gmi_3_4', `3/4')
236 define(`gmi_1', `1')
237 define(`gmi_U', `U')
238
239 dnl The gm_origins.origin value that means automatic.
240 define(`gmi_automatic_origin', `A')
241
242 dnl Minimum swelling age
243 define(`gmi_swelling_min_age', `7 years')
244
245 dnl Minium age below which it is assumed that mom is present in group.
246 define(`gmi_min_alone_age', `5 years')
247
248 dnl distances.distance
249 define(`gmi_distunk', `99')
250
251 dnl behaviors.type
252 define(`gmi_eating', `E')
253 define(`gmi_vocal', `V')
254 define(`gmi_play', `P')
255 define(`gmi_ride', `R')
256 define(`gmi_rest', `T')
257 define(`gmi_other', `O')
258 define(`gmi_fish', `F')
259
260 dnl parts.part
261 define(`gmi_actor', `R')
262 define(`gmi_actee', `E')
263 define(`gmi_self', `S')
264 define(`gmi_participant', `P')
265
266 dnl---------not yet used below--------------
267
268 define(`gmi_day_early_start', `04:00')dnl earliest start of the work day
269 define(`gmi_day_early_end', `19:00')
270
271
272 dnl
273 dnl Views
274 dnl
275
276 dnl
277 dnl Computational constants
278 dnl
279
280 dnl
281 dnl The warning system.
282 dnl
283 include(`warningconstants.m4')
284
285 dnl Turn output back on
286 divert`'dnl
287 dnl
288 dnl
289 ]}])dnl End of ifdef over the whole file.