Commit 1e15ae7
committed
alignment/SPK: address code review feedback
Fix undefined behavior in TransformTelescopeToCelestial: spkVtel reads
tar->a and tar->b unconditionally before its internal mode switch, so
leaving them uninitialized in TARG mode was UB. Initialize both to 0.0.
Check the spkAstr return code in UpdateAstrometry. Zero m_Ast before the
call so a failure cannot leave stale data behind; on error, seed eral from
the libnova LST so subsequent spkVtel calls see a coherent ERA rather than
garbage, then return early.
Restore pmfit.c closer to the original vendored source.1 parent ea5bb05 commit 1e15ae7
3 files changed
Lines changed: 45 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| |||
267 | 269 | | |
268 | 270 | | |
269 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
270 | 278 | | |
271 | 279 | | |
272 | 280 | | |
273 | 281 | | |
274 | 282 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | 283 | | |
279 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
280 | 297 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | 298 | | |
285 | 299 | | |
286 | 300 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 5 | | |
22 | 6 | | |
23 | 7 | | |
| |||
253 | 237 | | |
254 | 238 | | |
255 | 239 | | |
256 | | - | |
| 240 | + | |
257 | 241 | | |
258 | 242 | | |
259 | 243 | | |
| |||
410 | 394 | | |
411 | 395 | | |
412 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
413 | 418 | | |
414 | 419 | | |
415 | 420 | | |
| |||
608 | 613 | | |
609 | 614 | | |
610 | 615 | | |
611 | | - | |
| 616 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
0 commit comments