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

« back to all changes in this revision

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