Skip to content
Snippets Groups Projects
Select Git revision
  • 4760c750a37837a0756b469614ca21504571745e
  • master default protected
  • rocky_8
  • rocky_9
  • pasture
  • testing
  • query
  • v0.2.9
  • v0.2.8
  • v0.2.7
  • v0.2.6
  • v0.2.5
  • v0.2.4
  • v0.2.3
  • v0.2.2
  • v0.2.1
  • v0.2.0
  • v0.1.2
  • v0.1.1
  • v0.1
20 results

import_executor.py

Blame
  • ale.h 1.85 KiB
    #ifndef ALE_INCLUDE_ALE_H
    #define ALE_INCLUDE_ALE_H
    
    #include <json.hpp>
    #include <string>
    #include <vector>
    
    #include <gsl/gsl_interp.h>
    
    namespace ale {
    
      enum interpolation {
        linear,
        spline
      };
    
      nlohmann::json constructStateFromIsd(const std::string positionRotationData);
    
      std::vector<double> getPosition(std::vector<std::vector<double>> coords,
                                      std::vector<double> times,
                                      double time, interpolation interp);
    
      std::vector<double> getVelocity(std::vector<std::vector<double>> coords,
                                      std::vector<double> times,
                                      double time, const interpolation interp);
    
      std::vector<double> getPosition(std::vector<std::vector<double>> coeffs, double time);
      std::vector<double> getVelocity(std::vector<std::vector<double>> coeffs, double time);
    
      std::vector<double> getRotation(std::vector<std::vector<double>> rotations,
                                      std::vector<double> times,
                                      double time, interpolation interp);
      std::vector<double> getAngularVelocity(std::vector<std::vector<double>> rotations,
                                             std::vector<double> times,
                                             double time, interpolation interp);
    
      std::vector<double> getRotation(std::string from, std::string to,
                                      std::vector<double> coefficients, double time);
      std::vector<double> getAngularVelocity(std::string from, std::string to,
                                             std::vector<double> coefficients, double time);
      double evaluatePolynomial(std::vector<double> coeffs, double time, int d);
      double interpolate(std::vector<double> points, std::vector<double> times, double time, interpolation interp, int d);
      std::string load(std::string filename);
    }
    
    #endif // ALE_H