-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdistance.c
31 lines (22 loc) · 889 Bytes
/
distance.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*******************************************************************/
/* distance.c ->void DISTANCE(in,out) */
/* Jing M. Chen, [email protected] */
/* Sylvain G. Leblanc [email protected] */
/*******************************************************************/
/* Subroutine that calculates the mean gap between tree crowns */
/* Latest update November, 1999 */
/*******************************************************************/
# include <stdio.h>
# include <math.h>
# include <string.h>
# include "data.h"
void DISTANCE(in_p,out_p)
struct PARAMETER in_p;
struct RESULT *out_p;
{
double Lt = 0;
double Wt = 0;
Lt = out_p->OmegaT*PI*in_p.R*in_p.R*in_p.D/in_p.B;
Wt = sqrt(PI*in_p.R*in_p.R);
out_p->E_r = Wt/Lt;
}