Go to the documentation of this file.
5 void matmpy(
const float xm1[3][3],
const float xm2[3][3],
float xm3[3][3]) {
7 for (
i = 0;
i < 3;
i++) {
8 for (
j = 0;
j < 3;
j++) {
10 for (m = 0; m < 3; m++)
11 xm3[
i][
j] += xm1[
i][m] * xm2[m][
j];
16 void matmpy_(
const float xm1[3][3],
const float xm2[3][3],
float xm3[3][3]) {
22 matmpy(xsave1, xsave2, xsave3);
26 float xm1[3][3], xm2[3][3], xm3[3][3], xmm[3][3];
29 for (
int i = 0;
i < 3;
i++) {
30 for (
int j = 0;
j < 3;
j++) {
31 xm1[
i][
j] = xm2[
i][
j] = xm3[
i][
j] = 0.0f;
35 float c1 = cos(
a[0] / radeg);
36 float s1 = sin(
a[0] / radeg);
37 float c2 = cos(
a[1] / radeg);
38 float s2 = sin(
a[1] / radeg);
39 float c3 = cos(
a[2] / radeg);
40 float s3 = sin(
a[2] / radeg);
42 xm1[1 - 1][1 - 1] = 1.0f;
43 xm1[2 - 1][2 - 1] = c1;
44 xm1[3 - 1][3 - 1] = c1;
45 xm1[2 - 1][3 - 1] = s1;
46 xm1[3 - 1][2 - 1] = -s1;
47 xm2[2 - 1][2 - 1] = 1.0f;
48 xm2[1 - 1][1 - 1] = c2;
49 xm2[3 - 1][3 - 1] = c2;
50 xm2[3 - 1][1 - 1] = s2;
51 xm2[1 - 1][3 - 1] = -s2;
52 xm3[3 - 1][3 - 1] = 1.0f;
53 xm3[2 - 1][2 - 1] = c3;
54 xm3[1 - 1][1 - 1] = c3;
55 xm3[1 - 1][2 - 1] = s3;
56 xm3[2 - 1][1 - 1] = -s3;
103 void ocorient_(
float pos[3],
float vel[3],
float att[3],
float rm[3][3],
float coef[10]) {
104 float vc[3], xpri[3], ypri[3], zpri[3], yrp[3][3], rn[3][3];
112 vc[1 - 1] = vel[1 - 1] - omegae *
pos[2 - 1];
113 vc[2 - 1] = vel[2 - 1] + omegae *
pos[1 - 1];
114 vc[3 - 1] = vel[3 - 1];
122 double omf2p = (
omf2 * rem +
pm - rem) /
pm;
124 double temp = sqrt((
double)(
pos[2] *
pos[2] + omf2p * omf2p * pxy));
125 zpri[0] = -omf2p *
pos[0] / temp;
126 zpri[1] = -omf2p *
pos[1] / temp;
127 zpri[2] = -
pos[2] / temp;
130 double yprim = sqrt((
double)(ypri[0] * ypri[0] + ypri[1] * ypri[1] + ypri[2] * ypri[2]));
132 for (
int i = 0;
i < 3;
i++)
137 for (
int i = 0;
i < 3;
i++) {
147 memcpy(rm_temp,rm,
sizeof rm_temp);
151 *(coef + 1 - 1) = 1.e0 + (
rd - 1.e0) * rm[1 - 1][3 - 1] * rm[1 - 1][3 - 1];
152 *(coef + 2 - 1) = 1.e0 + (
rd - 1.e0) * rm[2 - 1][3 - 1] * rm[2 - 1][3 - 1];
153 *(coef + 3 - 1) = 1.e0 + (
rd - 1.e0) * rm[3 - 1][3 - 1] * rm[3 - 1][3 - 1];
154 *(coef + 4 - 1) = (
rd - 1.e0) * rm[1 - 1][3 - 1] * rm[2 - 1][3 - 1] * 2.e0;
155 *(coef + 5 - 1) = (
rd - 1.e0) * rm[1 - 1][3 - 1] * rm[3 - 1][3 - 1] * 2.e0;
156 *(coef + 6 - 1) = (
rd - 1.e0) * rm[2 - 1][3 - 1] * rm[3 - 1][3 - 1] * 2.e0;
158 (rm[1 - 1][1 - 1] *
pos[1 - 1] + rm[1 - 1][2 - 1] *
pos[2 - 1] + rm[1 - 1][3 - 1] *
pos[3 - 1] *
rd) *
161 (rm[2 - 1][1 - 1] *
pos[1 - 1] + rm[2 - 1][2 - 1] *
pos[2 - 1] + rm[2 - 1][3 - 1] *
pos[3 - 1] *
rd) *
164 (rm[3 - 1][1 - 1] *
pos[1 - 1] + rm[3 - 1][2 - 1] *
pos[2 - 1] + rm[3 - 1][3 - 1] *
pos[3 - 1] *
rd) *
166 *(coef + 10 - 1) =
pos[1 - 1] *
pos[1 - 1] +
pos[2 - 1] *
pos[2 - 1] +
pos[3 - 1] *
pos[3 - 1] *
rd -
int crossp_(float *v1, float *v2, float *v3)
computes cross product v3 = v1 x v2
void ocorient_(float pos[3], float vel[3], float att[3], float rm[3][3], float coef[10])
c This subroutine performs a simple calculation of the sensor c orientation from the orbit position v...
void transpose3d(const float inp[3][3], float out[3][3])
Matrix transpose.
void matmpy(const float xm1[3][3], const float xm2[3][3], float xm3[3][3])
float rd(float x, float y, float z)
void oceuler(float a[3], float xm[3][3])
c Computes coordinate transformation matrix corresponding to Euler c sequence. The order of angles in...
void matmpy_(const float xm1[3][3], const float xm2[3][3], float xm3[3][3])
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a