Giter Club home page Giter Club logo

aelocate's Introduction

Geiger算法C++实现

总体概况

  • C++实现了Geiger算法
  • Visual Studio 2010 编译通过
  • 使用Eigen开源矩阵库来进行矩阵计算

文件说明

  • Geiger.h包含geigerSolver类的定义
  • Geiger.cpp实现了geigerSolver
  • main.cpp测试了一组来自实验的数据,输出为定位点坐标值

类定义

    class geigerSolver{
    private:
        Matrix<double, Dynamic, 3> sensorLoc;    //传感器坐标
        VectorXd arrivalTime;                    //到达时间
        // Vector3d spaceLimit;                  //试件的空间尺寸
        int sensorNumber;
        float sonicSpeed;

    public:
        geigerSolver(double *LocOfSensor,double *TimeOfArrival,float *LimitOfSpace,int NumOfSensors,float SpeedOfSound);  //构造函数
        double* doSolve();                                   //求解函数
        double pdist(RowVector3d, RowVector3d);              //求向量距离
        double LocRes[3] = { 0,0,0 };                        //定位结果
        bool isAccurate = true;               //是否准确的标志位,默认为真
        void resRevised();                    //当结果有偏离时,修正函数
        bool isInBox();                       //判断是否在体内
        double targetFunc(RowVector3d);       //评价函数
    };

构造函数参数说明

  • double *LocOfSensor:按到达时间为序的传感器的坐标值构成的一维数组指针
  • double *TimeOfArrival:到达时间构成的一维数组指针
  • float *LimitOfSpace:试件的空间尺寸构成的一维数组指针
  • int NumOfSensors:本次计算的使用的传感器数量
  • float SpeedOfSound:预设声速值

CMake

设置环境变量EIGEN3_INCLUDE_DIREigeninclude文件夹。

aelocate's People

Contributors

yzlnew avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.