Commits
Darrell Schiebel authored 5b43d8b8e1c Merge
368 368 | QVector<Double> diameters = msmeta.msmd().getAntennaDiameters(); |
369 369 | vector<MPosition> positions = msmeta.msmd().getAntennaPositions(); |
370 370 | vector<QVector<Double> > offsets = msmeta.msmd().getAntennaOffsets(); |
371 371 | Bool posIsITRF = (positions[0].type() == MPosition::ITRF); |
372 372 | |
373 373 | // Get observatory position info for antenna offsets |
374 374 | // *not read from antenna table OFFSET column!* |
375 375 | casacore::MPosition obsPos; |
376 376 | casacore::String telname; |
377 377 | bool doOffset = getObservatoryPosition(obsPos, telname); |
378 - | casacore::Double rObs, longObs, latObs; |
378 + | casacore::Double rObs = 0.0, longObs = 0.0, latObs = 0.0; |
379 379 | if (!doOffset) { |
380 380 | os << "Warning: Telescope name '" << telname << "' is not recognized by CASA. Cannot compute offsets." << endl << endl; |
381 381 | } else { |
382 382 | casacore::Vector<casacore::Double> obsXYZ = obsPos.get("m").getValue(); |
383 383 | casacore::Double xo(obsXYZ[0]), yo(obsXYZ[1]), zo(obsXYZ[2]); |
384 384 | rObs = sqrt(xo*xo + yo*yo + zo*zo); |
385 385 | casacore::Vector<casacore::Double> obsLongLat = obsPos.getAngle("rad").getValue(); |
386 386 | longObs = obsLongLat[0]; |
387 387 | latObs = obsLongLat[1]; |
388 388 | } |