46 Apollo (QString spacecraft, QString instrument) {
47 initialize(spacecraft.toUpper(), instrument.toUpper());
51 QString spacecraft, instrument;
52 if (filename.mid(0,4) ==
"AS15") spacecraft =
"APOLLO 15";
53 else if (filename.mid(0,4) ==
"AS16") spacecraft =
"APOLLO 16";
54 else if (filename.mid(0,4) ==
"AS17") spacecraft =
"APOLLO 17";
57 QString msg =
"The image filename does not match the required formatting.";
61 if (filename.mid(5,1) ==
"M") instrument =
"METRIC";
62 else if (filename.mid(5,1) ==
"P") instrument =
"PANORAMIC";
63 else if (filename.mid(5,1) ==
"H") instrument =
"HASSELBLAD";
66 QString msg =
"The image filename does not match the required formatting.";
70 initialize(spacecraft, instrument);
76 bool IsMetric () {
return p_instrumentId ==
"METRIC";}
77 bool IsPanoramic () {
return p_instrumentId ==
"PANORAMIC";}
78 bool IsHasselblad () {
return p_instrumentId ==
"HASSELBLAD";}
79 bool IsApollo15 () {
return p_spacecraftName ==
"APOLLO 15";}
80 bool IsApollo16 () {
return p_spacecraftName ==
"APOLLO 16";}
81 bool IsApollo17 () {
return p_spacecraftName ==
"APOLLO 17";}
82 int Width () {
return p_imageWidth;};
83 int Height () {
return p_imageHeight;};
84 int Bands () {
return p_imageBands;};
85 int ReseauDimension () {
return p_reseauDimension;};
86 double PixelPitch () {
return p_imagePixelPitch;};
87 QString SpacecraftName () {
return p_spacecraftName;};
88 QString InstrumentId () {
return p_instrumentId;};
89 QString NaifFrameCode () {
return p_naifFrameCode;};
90 QString TargetName () {
return "MOON";};
91 iTime LaunchDate () {
return p_launchDate;};
95 void initialize(QString spacecraft, QString instrument) {
96 if (instrument ==
"METRIC") {
97 p_instrumentId =
"METRIC";
98 p_reseauDimension = 403;
100 p_imageHeight = 22900;
102 p_imagePixelPitch = 200.5;
104 else if (instrument ==
"PANORAMIC") {
105 p_instrumentId =
"PANORAMIC";
106 p_reseauDimension = 0;
107 p_imageWidth = 231480;
108 p_imageHeight = 23007;
110 p_imagePixelPitch =200.5;
112 else if (instrument ==
"HASSELBLAD") {
113 p_instrumentId =
"HASSELBLAD";
114 p_reseauDimension = 403;
115 p_imageWidth = 12800;
116 p_imageHeight = 12800;
118 p_imagePixelPitch = 200.5;
121 QString msg =
"Unknown instrument: " + instrument;
125 if (spacecraft ==
"APOLLO 15" ){
126 p_spacecraftName =
"APOLLO 15";
128 p_launchDate =
"1971-07-26T13:33:39.11";
129 if (IsMetric()) p_naifFrameCode =
"-915240";
130 else if (IsPanoramic()) p_naifFrameCode =
"-915230";
132 else if (spacecraft ==
"APOLLO 16") {
133 p_spacecraftName =
"APOLLO 16";
135 p_launchDate =
"1972-04-16T17:53:36.238";
136 if (IsMetric()) p_naifFrameCode =
"-916240";
137 else if (IsPanoramic()) p_naifFrameCode =
"-916230";
139 else if (spacecraft ==
"APOLLO 17") {
140 p_spacecraftName =
"APOLLO 17";
142 p_launchDate =
"1972-12-07T05:33:00.000";
143 if (IsMetric()) p_naifFrameCode =
"-917240";
144 else if (IsPanoramic()) p_naifFrameCode =
"-917230";
147 QString msg =
"Unknown spacecraft: " + spacecraft;
152 int p_imageWidth, p_imageHeight, p_imageBands, p_reseauDimension;
153 double p_imagePixelPitch;
154 QString p_spacecraftName, p_instrumentId, p_naifFrameCode;
~Apollo()
Destroys the Apollo object.
#define _FILEINFO_
Macro for the filename and line number.
A type of error that could only have occurred due to a mistake on the user's part (e...
A type of error that cannot be classified as any of the other error types.
Reads user Apollos from a data file.