-
Notifications
You must be signed in to change notification settings - Fork 592
Added support for diesel engine #1432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
m-tra
wants to merge
1
commit into
JSBSim-Team:master
Choose a base branch
from
m-tra:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |||||
| #include "models/FGMassBalance.h" | ||||||
| #include "models/propulsion/FGThruster.h" | ||||||
| #include "models/propulsion/FGPiston.h" | ||||||
| #include "models/propulsion/FGPistonDiesel.h" | ||||||
| #include "models/propulsion/FGTurbine.h" | ||||||
| #include "models/propulsion/FGTurboProp.h" | ||||||
| #include "models/propulsion/FGTank.h" | ||||||
|
|
@@ -356,7 +357,7 @@ void UJSBSimMovementComponent::TickComponent(float DeltaTime, ELevelTick TickTyp | |||||
| FTransform ENUTransform = GeoReferencingSystem->GetTangentTransformAtECEFLocation(AircraftState.ECEFLocation); | ||||||
| FRotator LocalUERotation(AircraftState.LocalEulerAngles); | ||||||
| LocalUERotation.Yaw -= 90.0; // JSBSim heading is aero heading (0 at north). We have to remove 90 because in UE, 0 is pointing east. | ||||||
| if (GeoReferencingSystem->PlanetShape == EPlanetShape::FlatPlanet) //Fix for Flat Planet bug | ||||||
| if (GeoReferencingSystem->PlanetShape == EPlanetShape::FlatPlanet) //Fix for Flat Planet bug | ||||||
| { | ||||||
| LocalUERotation.Yaw -= 180.0; | ||||||
| ECEFForwardHorizontal.Y *= -1.0; | ||||||
|
|
@@ -1080,6 +1081,15 @@ void UJSBSimMovementComponent::GetEnginesStates() | |||||
| EngineStates[i].Magnetos = (EMagnetosMode)PistonEngine->GetMagnetos(); | ||||||
| break; | ||||||
| } | ||||||
| case JSBSim::FGEngine::etPistonDiesel: | ||||||
| { | ||||||
| std::shared_ptr<JSBSim::FGPistonDiesel> DieselEngine = | ||||||
| std::static_pointer_cast<JSBSim::FGPistonDiesel>(Engine); | ||||||
| EngineStates[i].FuelRack = DieselEngine->getFuelRack(); | ||||||
| EngineStates[i].CoolantTemp = DieselEngine->getCoolantTemp_degF(); | ||||||
|
||||||
| EngineStates[i].CoolantTemp = DieselEngine->getCoolantTemp_degF(); | |
| EngineStates[i].CoolantTemp = DieselEngine->getCoolantTemperature_degF(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0"?> | ||
| <electric_engine name="GazAile_Elec_Engine"> | ||
| <power unit="WATTS"> 41000 </power> <!-- 41000 Watts Equivalent to ~55hp --> | ||
| </electric_engine> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <?xml version="1.0"?> | ||
| <!-- | ||
| File: GazAile_Engine.xml | ||
| Author: Aero-Matic v 0.83 | ||
|
|
||
| Inputs: | ||
| name: GazAile_Engine | ||
| type: piston | ||
| power: 55 hp | ||
| augmented? no | ||
| injected? no | ||
| --> | ||
|
|
||
| <diesel_engine name="GazAile_Engine"> | ||
| <!-- PSA TUD3 — 1,360 cc IDI naturally aspirated diesel | ||
| 75 mm bore × 77 mm stroke, 4-cylinder, compression ratio 22.5:1 | ||
| 53 PS (52 hp / 39 kW) @ 5,000 RPM, 84 N·m @ 2,500 RPM | ||
| Indirect injection with Lucas/Bosch rotary distributor pump --> | ||
|
|
||
| <displacement unit="IN3"> 83.0 </displacement> | ||
| <maxhp> 52 </maxhp> | ||
| <maxrpm> 5500 </maxrpm> | ||
| <rated-rpm> 5000 </rated-rpm> | ||
| <peak-torque-rpm> 2500 </peak-torque-rpm> | ||
| <idlerpm> 1700 </idlerpm> | ||
| <cycles> 4 </cycles> | ||
| <bore unit="IN"> 2.953 </bore> | ||
| <stroke unit="IN"> 3.0315 </stroke> | ||
| <cylinders> 4 </cylinders> | ||
| <compression-ratio> 22 </compression-ratio> | ||
| <static-friction unit="HP"> 1.0 </static-friction> | ||
| <starter-torque> 30.0 </starter-torque> | ||
| <starter-rpm> 2000 </starter-rpm> | ||
| <injection-type> IDI </injection-type> | ||
| <static-fmep unit="PA"> 20000 </static-fmep> | ||
| <dynamic-fmep unit="PA"> 9000 </dynamic-fmep> | ||
| </diesel_engine> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| <?xml version="1.0"?> | ||
| <!-- Generated by Aero-Matic v 1.1 | ||
|
|
||
| Inputs: | ||
| horsepower: 55 | ||
| pitch: fixed | ||
| max engine rpm: 5000 | ||
| prop diameter (ft): 5.08555 | ||
|
|
||
| Outputs: | ||
| max prop rpm: 2660 | ||
| gear ratio: 1.88 | ||
| Cp0: # 0.043 # 0.046 | ||
| Ct0: # 0.060 | ||
| static thrust (lbs): # 92 kg | ||
| --> | ||
|
|
||
| <propeller version="1.01" name="prop"> | ||
| <ixx> 1.20 </ixx> | ||
| <diameter unit="IN"> 61.0 </diameter> | ||
| <numblades> 2 </numblades> | ||
| <gearratio> 1.88 </gearratio> <!--gearratio> 1.36 </gearratio--> | ||
| <cp_factor> 1.00 </cp_factor> | ||
| <ct_factor> 1.30 </ct_factor> | ||
|
|
||
| <table name="C_THRUST" type="internal"> | ||
| <tableData> | ||
| 0.0 0.0991 | ||
| 0.1 0.0946 | ||
| 0.2 0.0890 | ||
| 0.3 0.0824 | ||
| 0.4 0.0748 | ||
| 0.5 0.0662 | ||
| 0.6 0.0565 | ||
| 0.7 0.0457 | ||
| 0.8 0.0340 | ||
| 0.9 0.0212 | ||
| 1.0 0.0073 | ||
| 1.1 -0.0071 | ||
| 1.2 -0.0212 | ||
| </tableData> | ||
| </table> | ||
|
|
||
| <table name="C_POWER" type="internal"> | ||
| <tableData> | ||
| 0.0 0.0419 | ||
| 0.1 0.0485 | ||
| 0.2 0.0528 | ||
| 0.3 0.0550 | ||
| 0.4 0.0550 | ||
| 0.5 0.0528 | ||
| 0.6 0.0485 | ||
| 0.7 0.0419 | ||
| 0.8 0.0332 | ||
| 0.9 0.0222 | ||
| 1.0 0.0091 | ||
| 1.1 0.0011 | ||
| 1.2 -0.0069 | ||
| </tableData> | ||
| </table> | ||
|
|
||
| <!-- thrust effects of helical tip Mach --> | ||
| <table name="CT_MACH" type="internal"> | ||
| <tableData> | ||
| 0.85 1.0 | ||
| 1.05 0.8 | ||
| </tableData> | ||
| </table> | ||
|
|
||
| <!-- power-required effects of helical tip Mach --> | ||
| <table name="CP_MACH" type="internal"> | ||
| <tableData> | ||
| 0.85 1.0 | ||
| 1.05 1.8 | ||
| 2.00 1.4 | ||
| </tableData> | ||
| </table> | ||
|
|
||
| </propeller> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
.vcxproj.filterschange breaks the XML structure: the newFGPistonDiesel.cpp<ClCompile>entry is nested inside the existingFGPiston.cpp<ClCompile>element (missing a closing tag before the insertion). Visual Studio will fail to load the filters file. Close theFGPiston.cpp<ClCompile>element before adding the new sibling element.