public Ecef(Lla lla) : this() { Ecef ecef = lla.ToEcef(); X = ecef.X; Y = ecef.Y; Z = ecef.Z; }
public Tuple<Ecef, Ecef> GeneratePositionAndVelocityAt(double elapsedTime) { double time = elapsedTime / 1000.0; double posOnCircle = time * this.SPEED / RADIUS; double e = Math.Cos(posOnCircle) * RADIUS; double n = Math.Sin(posOnCircle) * RADIUS; Lla llaPos = ORIGIN.AddEnu(new Enu(e, n, 0)); Ecef position = llaPos.ToEcef(); return new Tuple<Ecef, Ecef>(position, ComputeVelocity(posOnCircle)); }
public Ecef ToEcef(Lla origin) { Ecef originEcef = origin.ToEcef(); double sinLon = Math.Sin(origin.Lon); double cosLon = Math.Cos(origin.Lon); double sinLat = Math.Sin(origin.Lat); double cosLat = Math.Cos(origin.Lat); return(new Ecef( -sinLon * East - sinLat * cosLon * North + cosLat * cosLon * Up + originEcef.X, cosLon * East - sinLat * sinLon * North + cosLat * sinLon * Up + originEcef.Y, cosLat * North + sinLat * Up + originEcef.Z )); }
public bool PushLlaNed(double elapsedTime, Lla lla, Attitude attitude, string name = "") { return(PushEcefNed(elapsedTime, lla.ToEcef(), attitude, name)); }
public bool PushLla(double elapsedTime, Lla lla, string name = "") { return(PushEcef(elapsedTime, lla.ToEcef(), name)); }
public void PushRouteLla(double speed, Lla lla) { PushRouteEcef(speed, lla.ToEcef()); }
public void PushTrackLlaNed(int elapsedTime, Lla lla, Attitude attitude) { PushTrackEcefNed(elapsedTime, lla.ToEcef(), attitude); }
public void PushTrackLla(int elapsedTime, Lla lla) { PushTrackEcef(elapsedTime, lla.ToEcef()); }