• 大小: 43KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-06-17
  • 语言: C#
  • 标签: c#  

资源简介

亲测可运行程序。空间后方交会,用C#编写,控制台程序,内置含有矩阵求逆、矩阵转置DLL。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MatrixFunction;

namespace homework1_csharp
{
    class Program
    {
        static int N = 4;
        static void space_resection()
        {
            //焦距f、滚转角fai、俯仰角omi、航偏角ka、航摄比例尺m
            //控制点坐标Xd、Yd、Zd,影像上坐标xy初始像片点坐标XsYsZs;
            double m = 50000; double f = 0.15324;
            double fai = 0; double omi = 0; double ka = 0;                       
            //double[] Xd = new double[N]; double[] Yd = new double[N]; double[] Zd = new double[N];
            double[] Xd = { 36589.41 37631.08 39100.97 40426.54 };
            double[] Yd = { 25273.32 31324.51 24934.98 30319.81 };
            double[] Zd = { 2195.17 728.69 2386.5 757.31 };
            double[] gcpx = { -0.08615 -0.0534 -0.01478 0.01046 };
            double[] gcpy = { -0.06899 0.08221 -0.07663 0.06443 };
            double[] x = new double[N]; double[] y = new double[N];
            double Xs = Xd.Average(); double Ys = Yd.Average(); double Zs = Zd.Average()+m*f;
            double a1 a2 a3 b1 b2 b3 c1 c2 c3; double[] R = new double[3 3];
            double[] a11 = new double[N]; double[] a12 = new double[N]; double[] a13 = new double[N]; double[] a14 = new double[N]; double[] a15 = new double[N]; double[] a16 = new double[N];
            double[] a21 = new double[N]; double[] a22 = new double[N]; double[] a23 = new double[N]; double[] a24 = new double[N]; double[] a25 = new double[N]; double[] a26 = new double[N];
            double[] X_ = new double[N]; double[] Y_ = new double[N]; double[] Z_ = new double[N];
            Matrix A_LASTMatrix = new Matrix(2 * N  6);
            Matrix V_LASTMatrix = new Matrix(2 * N  1);

            while(true)
            {
                R[0 0]= a1 = Math.Cos(fai) * Math.Cos(ka) - Math.Sin(fai) * Math.Sin(omi) * Math.Sin(ka);
                R[0 1]=a2 = -Math.Cos(fai) * Math.Sin(ka) - Math.Sin(fai) * Math.Sin(omi) * Math.Cos(ka);
                R[0 2]=a3 = -Math.Sin(fai) * Math.Cos(omi);
                R[1 0]=b1 = Math.Cos(omi) * Math.Sin(ka);R[1 1]= b2 = Math.Cos(omi) * Math.Cos(ka);R[1 2]= b3 = -Math.Sin(omi);
                R[2 0]= c1 = Math.Sin(fai) * Math.Cos(ka) + Math.Cos(fai) * Math.Sin(omi) * Math.Sin(ka);
                R[2 1]  =c2 = -Math.Sin(fai) * Math.Sin(ka) + Math.Cos(fai) * Math.Sin(omi) * Math.Cos(ka);
                R[2 2]= c3 = Math.Cos(fai) * Math.Cos(omi);
                Matrix R_Matrix = new Matrix(R);
                for(int i = 0 ;i < N;i++)
                {
                    //double[] X_ = new double[N]; double[] Y_ = new double[N]; double[] Z_ = new double[N];
                    X_[i] = a1 * (Xd[i] - Xs) + b1 * (Yd[i] - Ys) + c1 * (Zd[i] - Zs);
                    Y_[i] = a2 * (Xd[i] - Xs) + b2 * (Yd[i] - Ys) + c2 * (Zd[i] - Zs);
                    Z_[i] = a3 * (Xd[i] - Xs) + b3 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        187  2018-05-18 11:30  homework1_csharp\homework1_csharp\App.config

     文件       9216  2018-05-24 15:15  homework1_csharp\homework1_csharp\bin\Debug\homework1_csharp.exe

     文件        187  2018-05-18 11:30  homework1_csharp\homework1_csharp\bin\Debug\homework1_csharp.exe.config

     文件      15872  2018-05-24 15:15  homework1_csharp\homework1_csharp\bin\Debug\homework1_csharp.pdb

     文件      24224  2018-05-24 14:59  homework1_csharp\homework1_csharp\bin\Debug\homework1_csharp.vshost.exe

     文件        187  2018-05-18 11:30  homework1_csharp\homework1_csharp\bin\Debug\homework1_csharp.vshost.exe.config

     文件        490  2013-03-18 17:00  homework1_csharp\homework1_csharp\bin\Debug\homework1_csharp.vshost.exe.manifest

     文件      12288  2017-04-16 16:17  homework1_csharp\homework1_csharp\bin\Debug\MatrixFunction.dll

     文件       2801  2018-05-18 23:19  homework1_csharp\homework1_csharp\homework1_csharp.csproj

     文件       6842  2018-05-18 22:32  homework1_csharp\homework1_csharp\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        784  2018-05-24 15:17  homework1_csharp\homework1_csharp\obj\Debug\homework1_csharp.csproj.FileListAbsolute.txt

     文件       5103  2018-05-18 23:19  homework1_csharp\homework1_csharp\obj\Debug\homework1_csharp.csprojResolveAssemblyReference.cache

     文件       9216  2018-05-24 15:15  homework1_csharp\homework1_csharp\obj\Debug\homework1_csharp.exe

     文件      15872  2018-05-24 15:15  homework1_csharp\homework1_csharp\obj\Debug\homework1_csharp.pdb

     文件          0  2018-05-18 11:30  homework1_csharp\homework1_csharp\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2018-05-18 11:30  homework1_csharp\homework1_csharp\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2018-05-18 11:30  homework1_csharp\homework1_csharp\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件       6693  2018-05-24 15:15  homework1_csharp\homework1_csharp\Program.cs

     文件       1374  2018-05-18 11:30  homework1_csharp\homework1_csharp\Properties\AssemblyInfo.cs

     文件       1017  2018-05-18 11:30  homework1_csharp\homework1_csharp.sln

    ..A..H.     23552  2018-05-24 15:19  homework1_csharp\homework1_csharp.v12.suo

     目录          0  2018-05-18 11:30  homework1_csharp\homework1_csharp\obj\Debug\TempPE

     目录          0  2018-05-18 22:29  homework1_csharp\homework1_csharp\bin\Debug

     目录          0  2018-05-24 15:15  homework1_csharp\homework1_csharp\obj\Debug

     目录          0  2018-05-18 11:30  homework1_csharp\homework1_csharp\bin

     目录          0  2018-05-18 11:30  homework1_csharp\homework1_csharp\obj

     目录          0  2018-05-18 11:30  homework1_csharp\homework1_csharp\Properties

     目录          0  2018-05-24 15:15  homework1_csharp\homework1_csharp

     目录          0  2018-05-18 11:30  homework1_csharp

----------- ---------  ---------- -----  ----

............此处省略2个文件信息

评论

共有 条评论