Changeset 41290 for trunk/psastro/src/psastroLoadGlints.c
- Timestamp:
- Feb 25, 2020, 9:55:36 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroLoadGlints.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroLoadGlints.c
r40552 r41290 364 364 if (star_radius_deg < 0.8831) { 365 365 outer_edge_angle = 0.0; 366 } 367 else if (star_radius_deg < 0.9368) { 366 } else if (star_radius_deg < 0.9368) { 368 367 outer_edge_angle = 46.2985 * sqrt(star_radius_deg - 0.8831); 369 } 370 else { 368 } else { 371 369 outer_edge_angle = -2.67 + 14.3 * star_radius_deg; 372 370 } 373 371 if (star_radius_deg < 0.964) { 374 372 inner_edge_angle = -243.866 * pow(star_radius_deg - 0.932,2) + 2.4636; 375 } 376 else { 373 } else { 377 374 inner_edge_angle = 66.2061 * sqrt(star_radius_deg - 0.9635); 378 375 } … … 383 380 // These define the ends of a single arc in arc-centric coordinates 384 381 double x1 = C - R * cos(inner_edge_angle); 385 double y1 = R * sin(inner_edge_angle);382 double y1 = R * sin(inner_edge_angle); 386 383 double x2 = C - R * cos(outer_edge_angle); 387 double y2 = R * sin(outer_edge_angle);384 double y2 = R * sin(outer_edge_angle); 388 385 389 386 // Create the endpoints for the pair of arcs in device coordinates (in millimeters) … … 414 411 x2s,y2s,x2e,y2e); 415 412 416 413 // NOTE: the calculations below appear to expect (x1s, y1s) in millimeters, as mentioned above. 414 // They are then scaled to camera pixel units using 0.015 millimeters / pixel, and then to 415 // TPA units using 13.5 pixels / pixel. I do not know where the (12.78, 57.75) mm offsets 416 // come from (displacement of reference chip?) 417 417 418 tp->x = 13.5 * (y1s / 0.015 + 12.78); 418 419 tp->y = 13.5 * (x1s / -0.015 + 57.74); … … 420 421 x_start->data.F32[0] = fp->x; 421 422 y_start->data.F32[0] = fp->y; 422 // x_start->data.F32[0] = tp->x;423 // y_start->data.F32[0] = tp->y;424 423 425 424 tp->x = 13.5 * (y1e / 0.015 + 12.78); … … 428 427 x_end->data.F32[0] = fp->x; 429 428 y_end->data.F32[0] = fp->y; 430 // x_end->data.F32[0] = tp->x;431 // y_end->data.F32[0] = tp->y;432 429 433 430 x_start->data.F32[1] = x_end->data.F32[0]; … … 441 438 x_start->data.F32[2] = fp->x; 442 439 y_start->data.F32[2] = fp->y; 443 // x_start->data.F32[2] = tp->x;444 // y_start->data.F32[2] = tp->y;445 440 446 441 tp->x = 13.5 * (y2e / 0.015 + 12.78); … … 449 444 x_end->data.F32[2] = fp->x; 450 445 y_end->data.F32[2] = fp->y; 451 // x_end->data.F32[2] = tp->x;452 // y_end->data.F32[2] = tp->y;453 446 454 447 x_start->data.F32[3] = x_end->data.F32[2];
Note:
See TracChangeset
for help on using the changeset viewer.
