source: trunk/MagicSoft/slalib/xy2xy.c@ 9872

Last change on this file since 9872 was 732, checked in by tbretz, 24 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#include "slalib.h"
2#include "slamac.h"
3void slaXy2xy ( double xc1, double yc1, double coeffs[6],
4 double *xc2, double *yc2 )
5/*
6** - - - - - - - - -
7** s l a X y 2 x y
8** - - - - - - - - -
9**
10** Transform one [x,y] into another using a linear model of the type
11** produced by the slaFitxy routine.
12**
13** Given:
14** xc1 double x-coordinate
15** yc1 double y-coordinate
16** coeffs double[6] transformation coefficients (see note)
17**
18** Returned:
19** *xc2 double x-coordinate
20** *yc2 double y-coordinate
21**
22** The model relates two sets of [x,y] coordinates as follows.
23** Naming the elements of coeffs:
24**
25** coeffs[0] = a
26** coeffs[1] = b
27** coeffs[2] = c
28** coeffs[3] = d
29** coeffs[4] = e
30** coeffs[5] = f
31**
32** the present routine performs the transformation:
33**
34** xc2 = a + b*xc1 + c*yc1
35** yc2 = d + e*xc1 + f*yc1
36**
37** See also slaFitxy, slaPxy, slaInvf, slaDcmpf.
38**
39** Last revision: 5 December 1994
40**
41** Copyright P.T.Wallace. All rights reserved.
42*/
43{
44 *xc2 = coeffs[0] + coeffs[1] * xc1 + coeffs[2] * yc1;
45 *yc2 = coeffs[3] + coeffs[4] * xc1 + coeffs[5] * yc1;
46}
Note: See TracBrowser for help on using the repository browser.