Skip to content
Snippets Groups Projects
Select Git revision
  • 1eb0f89c5dd12d001de5015ed61cf530aa451f79
  • main default protected
  • Kelvinrr-patch-3
  • radius_update
  • revert-616-apollo_pan
  • vims
  • 0.10
  • Kelvinrr-patch-2
  • revert-563-minirf_fix
  • Kelvinrr-patch-1
  • 0.9
  • acpaquette-patch-3
  • acpaquette-patch-2
  • acpaquette-patch-1
  • spiceql
  • ci-coverage
  • 0.10.0
  • 0.9.1
  • 0.9.0
  • 0.8.7
  • 0.8.8
  • 0.8.6
  • 0.8.3
  • 0.8.4
  • 0.8.5
  • 0.8.2
  • 0.8.1
  • 0.8.0
  • 0.7.3
  • 0.7.2
  • 0.7.1
  • 0.7.0
  • 0.6.5
  • 0.6.4
  • 0.6.3
  • 0.6.2
36 results

ale.h

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