3

OrbitToolsライブラリを使用して、 http: //karhukoti.comに似た Bing Maps Silverlight コントロールを使用した衛星追跡システムを開発しています。

私はこの分野に精通しておらず、衛星追跡に関連する多くの情報を欠いていますが、この特定のプロジェクトが私の上司によって卒業プロジェクトとして選ばれたため、独学を始めました.

しかし、私は多くの困難に直面しました。主要なものは、2 つの線要素 (TLE) 情報を経度、緯度、高度に変換して、衛星と衛星の経路を地図上に表示する方法です。

次の C# コードを試しました。

protected void DisplaySatellitePath(List<Eci> Pos)
{
  MapLayer myRouteLayer = new MapLayer();
  myMap.Children.Add(myRouteLayer);

  foreach (Eci e in Pos)
  {
    CoordGeo coordinates = e.toGeo();

    Ellipse point = new Ellipse();
    point.Width = 10;
    point.Height = 10;
    point.Fill = new SolidColorBrush(Colors.Orange);
    point.Opacity = 0.65;

    //Location location = new Location(e.Position.X, e.Position.X);
    Location location = new Location(coordinates.Latitude, coordinates.Longitude);

    MapLayer.SetPosition(point, location);
    MapLayer.SetPositionOrigin(point, PositionOrigin.Center);
    myRouteLayer.Children.Add(point);
  }
}

そしてまた試した

protected void DisplaySatellitePathSecondGo(List<Eci> Pos)
  {
  MapLayer myRouteLayer = new MapLayer();
  myMap.Children.Add(myRouteLayer);

  foreach (Eci e in Pos)
  { 

    Ellipse point = new Ellipse();

    point.Width = 10;
    point.Height = 10;
    point.Fill = new SolidColorBrush(Colors.Yellow);
    point.Opacity = 0.65;

    Site siteEquator = new Site(e.Position.X, e.Position.Y, e.Position.Z); 
    Location location = new Location(siteEquator.Latitude, siteEquator.Longitude);
    MapLayer.SetPosition(point, location);
    MapLayer.SetPositionOrigin(point, PositionOrigin.Center);
    myRouteLayer.Children.Add(point);
  }
}

ここで私が間違っていることを教えてください。OrbitToolsに関する例やドキュメントをネットで検索しましたが、うまくいきませんでした。

このライブラリを使用している誰かが私を助けてくれたり、より良い .NET ライブラリを提案してくれることを本当に願っています。

どうもありがとうございました。

4

1 に答える 1

2

これはまだあなたが苦労していることですか?コードをプルダウンすると、ライブラリと一緒に提供されるデモがあることに気付きました。その中で、彼らはあなたが見たにちがいないと確信している次の方法を示しています:

static void PrintPosVel(Tle tle) { Orbit orbit = new Orbit(tle); ArrayList Pos = new ArrayList();

     // Calculate position, velocity
     // mpe = "minutes past epoch"
     for (int mpe = 0; mpe <= (360 * 4); mpe += 360)
     {
        // Get the position of the satellite at time "mpe".
        // The coordinates are placed into the variable "eci".
        Eci eci = orbit.getPosition(mpe);

        // Push the coordinates object onto the end of the array
        Pos.Add(eci);
     }

     // Print TLE data
     Console.Write("{0}\n", tle.Name);
     Console.Write("{0}\n", tle.Line1);
     Console.Write("{0}\n", tle.Line2);

     // Header
     Console.Write("\n  TSINCE            X                Y                Z\n\n");

     // Iterate over each of the ECI position objects pushed onto the
     // position vector, above, printing the ECI position information
     // as we go.
     for (int i = 0; i < Pos.Count; i++)
     {
        Eci e = Pos[i] as Eci;

        Console.Write("{0,4}.00 {1,16:f8} {2,16:f8} {3,16:f8}\n",
                      i * 360,
                      e.Position.X,
                      e.Position.Y,
                      e.Position.Z);
     }

     Console.Write("\n                  XDOT             YDOT             ZDOT\n\n");

     // Iterate over each of the ECI position objects in the position
     // vector again, but this time print the velocity information.
     for (int i = 0; i < Pos.Count; i++)
     {
        Eci e = Pos[i] as Eci;

        Console.Write("{0,24:f8} {1,16:f8} {2,16:f8}\n",
                      e.Velocity.X,
                      e.Velocity.Y,
                      e.Velocity.Z);
     }
  }

これで、彼らはあなたが探している変換を行っているようです. あなたが実際に抱えている問題が何であるかについて、私は何かを見逃していますか?

于 2010-07-02T07:20:05.907 に答える