Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jsbsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SASC
jsbsim
Commits
26f4b20a
Commit
26f4b20a
authored
14 years ago
by
Brandon Wampler
Browse files
Options
Downloads
Patches
Plain Diff
added components to FGStateSpace.h
parent
0822c1a4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.in
+2
-2
2 additions, 2 deletions
configure.in
src/math/FGStateSpace.h
+150
-2
150 additions, 2 deletions
src/math/FGStateSpace.h
with
152 additions
and
4 deletions
configure.in
+
2
−
2
View file @
26f4b20a
dnl Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
AC_INIT(JSBSim.cpp, 1.0.rc3-advtrim-
5
, jon@jsbsim.org)
AC_INIT(JSBSim.cpp, 1.0.rc3-advtrim-
6
, jon@jsbsim.org)
dnl set the $host variable based on local machine/os
dnl set the $host variable based on local machine/os
AC_CANONICAL_TARGET
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(jsbsim, 1.0.rc3-advtrim-
5
)
AM_INIT_AUTOMAKE(jsbsim, 1.0.rc3-advtrim-
6
)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_MACRO_DIR([m4])
# Before making a release, the LT_VERSION string should be modified.
# Before making a release, the LT_VERSION string should be modified.
...
...
This diff is collapsed.
Click to expand it.
src/math/FGStateSpace.h
+
150
−
2
View file @
26f4b20a
...
@@ -641,7 +641,7 @@ public:
...
@@ -641,7 +641,7 @@ public:
}
}
double
getDeriv
()
const
double
getDeriv
()
const
{
{
return
m_fdm
->
GetPropagate
()
->
GetVel
(
2
)
/
m_fdm
->
GetPropagate
()
->
GetRadius
();
return
m_fdm
->
GetPropagate
()
->
GetVel
(
2
)
/
(
cos
(
m_fdm
->
GetPropagate
()
->
GetLatitude
())
*
m_fdm
->
GetPropagate
()
->
GetRadius
()
)
;
}
}
};
};
...
@@ -659,9 +659,157 @@ public:
...
@@ -659,9 +659,157 @@ public:
}
}
double
getDeriv
()
const
double
getDeriv
()
const
{
{
return
m_fdm
->
GetPropagate
()
->
GetVel
(
1
)
/
m_fdm
->
GetPropagate
()
->
GetRadius
();
return
m_fdm
->
GetPropagate
()
->
GetVel
(
1
)
/
(
m_fdm
->
GetPropagate
()
->
GetRadius
()
)
;
}
}
};
};
class
Pi
:
public
Component
{
public:
Pi
()
:
Component
(
"P inertial"
,
"rad/s"
)
{};
double
get
()
const
{
return
m_fdm
->
GetPropagate
()
->
GetPQRi
(
1
);
}
void
set
(
double
val
)
{
//Set PQR from PQRi
//VState.vPQR = VState.vPQRi - Ti2b * vOmegaEarth;
m_fdm
->
GetIC
()
->
SetQRadpsIC
(
val
+
\
(
m_fdm
->
GetPropagate
()
->
GetPQR
(
1
)
-
m_fdm
->
GetPropagate
()
->
GetPQRi
(
1
)));
}
double
getDeriv
()
const
{
return
m_fdm
->
GetPropagate
()
->
GetPQRdot
(
1
);
}
};
class
Qi
:
public
Component
{
public:
Qi
()
:
Component
(
"Q inertial"
,
"rad/s"
)
{};
double
get
()
const
{
return
m_fdm
->
GetPropagate
()
->
GetPQRi
(
2
);
}
void
set
(
double
val
)
{
//Set PQR from PQRi
//VState.vPQR = VState.vPQRi - Ti2b * vOmegaEarth;
m_fdm
->
GetIC
()
->
SetQRadpsIC
(
val
+
\
(
m_fdm
->
GetPropagate
()
->
GetPQR
(
2
)
-
m_fdm
->
GetPropagate
()
->
GetPQRi
(
2
)));
}
double
getDeriv
()
const
{
return
m_fdm
->
GetPropagate
()
->
GetPQRdot
(
2
);
}
};
class
Ri
:
public
Component
{
public:
Ri
()
:
Component
(
"R inertial"
,
"rad/s"
)
{};
double
get
()
const
{
return
m_fdm
->
GetPropagate
()
->
GetPQRi
(
3
);
}
void
set
(
double
val
)
{
//Set PQR from PQRi
//VState.vPQR = VState.vPQRi - Ti2b * vOmegaEarth;
m_fdm
->
GetIC
()
->
SetQRadpsIC
(
val
+
\
(
m_fdm
->
GetPropagate
()
->
GetPQR
(
3
)
-
m_fdm
->
GetPropagate
()
->
GetPQRi
(
3
)));
}
double
getDeriv
()
const
{
return
m_fdm
->
GetPropagate
()
->
GetPQRdot
(
3
);
}
};
class
Vn
:
public
Component
{
public:
Vn
()
:
Component
(
"Vel north"
,
"feet/s"
)
{};
double
get
()
const
{
return
m_fdm
->
GetPropagate
()
->
GetVel
(
1
);
}
void
set
(
double
val
)
{
m_fdm
->
GetIC
()
->
SetVNorthFpsIC
(
val
);
}
double
getDeriv
()
const
{
//get NED accel from body accel
return
(
m_fdm
->
GetPropagate
()
->
GetTb2l
()
*
m_fdm
->
GetPropagate
()
->
GetUVWdot
())(
1
);
}
};
class
Ve
:
public
Component
{
public:
Ve
()
:
Component
(
"Vel east"
,
"feet/s"
)
{};
double
get
()
const
{
return
m_fdm
->
GetPropagate
()
->
GetVel
(
2
);
}
void
set
(
double
val
)
{
m_fdm
->
GetIC
()
->
SetVEastFpsIC
(
val
);
}
double
getDeriv
()
const
{
//get NED accel from body accel
return
(
m_fdm
->
GetPropagate
()
->
GetTb2l
()
*
m_fdm
->
GetPropagate
()
->
GetUVWdot
())(
2
);
}
};
class
Vd
:
public
Component
{
public:
Vd
()
:
Component
(
"Vel down"
,
"feet/s"
)
{};
double
get
()
const
{
return
m_fdm
->
GetPropagate
()
->
GetVel
(
3
);
}
void
set
(
double
val
)
{
m_fdm
->
GetIC
()
->
SetVDownFpsIC
(
val
);
}
double
getDeriv
()
const
{
//get NED accel from body accel
return
(
m_fdm
->
GetPropagate
()
->
GetTb2l
()
*
m_fdm
->
GetPropagate
()
->
GetUVWdot
())(
3
);
}
};
class
COG
:
public
Component
{
public:
COG
()
:
Component
(
"Course Over Ground"
,
"rad"
)
{};
double
get
()
const
{
//cog = atan2(Ve,Vn)
return
atan2
(
m_fdm
->
GetPropagate
()
->
GetVel
(
2
),
m_fdm
->
GetPropagate
()
->
GetVel
(
1
));
}
void
set
(
double
val
)
{
//set Vn and Ve according to vGround and COG
m_fdm
->
GetIC
()
->
SetVNorthFpsIC
(
m_fdm
->
GetAuxiliary
()
->
GetVground
()
*
cos
(
val
));
m_fdm
->
GetIC
()
->
SetVEastFpsIC
(
m_fdm
->
GetAuxiliary
()
->
GetVground
()
*
sin
(
val
));
}
double
getDeriv
()
const
{
double
Vn
=
m_fdm
->
GetPropagate
()
->
GetVel
(
1
);
double
Vndot
=
(
m_fdm
->
GetPropagate
()
->
GetTb2l
()
*
m_fdm
->
GetPropagate
()
->
GetUVWdot
())(
1
);
double
Ve
=
m_fdm
->
GetPropagate
()
->
GetVel
(
2
);
double
Vedot
=
(
m_fdm
->
GetPropagate
()
->
GetTb2l
()
*
m_fdm
->
GetPropagate
()
->
GetUVWdot
())(
2
);
//dCOG/dt = dCOG/dVe*dVe/dt + dCOG/dVn*dVn/dt
return
Vn
/
(
Vn
*
Vn
+
Ve
*
Ve
)
*
Vedot
-
Ve
/
(
Vn
*
Vn
+
Ve
*
Ve
)
*
Vndot
;
}
};
};
};
// stream output
// stream output
...
...
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