Changeset 213 in pacpusframework


Ignore:
Timestamp:
Nov 6, 2013, 2:44:39 PM (11 years ago)
Author:
Marek Kurdej
Message:

Update: Geodesie.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/Pacpus/PacpusTools/geodesie.h

    r212 r213  
    2121
    2222#include <boost/math/constants/constants.hpp>
     23#include <boost/operators.hpp>
    2324#include <cmath>
    2425#include <iostream>
     
    3637/// @todo Rewrite!
    3738struct PACPUSTOOLS_API Matrice
     39    : boost::multipliable<Matrice>
    3840{
    3941    /// Copy ctor
     
    4143    /// Ctor
    4244    Matrice();
     45    /// Ctor
     46    Matrice(
     47        double l0c0, double l0c1, double l0c2,
     48        double l1c0, double l1c1, double l1c2,
     49        double l2c0, double l2c1, double l2c2
     50    );
     51
    4352    /// @todo Documentation
    4453    void Apply(double v0, double v1, double v2, double& Mv0, double& Mv1, double& Mv2);
     54
     55    Matrice& operator*=(Matrice const& other);
    4556
    4657    /// @todo Documentation
     
    6778
    6879PACPUSTOOLS_API Matrice TransMat(Matrice const& A);
    69 PACPUSTOOLS_API Matrice ProdMat(Matrice const& A, Matrice const& B);
     80PACPUSTOOLS_API PACPUS_DEPRECATED_MSG(Matrice ProdMat(Matrice const& A, Matrice const& B), "use Matrice::operator *");
    7081PACPUSTOOLS_API PACPUS_DEPRECATED_MSG(void Write(Matrice const& A, std::ostream& out), "use operator<<");
    7182PACPUSTOOLS_API std::ostream& operator<<(std::ostream& os, Matrice const& A);
  • trunk/src/PacpusTools/src/geodesie.cpp

    r212 r213  
    6565    Mv1 = c0_l1 * v0 + c1_l1 * v1 + c2_l1 * v2;
    6666    Mv2 = c0_l2 * v0 + c1_l2 * v1 + c2_l2 * v2;
     67}
     68
     69Matrice& Matrice::operator*=(Matrice const& other)
     70{
     71    // TODO: optimize
     72    *this = ProdMat(*this, other);
     73    return *this;
    6774}
    6875
     
    301308    passage.c2_l2 = 1.0;
    302309
    303     out = ProdMat(passage, in);
     310    out = passage * in;
    304311    double diff_h;
    305312    raf98.Interpol(Rad2Deg(lambda), Rad2Deg(phi), &diff_h);
     
    369376    passage.c2_l2 = 1.0;
    370377
    371     out = ProdMat(passage, in);
     378    out = passage * in;
    372379
    373380    double diff_h;
Note: See TracChangeset for help on using the changeset viewer.