public Earth() { this.m_BaryPos = new PositionVector(); this.m_HeliPos = new PositionVector(); this.m_BaryVel = new VelocityVector(); this.m_HeliVel = new VelocityVector(); this.m_EarthEph = (IEphemeris) new Ephemeris(); this.m_EarthEph.BodyType = BodyType.Moon; this.m_EarthEph.Number = Body.Earth; this.m_EarthEph.Name = "Earth"; this.m_Valid = false; }
public bool ProperMotion(VelocityVector vel, double tjd1, double tjd2) { double[] pos = new double[3]; double[] vel1 = new double[3]; if (!(this.xOk & this.yOk & this.zOk)) { throw new ASCOM.Astrometry.Exceptions.ValueNotSetException("PositionVector:ProperMotion x, y or z has not been set"); } pos[0] = this.PosVec[0]; pos[1] = this.PosVec[1]; pos[2] = this.PosVec[2]; try { vel1[0] = vel.x; } catch (Exception ex) { //ProjectData.SetProjectError(ex); throw new ValueNotAvailableException("PositionVector:ProperMotion VelocityVector.x is not available"); } try { vel1[1] = vel.y; } catch (Exception ex) { //ProjectData.SetProjectError(ex); throw new ValueNotAvailableException("PositionVector:ProperMotion VelocityVector.y is not available"); } try { vel1[2] = vel.z; } catch (Exception ex) { //ProjectData.SetProjectError(ex); throw new ValueNotAvailableException("PositionVector:ProperMotion VelocityVector.z is not available"); } NOVAS2.ProperMotion(tjd1, pos, vel1, tjd2, ref this.PosVec); this.RADecOk = false; this.AzElOk = false; bool flag = false; return(flag); }
public void Aberration(VelocityVector vel) { double[] pos = new double[3]; double[] vel1 = new double[3]; if (!(this.xOk & this.yOk & this.zOk)) { throw new ASCOM.Astrometry.Exceptions.ValueNotSetException("PositionVector:ProperMotion x, y or z has not been set"); } this.CheckEq(); pos[0] = this.PosVec[0]; pos[1] = this.PosVec[1]; pos[2] = this.PosVec[2]; try { vel1[0] = vel.x; } catch (Exception ex) { //ProjectData.SetProjectError(ex); throw new ValueNotAvailableException("PositionVector:Aberration VelocityVector.x is not available"); } try { vel1[1] = vel.y; } catch (Exception ex) { //ProjectData.SetProjectError(ex); throw new ValueNotAvailableException("PositionVector:Aberration VelocityVector.y is not available"); } try { vel1[2] = vel.z; } catch (Exception ex) { //ProjectData.SetProjectError(ex); throw new ValueNotAvailableException("PositionVector:Aberration VelocityVector.z is not available"); } int num = (int)NOVAS2.Aberration(pos, vel1, this.m_Light, ref this.PosVec); this.RADecOk = false; this.AzElOk = false; }