-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathone_ref.c
executable file
·52 lines (35 loc) · 1.07 KB
/
one_ref.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* a simple example of how to use ambrals froward function */
#include "ambralsfor.c"
#include <stdio.h>
main()
{
geom_t geom;
param_t params;
float ref; /* save bidirectional reflectance */
/* set bi-directional observation geometry parameters */
/* which will be provided by you in whatever input format */
/* you prefer --- in this single pixel example they are */
/* just hardcoded */
geom.szen=45.0;
geom.vzen=45.0;
geom.relaz=0.0;
/* set the three weights of Ambrals model */
/* which will be provided by us as a flat */
/* cartesian lat/lon file of floats for each */
/* ROI ----- in this example they are just hardcoded */
params.iso=0.12089;
params.vol=0.0;
params.geo=0.063989;
ref=forward(geom,params); /* call ambrals forward model */
printf("%f\n",ref);
geom.szen=45.0;
geom.vzen=0.0;
geom.relaz=0.0;
ref=forward(geom,params); /* call ambrals forward model */
printf("%f\n",ref);
geom.szen=45.0;
geom.vzen=45.0;
geom.relaz=180.0;
ref=forward(geom,params); /* call ambrals forward model */
printf("%f\n",ref);
}