Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Lynx On-Board Software
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
Old Rockets
Lynx On-Board Software
Commits
7f3fc6d1
Commit
7f3fc6d1
authored
3 years ago
by
Luca Conterio
Browse files
Options
Downloads
Patches
Plain Diff
[NAS] moved earth constants in configs
parent
f21de121
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/boards/DeathStack/NavigationAttitudeSystem/NAS.h
+0
-15
0 additions, 15 deletions
src/boards/DeathStack/NavigationAttitudeSystem/NAS.h
src/boards/DeathStack/configs/NASConfig.h
+10
-2
10 additions, 2 deletions
src/boards/DeathStack/configs/NASConfig.h
with
10 additions
and
17 deletions
src/boards/DeathStack/NavigationAttitudeSystem/NAS.h
+
0
−
15
View file @
7f3fc6d1
...
@@ -280,16 +280,6 @@ NASData NAS<IMU, Press, GPS>::sampleImpl()
...
@@ -280,16 +280,6 @@ NASData NAS<IMU, Press, GPS>::sampleImpl()
nas_data
.
vz
,
nas_data
.
vMod
);
nas_data
.
vz
,
nas_data
.
vMod
);
counter
=
0
;
counter
=
0
;
/*Vector4f qua(x(6), x(7), x(8), x(9));
Vector3f e = quat.quat2eul(qua);
LOG_DEBUG(log,
"State vector: \n px: {:.2f} \n py: {:.2f} \n pz: {:.2f} \n vx:
{:.2f} \n " "vy: {:.2f} \n vz: {:.2f} \n roll: {:.2f} \n pitch: {:.2f}
\n yaw: {:.2f} \n " "q1: {:.2f} \n q2: {:.2f} \n q3: {:.2f} \n q4 :
{:.2f} ", x(0), x(1), x(2), x(3), x(4), x(5), e(0), e(1), e(2), x(6),
x(7), x(8), x(9));*/
}
}
else
else
{
{
...
@@ -385,11 +375,6 @@ void NAS<IMU, Press, GPS>::updateNASData()
...
@@ -385,11 +375,6 @@ void NAS<IMU, Press, GPS>::updateNASData()
template
<
typename
IMU
,
typename
Press
,
typename
GPS
>
template
<
typename
IMU
,
typename
Press
,
typename
GPS
>
Vector3f
NAS
<
IMU
,
Press
,
GPS
>::
geodetic2NED
(
const
Vector3f
&
gps_data
)
Vector3f
NAS
<
IMU
,
Press
,
GPS
>::
geodetic2NED
(
const
Vector3f
&
gps_data
)
{
{
const
float
a
=
6378137
;
// [m]
const
float
a2
=
pow
(
a
,
2
);
// [m^2]
const
float
b2
=
pow
(
6356752.3142
,
2
);
// [m^2]
const
float
e2
=
1
-
b2
/
a2
;
float
lat0
=
ref_values
.
ref_latitude
*
DEGREES_TO_RADIANS
;
float
lat0
=
ref_values
.
ref_latitude
*
DEGREES_TO_RADIANS
;
float
lon0
=
ref_values
.
ref_longitude
*
DEGREES_TO_RADIANS
;
float
lon0
=
ref_values
.
ref_longitude
*
DEGREES_TO_RADIANS
;
float
lat
=
gps_data
(
0
)
*
DEGREES_TO_RADIANS
;
float
lat
=
gps_data
(
0
)
*
DEGREES_TO_RADIANS
;
...
...
This diff is collapsed.
Click to expand it.
src/boards/DeathStack/configs/NASConfig.h
+
10
−
2
View file @
7f3fc6d1
...
@@ -73,6 +73,14 @@ static const float P_ATT = 0.01F; // Attitude prediction covariance
...
@@ -73,6 +73,14 @@ static const float P_ATT = 0.01F; // Attitude prediction covariance
static
const
float
P_BIAS
=
0.01
F
;
// Bias prediction covariance
static
const
float
P_BIAS
=
0.01
F
;
// Bias prediction covariance
/*----------------------------------------------------------------------------*/
// Earth constants, semi-axis and eccentricity
static
constexpr
float
a
=
6378137
;
// [m]
static
constexpr
float
a2
=
a
*
a
;
// [m^2]
static
constexpr
float
b
=
6356752.3142
;
// [m]
static
constexpr
float
b2
=
b
*
b
;
// [m^2]
static
constexpr
float
e2
=
1
-
b2
/
a2
;
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
// Equirectangular projection for gps: https://bit.ly/2RaMbD5
// Equirectangular projection for gps: https://bit.ly/2RaMbD5
...
...
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