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
a2ba0da5
Commit
a2ba0da5
authored
14 years ago
by
James Goppert
Browse files
Options
Downloads
Patches
Plain Diff
Added RPM for each motor.
parent
e3eed2cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/FGComm.cpp
+6
-2
6 additions, 2 deletions
src/FGComm.cpp
src/Trim.cpp
+5
-1
5 additions, 1 deletion
src/Trim.cpp
src/math/FGStateSpace.h
+45
-6
45 additions, 6 deletions
src/math/FGStateSpace.h
with
56 additions
and
9 deletions
src/FGComm.cpp
+
6
−
2
View file @
a2ba0da5
...
@@ -42,10 +42,14 @@ int main (int argc, char const* argv[])
...
@@ -42,10 +42,14 @@ int main (int argc, char const* argv[])
ss
.
x
.
add
(
new
FGStateSpace
::
Theta
);
ss
.
x
.
add
(
new
FGStateSpace
::
Theta
);
ss
.
x
.
add
(
new
FGStateSpace
::
Q
);
ss
.
x
.
add
(
new
FGStateSpace
::
Q
);
if
(
thruster0
->
GetType
()
==
FGThruster
::
ttPropeller
)
if
(
thruster0
->
GetType
()
==
FGThruster
::
ttPropeller
)
{
{
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm
);
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm
0
);
if
(
variablePropPitch
)
ss
.
x
.
add
(
new
FGStateSpace
::
PropPitch
);
if
(
variablePropPitch
)
ss
.
x
.
add
(
new
FGStateSpace
::
PropPitch
);
int
numEngines
=
fdm
.
GetPropulsion
()
->
GetNumEngines
();
if
(
numEngines
>
1
)
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm1
);
if
(
numEngines
>
2
)
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm2
);
if
(
numEngines
>
3
)
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm3
);
}
}
ss
.
x
.
add
(
new
FGStateSpace
::
Beta
);
ss
.
x
.
add
(
new
FGStateSpace
::
Beta
);
ss
.
x
.
add
(
new
FGStateSpace
::
Phi
);
ss
.
x
.
add
(
new
FGStateSpace
::
Phi
);
...
...
This diff is collapsed.
Click to expand it.
src/Trim.cpp
+
5
−
1
View file @
a2ba0da5
...
@@ -237,8 +237,12 @@ int main (int argc, char const* argv[])
...
@@ -237,8 +237,12 @@ int main (int argc, char const* argv[])
if
(
thruster0
->
GetType
()
==
FGThruster
::
ttPropeller
)
if
(
thruster0
->
GetType
()
==
FGThruster
::
ttPropeller
)
{
{
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm
);
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm
0
);
if
(
variablePropPitch
)
ss
.
x
.
add
(
new
FGStateSpace
::
PropPitch
);
if
(
variablePropPitch
)
ss
.
x
.
add
(
new
FGStateSpace
::
PropPitch
);
int
numEngines
=
fdm
.
GetPropulsion
()
->
GetNumEngines
();
if
(
numEngines
>
1
)
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm1
);
if
(
numEngines
>
2
)
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm2
);
if
(
numEngines
>
3
)
ss
.
x
.
add
(
new
FGStateSpace
::
Rpm3
);
}
}
ss
.
x
.
add
(
new
FGStateSpace
::
Beta
);
ss
.
x
.
add
(
new
FGStateSpace
::
Beta
);
ss
.
x
.
add
(
new
FGStateSpace
::
Phi
);
ss
.
x
.
add
(
new
FGStateSpace
::
Phi
);
...
...
This diff is collapsed.
Click to expand it.
src/math/FGStateSpace.h
+
45
−
6
View file @
a2ba0da5
...
@@ -595,20 +595,59 @@ public:
...
@@ -595,20 +595,59 @@ public:
}
}
};
};
class
Rpm
:
public
Component
class
Rpm
0
:
public
Component
{
{
public:
public:
Rpm
()
:
Component
(
"Rpm"
,
"rev/min"
)
{};
Rpm
0
()
:
Component
(
"Rpm
0
"
,
"rev/min"
)
{};
double
get
()
const
double
get
()
const
{
{
return
m_fdm
->
GetPropulsion
()
->
GetEngine
(
0
)
->
GetThruster
()
->
GetRPM
();
return
m_fdm
->
GetPropulsion
()
->
GetEngine
(
0
)
->
GetThruster
()
->
GetRPM
();
}
}
void
set
(
double
val
)
void
set
(
double
val
)
{
{
for
(
int
i
=
0
;
i
<
m_fdm
->
GetPropulsion
()
->
GetNumEngines
();
i
++
)
m_fdm
->
GetPropulsion
()
->
GetEngine
(
0
)
->
GetThruster
()
->
SetRPM
(
val
);
{
}
m_fdm
->
GetPropulsion
()
->
GetEngine
(
i
)
->
GetThruster
()
->
SetRPM
(
val
);
};
}
class
Rpm1
:
public
Component
{
public:
Rpm1
()
:
Component
(
"Rpm1"
,
"rev/min"
)
{};
double
get
()
const
{
return
m_fdm
->
GetPropulsion
()
->
GetEngine
(
1
)
->
GetThruster
()
->
GetRPM
();
}
void
set
(
double
val
)
{
m_fdm
->
GetPropulsion
()
->
GetEngine
(
1
)
->
GetThruster
()
->
SetRPM
(
val
);
}
};
class
Rpm2
:
public
Component
{
public:
Rpm2
()
:
Component
(
"Rpmr2"
,
"rev/min"
)
{};
double
get
()
const
{
return
m_fdm
->
GetPropulsion
()
->
GetEngine
(
2
)
->
GetThruster
()
->
GetRPM
();
}
void
set
(
double
val
)
{
m_fdm
->
GetPropulsion
()
->
GetEngine
(
2
)
->
GetThruster
()
->
SetRPM
(
val
);
}
};
class
Rpm3
:
public
Component
{
public:
Rpm3
()
:
Component
(
"Rpm3"
,
"rev/min"
)
{};
double
get
()
const
{
return
m_fdm
->
GetPropulsion
()
->
GetEngine
(
3
)
->
GetThruster
()
->
GetRPM
();
}
void
set
(
double
val
)
{
m_fdm
->
GetPropulsion
()
->
GetEngine
(
3
)
->
GetThruster
()
->
SetRPM
(
val
);
}
}
};
};
...
...
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