aboutsummaryrefslogtreecommitdiff
path: root/src/slalib/dmxv.f
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-03-04 21:21:30 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-03-04 21:21:30 -0500
commitd54fe7c1f704a63824c5bfa0ece65245572e9b27 (patch)
treeafc52015ffc2c74e0266653eecef1c8ef8ba5d91 /src/slalib/dmxv.f
downloadcalfuse-d54fe7c1f704a63824c5bfa0ece65245572e9b27.tar.gz
Initial commit
Diffstat (limited to 'src/slalib/dmxv.f')
-rw-r--r--src/slalib/dmxv.f47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/slalib/dmxv.f b/src/slalib/dmxv.f
new file mode 100644
index 0000000..e70a28e
--- /dev/null
+++ b/src/slalib/dmxv.f
@@ -0,0 +1,47 @@
+ SUBROUTINE sla_DMXV (DM, VA, VB)
+*+
+* - - - - -
+* D M X V
+* - - - - -
+*
+* Performs the 3-D forward unitary transformation:
+*
+* vector VB = matrix DM * vector VA
+*
+* (double precision)
+*
+* Given:
+* DM dp(3,3) matrix
+* VA dp(3) vector
+*
+* Returned:
+* VB dp(3) result vector
+*
+* P.T.Wallace Starlink March 1986
+*
+* Copyright (C) 1995 Rutherford Appleton Laboratory
+*-
+
+ IMPLICIT NONE
+
+ DOUBLE PRECISION DM(3,3),VA(3),VB(3)
+
+ INTEGER I,J
+ DOUBLE PRECISION W,VW(3)
+
+
+* Matrix DM * vector VA -> vector VW
+ DO J=1,3
+ W=0D0
+ DO I=1,3
+ W=W+DM(J,I)*VA(I)
+ END DO
+ VW(J)=W
+ END DO
+
+* Vector VW -> vector VB
+ DO J=1,3
+ VB(J)=VW(J)
+ END DO
+
+ END