Changeset 16939
- Timestamp:
- Mar 11, 2008, 11:12:54 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/addstar/src/getusnob.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/src/getusnob.c
r16810 r16939 16 16 int spd, spd_start, spd_end; 17 17 int NUSNO, Nusno, Nstars; 18 short int USNO_RED, USNO_BLUE ;18 short int USNO_RED, USNO_BLUE, USNO_N; 19 19 e_time USNOepoch; 20 20 Stars *stars; 21 21 22 22 /* require photcode */ 23 NAMED_PHOTCODE (USNO_RED, "USNO_RED");23 NAMED_PHOTCODE (USNO_RED, "USNO_RED"); 24 24 NAMED_PHOTCODE (USNO_BLUE, "USNO_BLUE"); 25 if (photcode == USNO_RED) goto good_code; 25 NAMED_PHOTCODE (USNO_N, "USNO_N"); 26 if (photcode == USNO_RED) goto good_code; 26 27 if (photcode == USNO_BLUE) goto good_code; 28 if (photcode == USNO_N) goto good_code; 27 29 Shutdown ("USNO photcode not specified"); 28 30 good_code: … … 148 150 stars[Nusno].t = USNOepoch; 149 151 150 /* one pass of addstar does either r or b*/152 /* one pass of addstar does r, b, or n */ 151 153 if (photcode == USNO_BLUE) { 152 m1 = fabs(0.01 * (buf[5] % 10000)); /* 1st blue mag */ 153 m2 = fabs(0.01 * (buf[7] % 10000)); /* 1st blue mag */ 154 stars[Nusno].code = USNO_BLUE; 155 } else { 156 m1 = fabs(0.01 * (buf[6] % 10000)); /* 1st red mag */ 157 m2 = fabs(0.01 * (buf[8] % 10000)); /* 2nd red mag */ 158 stars[Nusno].code = USNO_RED; 159 } 154 m1 = fabs(0.01 * (buf[5] % 10000)); /* 1st blue mag */ 155 m2 = fabs(0.01 * (buf[7] % 10000)); /* 1st blue mag */ 156 } 157 if (photcode == USNO_RED) { 158 m1 = fabs(0.01 * (buf[6] % 10000)); /* 1st red mag */ 159 m2 = fabs(0.01 * (buf[8] % 10000)); /* 2nd red mag */ 160 } 161 if (photcode == USNO_N) { 162 m1 = fabs(0.01 * (buf[9] % 10000)); /* N (IR) survey */ 163 m2 = 0; 164 } 165 stars[Nusno].code = photcode; 160 166 161 167 /* if two mags are available, get an average */
Note:
See TracChangeset
for help on using the changeset viewer.
