~ubuntu-branches/ubuntu/precise/grass/precise

« back to all changes in this revision

Viewing changes to imagery/i.ortho.photo/photo.2target/equ.c

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-04-13 17:08:41 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110413170841-ss1t9bic0d0uq0gz
Tags: 6.4.1-1
* New upstream version.
* Now build-dep on libjpeg-dev and current libreadline6-dev.
* Removed patch swig: obsolete.
* Policy bumped to 3.9.2, without changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "globals.h"
2
 
 
3
 
int Compute_ortho_equation(void)
4
 
{
5
 
    /* struct Ortho_Control_Points  temp_points; */
6
 
    double e0, e1, e2, n0, n1, n2, z1, z2;
7
 
    int status, i;
8
 
 
9
 
    /* alloc and fill temp control points */
10
 
    temp_points.count = 0;
11
 
    temp_points.status = NULL;
12
 
    temp_points.e1 = NULL;
13
 
    temp_points.n1 = NULL;
14
 
    temp_points.z1 = NULL;
15
 
    temp_points.e2 = NULL;
16
 
    temp_points.n2 = NULL;
17
 
    temp_points.z2 = NULL;
18
 
 
19
 
    /* e0, n0, equal photo coordinates not image coords */
20
 
    for (i = 0; i < group.control_points.count; i++) {
21
 
        status = group.control_points.status[i];
22
 
        e1 = group.control_points.e1[i];
23
 
        n1 = group.control_points.n1[i];
24
 
        z1 = group.control_points.z1[i];
25
 
        e2 = group.control_points.e2[i];
26
 
        n2 = group.control_points.n2[i];
27
 
        z2 = group.control_points.z2[i];
28
 
 
29
 
        I_georef(e1, n1, &e0, &n0, group.E12, group.N12);
30
 
        I_new_con_point(&temp_points, e0, n0, z1, e2, n2, z2, status);
31
 
    }
32
 
 
33
 
 
34
 
    group.con_equation_stat = I_compute_ortho_equations(&temp_points,
35
 
                                                        &group.camera_ref,
36
 
                                                        &group.camera_exp,
37
 
                                                        &group.XC, &group.YC,
38
 
                                                        &group.ZC,
39
 
                                                        &group.omega,
40
 
                                                        &group.phi,
41
 
                                                        &group.kappa);
42
 
 
43
 
    return 0;
44
 
}
45
 
 
46
 
int Compute_ref_equation(void)
47
 
{
48
 
    group.ref_equation_stat = I_compute_ref_equations(&group.photo_points,
49
 
                                                      group.E12, group.N12,
50
 
                                                      group.E21, group.N21);
51
 
 
52
 
    return 0;
53
 
}