Changeset 14531 for trunk/ppSim/src/ppSimLoadStars.c
- Timestamp:
- Aug 16, 2007, 8:52:31 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimLoadStars.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimLoadStars.c
r14463 r14531 22 22 float radius = 0.5 * PS_MAX(bounds->x1 - bounds->x0, bounds->y1 - bounds->y0) * scale; 23 23 psFree(bounds); 24 25 float x0fpa = 0.5*(bounds->x0 + bounds->x1); 26 float y0fpa = 0.5*(bounds->y0 + bounds->y1); 24 27 25 28 psMetadataAdd(astroRecipe, PS_LIST_TAIL, "RA_MIN", PS_DATA_F32 | PS_META_REPLACE, "", ra0 - radius); … … 47 50 48 51 // Convert to x,y position on tangent plane, in pixels 49 float div = sin(star->ra) * sin(dec0) + cos(star->dec) * cos(dec0) * cos(star->ra - ra0) /scale;52 float div = (sin(star->ra) * sin(dec0) + cos(star->dec) * cos(dec0) * cos(star->ra - ra0)) * scale; 50 53 float xi = cos(star->dec) * sin(star->ra - ra0) / div; 51 54 float eta = (sin(star->dec) * cos(dec0) - cos(star->dec) * sin(dec0) * cos(star->ra - ra0)) / div; 52 55 53 // Apply rotation 54 star->x = cos(pa) * xi - sin(pa) * eta ;55 star->y = sin(pa) * xi + cos(pa) * eta ;56 // Apply rotation, make FPA center of boresite 57 star->x = cos(pa) * xi - sin(pa) * eta + x0fpa; 58 star->y = sin(pa) * xi + cos(pa) * eta + y0fpa; 56 59 57 60 // Convert magnitude to peak flux
Note:
See TracChangeset
for help on using the changeset viewer.
