aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/scat/plate.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-24 17:05:43 +0000
committerrsc <devnull@localhost>2004-04-24 17:05:43 +0000
commit8a3b2ceb0ff632c47e1516d3ffef8572dc8eb974 (patch)
tree4325779f2b9fcfccc586bb7f9359b5986b1cdb14 /src/cmd/scat/plate.h
parent3f8c70e97c2eb85992424439af56a4dd6412b8c6 (diff)
downloadplan9port-8a3b2ceb0ff632c47e1516d3ffef8572dc8eb974.tar.gz
plan9port-8a3b2ceb0ff632c47e1516d3ffef8572dc8eb974.tar.bz2
plan9port-8a3b2ceb0ff632c47e1516d3ffef8572dc8eb974.zip
Add scat. Temporary fix to rc r.e. note groups.
Diffstat (limited to 'src/cmd/scat/plate.h')
-rw-r--r--src/cmd/scat/plate.h138
1 files changed, 138 insertions, 0 deletions
diff --git a/src/cmd/scat/plate.h b/src/cmd/scat/plate.h
new file mode 100644
index 00000000..4d10bb5b
--- /dev/null
+++ b/src/cmd/scat/plate.h
@@ -0,0 +1,138 @@
+#define RAD(x) ((x)*PI_180)
+#define DEG(x) ((x)/PI_180)
+#define ARCSECONDS_PER_RADIAN (DEG(1)*3600)
+#define input_nybble(infile) input_nbits(infile,4)
+
+typedef float Angle; /* in radians */
+
+enum
+{
+ /*
+ * parameters for plate
+ */
+ Pppo1 = 0,
+ Pppo2,
+ Pppo3,
+ Pppo4,
+ Pppo5,
+ Pppo6,
+ Pamdx1,
+ Pamdx2,
+ Pamdx3,
+ Pamdx4,
+ Pamdx5,
+ Pamdx6,
+ Pamdx7,
+ Pamdx8,
+ Pamdx9,
+ Pamdx10,
+ Pamdx11,
+ Pamdx12,
+ Pamdx13,
+ Pamdx14,
+ Pamdx15,
+ Pamdx16,
+ Pamdx17,
+ Pamdx18,
+ Pamdx19,
+ Pamdx20,
+ Pamdy1,
+ Pamdy2,
+ Pamdy3,
+ Pamdy4,
+ Pamdy5,
+ Pamdy6,
+ Pamdy7,
+ Pamdy8,
+ Pamdy9,
+ Pamdy10,
+ Pamdy11,
+ Pamdy12,
+ Pamdy13,
+ Pamdy14,
+ Pamdy15,
+ Pamdy16,
+ Pamdy17,
+ Pamdy18,
+ Pamdy19,
+ Pamdy20,
+ Ppltscale,
+ Pxpixelsz,
+ Pypixelsz,
+ Ppltra,
+ Ppltrah,
+ Ppltram,
+ Ppltras,
+ Ppltdec,
+ Ppltdecd,
+ Ppltdecm,
+ Ppltdecs,
+ Pnparam,
+};
+
+typedef struct Plate Plate;
+struct Plate
+{
+ char rgn[7];
+ char disk;
+ Angle ra;
+ Angle dec;
+};
+
+typedef struct Header Header;
+struct Header
+{
+ float param[Pnparam];
+ int amdflag;
+
+ float x;
+ float y;
+ float xi;
+ float eta;
+};
+typedef long Type;
+
+typedef struct Image Image;
+struct Image
+{
+ int nx;
+ int ny; /* ny is the fast-varying dimension */
+ Type a[1];
+};
+
+int nplate;
+Plate plate[2000]; /* needs to go to 2000 when the north comes */
+double PI_180;
+double TWOPI;
+int debug;
+struct
+{
+ float min;
+ float max;
+ float del;
+ double gamma;
+ int neg;
+} gam;
+
+char* hms(Angle);
+char* dms(Angle);
+double xsqrt(double);
+Angle dist(Angle, Angle, Angle, Angle);
+Header* getheader(char*);
+char* getword(char*, char*);
+void amdinv(Header*, Angle, Angle, float, float);
+void ppoinv(Header*, Angle, Angle);
+void xypos(Header*, Angle, Angle, float, float);
+void traneqstd(Header*, Angle, Angle);
+Angle getra(char*);
+Angle getdec(char*);
+void getplates(void);
+
+Image* dssread(char*);
+void hinv(Type*, int, int);
+int input_bit(Biobuf*);
+int input_nbits(Biobuf*, int);
+void qtree_decode(Biobuf*, Type*, int, int, int, int);
+void start_inputing_bits(void);
+Bitmap* image(Angle, Angle, Angle, Angle);
+int dogamma(int);