Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ale
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Ale
Commits
a4dde508
Commit
a4dde508
authored
6 years ago
by
Jesse Mapel
Browse files
Options
Downloads
Patches
Plain Diff
Changed methods to use strings instead of char*
parent
0ed6f9d0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/eal.h
+15
-11
15 additions, 11 deletions
include/eal.h
src/eal.cpp
+10
-8
10 additions, 8 deletions
src/eal.cpp
with
25 additions
and
19 deletions
include/eal.h
+
15
−
11
View file @
a4dde508
#ifndef EAL_H
#ifndef
EAL_INCLUDE_
EAL_H
#define EAL_H
#define
EAL_INCLUDE_
EAL_H
#include
<vector>
#include
<vector>
#include
<string
.h
>
#include
<string>
using
namespace
std
;
using
namespace
std
;
vector
<
double
>
getPosition
(
vector
<
vector
<
double
>>
coords
,
vector
<
double
>
coeffs
,
char
*
interp
,
double
time
);
namespace
eal
{
vector
<
double
>
getVelocity
(
vector
<
vector
<
double
>>
coords
,
vector
<
double
>
coeffs
,
char
*
interp
,
double
time
,
bool
interpolation
);
vector
<
double
>
getPosition
(
vector
<
double
>
co
effs
,
char
*
interp
,
double
time
);
vector
<
double
>
getPosition
(
vector
<
vector
<
double
>
>
co
ords
,
vector
<
double
>
times
,
string
interp
,
double
time
);
vector
<
double
>
getVelocity
(
vector
<
double
>
co
effs
,
char
*
interp
,
double
time
,
bool
interpolation
);
vector
<
double
>
getVelocity
(
vector
<
vector
<
double
>
>
co
ords
,
vector
<
double
>
times
,
string
interp
,
double
time
,
bool
interpolation
);
vector
<
double
>
get
Rota
tion
(
char
*
from
,
char
*
to
,
vector
<
vector
<
double
>
>
rotations
,
vector
<
double
>
times
,
char
*
interp
,
double
time
);
vector
<
double
>
get
Posi
tion
(
vector
<
double
>
coeffs
,
string
interp
,
double
time
);
vector
<
double
>
get
Angular
Velocity
(
char
*
from
,
char
*
to
,
vector
<
vector
<
double
>>
rotations
,
vector
<
double
>
time
s
,
char
*
interp
,
double
time
);
vector
<
double
>
getVelocity
(
vector
<
double
>
coeffs
,
string
interp
,
double
time
,
bool
interpolation
);
vector
<
double
>
getRotation
(
char
*
from
,
char
*
to
,
vector
<
double
>
coefficients
,
char
*
interp
,
double
time
);
vector
<
double
>
getRotation
(
string
from
,
string
to
,
vector
<
vector
<
double
>>
rotations
,
vector
<
double
>
times
,
string
interp
,
double
time
);
vector
<
double
>
getAngularVelocity
(
char
*
from
,
char
*
to
,
vector
<
double
>
coefficients
,
char
*
interp
,
double
time
);
vector
<
double
>
getAngularVelocity
(
string
from
,
string
to
,
vector
<
vector
<
double
>>
rotations
,
vector
<
double
>
times
,
string
interp
,
double
time
);
vector
<
double
>
getRotation
(
string
from
,
string
to
,
vector
<
double
>
coefficients
,
string
interp
,
double
time
);
vector
<
double
>
getAngularVelocity
(
string
from
,
string
to
,
vector
<
double
>
coefficients
,
string
interp
,
double
time
);
}
#endif // EAL_H
#endif // EAL_H
This diff is collapsed.
Click to expand it.
src/eal.cpp
+
10
−
8
View file @
a4dde508
#include
"eal.h"
#include
"eal.h"
using
namespace
eal
;
// Positional Functions
// Positional Functions
// Position Data Functions
// Position Data Functions
vector
<
double
>
getPosition
(
vector
<
vector
<
double
>>
coords
,
vector
<
double
>
coeffs
,
char
*
interp
,
double
time
)
{
vector
<
double
>
getPosition
(
vector
<
vector
<
double
>>
coords
,
vector
<
double
>
times
,
string
interp
,
double
time
)
{
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
return
coordinate
;
return
coordinate
;
}
}
vector
<
double
>
getVelocity
(
vector
<
vector
<
double
>>
coords
,
vector
<
double
>
coeffs
,
char
*
interp
,
double
time
,
bool
interpolation
)
{
vector
<
double
>
getVelocity
(
vector
<
vector
<
double
>>
coords
,
vector
<
double
>
times
,
string
interp
,
double
time
,
bool
interpolation
)
{
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
return
coordinate
;
return
coordinate
;
}
}
// Postion Function Functions
// Postion Function Functions
vector
<
double
>
getPosition
(
vector
<
double
>
coeffs
,
char
*
interp
,
double
time
)
{
vector
<
double
>
getPosition
(
vector
<
double
>
coeffs
,
string
interp
,
double
time
)
{
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
return
coordinate
;
return
coordinate
;
}
}
vector
<
double
>
getVelocity
(
vector
<
double
>
coeffs
,
char
*
interp
,
double
time
,
bool
interpolation
)
{
vector
<
double
>
getVelocity
(
vector
<
double
>
coeffs
,
string
interp
,
double
time
,
bool
interpolation
)
{
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
return
coordinate
;
return
coordinate
;
}
}
...
@@ -27,23 +29,23 @@ vector<double> getVelocity(vector<double> coeffs, char *interp, double time, boo
...
@@ -27,23 +29,23 @@ vector<double> getVelocity(vector<double> coeffs, char *interp, double time, boo
// Rotation Data Functions
// Rotation Data Functions
// Rotation Data Functions
// Rotation Data Functions
vector
<
double
>
getRotation
(
char
*
from
,
char
*
to
,
vector
<
vector
<
double
>>
rotations
,
vector
<
double
>
times
,
char
*
interp
,
double
time
)
{
vector
<
double
>
getRotation
(
string
from
,
string
to
,
vector
<
vector
<
double
>>
rotations
,
vector
<
double
>
times
,
string
interp
,
double
time
)
{
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
return
coordinate
;
return
coordinate
;
}
}
vector
<
double
>
getAngularVelocity
(
char
*
from
,
char
*
to
,
vector
<
vector
<
double
>>
rotations
,
vector
<
double
>
times
,
char
*
interp
,
double
time
)
{
vector
<
double
>
getAngularVelocity
(
string
from
,
string
to
,
vector
<
vector
<
double
>>
rotations
,
vector
<
double
>
times
,
string
interp
,
double
time
)
{
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
return
coordinate
;
return
coordinate
;
}
}
// Rotation Function Functions
// Rotation Function Functions
vector
<
double
>
getRotation
(
char
*
from
,
char
*
to
,
vector
<
double
>
coefficients
,
char
*
interp
,
double
time
)
{
vector
<
double
>
getRotation
(
string
from
,
string
to
,
vector
<
double
>
coefficients
,
string
interp
,
double
time
)
{
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
return
coordinate
;
return
coordinate
;
}
}
vector
<
double
>
getAngularVelocity
(
char
*
from
,
char
*
to
,
vector
<
double
>
coefficients
,
char
*
interp
,
double
time
)
{
vector
<
double
>
getAngularVelocity
(
string
from
,
string
to
,
vector
<
double
>
coefficients
,
string
interp
,
double
time
)
{
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
vector
<
double
>
coordinate
=
{
0.0
,
0.0
,
0.0
};
return
coordinate
;
return
coordinate
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment