Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #990 from Working-Title-MSFS-Mods/cj4-prerelease-0…
Browse files Browse the repository at this point in the history
….11.1

CJ4 Prerelease 0.11.1
  • Loading branch information
dga711 authored Mar 10, 2021
2 parents f6b2b42 + 80ea6fb commit da9c7de
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<AssetPackage Name="workingtitle-aircraft-cj4" Version="0.11.0">
<AssetPackage Name="workingtitle-aircraft-cj4" Version="0.11.1">
<ItemSettings>
<ContentType>CUSTOM</ContentType>
<Title>CJ4</Title>
Expand Down
2 changes: 1 addition & 1 deletion PackageDefinitions/workingtitle-aircraft-cj4.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<AssetPackage Name="workingtitle-aircraft-cj4" Version="0.11.0">
<AssetPackage Name="workingtitle-aircraft-cj4" Version="0.11.1">
<ItemSettings>
<ContentType>CUSTOM</ContentType>
<Title>CJ4</Title>
Expand Down
32 changes: 5 additions & 27 deletions docs/workingtitle-cj4/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Working Title CJ4 v0.11.0
# Working Title CJ4 v0.11.1

Welcome to the Working Title CJ4 v0.11.0. In this update we introduce Charts, the VNAV Window on the MFD, enhanced datalink along with a number of bug fixes and full Sim Update 3 compatability.
Welcome to the Working Title CJ4 v0.11.1. This is a hotfix to address a few high-priority bugs with v0.11.0.

## Installation
Installation is easy, simply copy the `workingtitle-aircraft-cj4` folder inside the zip file to your MSFS Community folder.
Expand All @@ -12,31 +12,9 @@ Charts in the CJ4 are powered by Navigraph - special thanks to the team at Navig

# Changes

## PFD
- PFD Baro preset function added. (After STD is pressed on Baro knob,, a preset value can be selected and swapped with STD press again once passed transition altitude)

## MFD
- Added support for Navigraph Charts (can be selected with CHARTS button on lower control panel).
- Added VNAV window to FMS text (can be displayed by selecting VNAV WINDOW in the FMC DSPL MENU).
- Added Advisory Descent (DES instead of TOD) when no arrival or approach is loaded; this will provide an advisory (uncoupled) "DES" point to start descent to reach 1500' AFE 10nm from airport.

## FMC
- Added TUNE page functionality - ATC Control page, dispatch function, format changes,
- Added VNAV WINDOW option to DSPL MENU.
- Datalink: Added ATIS support for IVAO.
- Datalink: Changed default METAR source to VATSIM.
- Datalink: Added support for facilities with separate departure and arrival ATIS.

## VNAV
- Fixed bug where in certain circumstances below constraints were not observed in the first segment of the vertical flight plan.
- Adjusted glideslope capture to be more sensitive and only capture with less than half scale deflection.
- Adjusted visibility of below constraints on departure to allow them to appear on the PFD and in the VNAV MFD window at a greater distance from present position.

## FLIGHT MODEL
- Flight model adjusted and enhanced based on sim update 3 aerodynamic changes.

## MODEL
- Added support for livery painters that adjust the panel.cfg file; see the REPAINT_README.MD file included in the CJ4 Docs Folder ([REPAINT_README.md](https://github.com/Working-Title-MSFS-Mods/fspackages/blob/main/docs/workingtitle-cj4/REPAINT_README.md)).
- Fixed problem with FP SYNC option.
- Addressed problems displaying VNAV TOD in certain cirsumstances.
- Removed INOP tooltip from chart joystick.

## ⚠️ Known Issues
* PTCH mode will not level off at an altitude and it can have some quirky behaviors. This is currently a sim AP issue.
Expand Down
2 changes: 1 addition & 1 deletion docs/workingtitle-cj4/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Working Title CJ4

## UPDATES
Latest Version: [v0.11.0](https://github.com/Working-Title-MSFS-Mods/fspackages/releases/tag/cj4-v0.10.2)
Latest Version: [v0.11.1](https://github.com/Working-Title-MSFS-Mods/fspackages/releases/tag/cj4-v0.11.1)

User Guide: https://docs.google.com/document/d/1qzxPMTSQRkvau8QOi7xUqNvjx9rbww_qHlso5AT5OnI/

Expand Down
49 changes: 49 additions & 0 deletions docs/workingtitle-cj4/Working Title CJ4 v0.11.0 Changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Working Title CJ4 v0.11.0

Welcome to the Working Title CJ4 v0.11.0. In this update we introduce Charts, the VNAV Window on the MFD, enhanced datalink along with a number of bug fixes and full Sim Update 3 compatability.

## Installation
Installation is easy, simply copy the `workingtitle-aircraft-cj4` folder inside the zip file to your MSFS Community folder.

**Important: We recommend that you fully delete the previous `workingtitle-aircraft-cj4` folder before copying this release.**

## Charts Integration
Charts in the CJ4 are powered by Navigraph - special thanks to the team at Navigraph for their support with API integration. In order to use the charts in the CJ4, you need to have a subscription that includes charts - https://navigraph.com/products/subscriptions. If you have a subscription, all you need to do is select the NAVIGRAPH line in MOD SETTINGS in the FMC and that will launch your web browser and ask you to log in to your Navigraph account - from there an access token will be issued. These tokens do time out from time-to-time, so if you're prompted by the aircraft, or if you ever encouter difficulties loading charts, please go back to this option and resync your account. Details on using the Charts capabilities are in the user guide.

# Changes

## PFD
- PFD Baro preset function added. (After STD is pressed on Baro knob,, a preset value can be selected and swapped with STD press again once passed transition altitude)

## MFD
- Added support for Navigraph Charts (can be selected with CHARTS button on lower control panel).
- Added VNAV window to FMS text (can be displayed by selecting VNAV WINDOW in the FMC DSPL MENU).
- Added Advisory Descent (DES instead of TOD) when no arrival or approach is loaded; this will provide an advisory (uncoupled) "DES" point to start descent to reach 1500' AFE 10nm from airport.

## FMC
- Added TUNE page functionality - ATC Control page, dispatch function, format changes,
- Added VNAV WINDOW option to DSPL MENU.
- Datalink: Added ATIS support for IVAO.
- Datalink: Changed default METAR source to VATSIM.
- Datalink: Added support for facilities with separate departure and arrival ATIS.

## VNAV
- Fixed bug where in certain circumstances below constraints were not observed in the first segment of the vertical flight plan.
- Adjusted glideslope capture to be more sensitive and only capture with less than half scale deflection.
- Adjusted visibility of below constraints on departure to allow them to appear on the PFD and in the VNAV MFD window at a greater distance from present position.

## FLIGHT MODEL
- Flight model adjusted and enhanced based on sim update 3 aerodynamic changes.

## MODEL
- Added support for livery painters that adjust the panel.cfg file; see the REPAINT_README.MD file included in the CJ4 Docs Folder ([REPAINT_README.md](https://github.com/Working-Title-MSFS-Mods/fspackages/blob/main/docs/workingtitle-cj4/REPAINT_README.md)).

## ⚠️ Known Issues
* PTCH mode will not level off at an altitude and it can have some quirky behaviors. This is currently a sim AP issue.
* Some external applications that use the GPS/Flight plan SimVars may not function correctly or as expected when FP Sync is off.
* Loading and saving flights can have bad results.
* Custom liveries can render FADEC inoperative if they ship with a panel.cfg. Painters should reference the new [REPAINT_README.md](https://github.com/Working-Title-MSFS-Mods/fspackages/blob/main/docs/workingtitle-cj4/REPAINT_README.md) file included in the docs folder of the Github repository.
* Autopilot modes cannot be triggered via keybindings or controllers and must currently be triggered in the cockpit with the mouse. External binding applications are adding support for LVars and HEvents. Used SimVars are documented [here](https://github.com/Working-Title-MSFS-Mods/fspackages/wiki/Sim-Variables)
* Sometimes a heading to altitude instruction on takeoff will display further than the first RNAV fix on an RNAV departure procedure; in these cases the workaround is to cross-check the DP chart and remove the erroneous waypoint either by deleting the heading to altitude fix or dropping the first RNAV fix onto the magenta line in the LEGS page.
* Due to sim autopilot bank rate limitations, the aircraft may overshoot on certain RNP approaches with tight turns. If you encounter this, we recommend handflying the approach with the given lateral and vertical guidance.
* The Standby Attitude Indicator switch is reversed in the model, so down (off) turns the SAI on and vice-versa; this will be addressed in a future update.
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,6 @@
<WWISE_JOYSTICK_EVENT_R>as3000_joystick</WWISE_JOYSTICK_EVENT_R >
<WWISE_JOYSTICK_EVENT_UP>as3000_joystick</WWISE_JOYSTICK_EVENT_UP>
<WWISE_JOYSTICK_EVENT_DN>as3000_joystick</WWISE_JOYSTICK_EVENT_DN>
<TOOLTIPID>TT:COCKPIT.TOOLTIPS.INOP TT:COCKPIT.TOOLTIPS.AS1000_KNOB_RANGE_PAN</TOOLTIPID>
</UseTemplate>
</Component>
</Condition>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ class CJ4_FMC_InitRefIndexPage {
["Working-Title-MSFS-Mods[white s-text]"],
[""],
[" VERSION[blue]"],
["0.11.0[s-text white]"],
["0.11.1[s-text white]"],
[""],
[""],
[""],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,10 @@ class WT_BaseVnav {
firstPossibleDescentIndex = (isClimb && vwp.hasConstraint && i < lastApproachWaypointIndex) ? i : firstPossibleDescentIndex;
}
console.log("lastClimbIndex " + lastClimbIndex);
const segmentBuildStartIndex = Math.max(this.flightplan.activeWaypointIndex - 1, lastClimbIndex);
const segmentBuildStartIndex = Math.max(this.flightplan.activeWaypointIndex - 1, lastClimbIndex);
this._verticalFlightPlanSegments = [];
let segment = 0;
let nextSegmentEndIndex = undefined;
const nextSegmentEndIndex = undefined;
let verticalDirectSegmentCreated = false;
for (let j = lastApproachWaypointIndex; j > segmentBuildStartIndex; j--) { //Build Path Segments
console.log("j: " + j + " ident: " + this._verticalFlightPlan[j].ident + " segment: " + this._verticalFlightPlan[j].segment + " FPTA: " + this._verticalFlightPlan[j].waypointFPTA);
Expand Down Expand Up @@ -428,7 +428,7 @@ class WT_BaseVnav {
maxAltitude = 0;
}
}
let upperAltitude = maxAltitude > 0 ? Math.min(maxAltitude, wptToEvaluate.upperConstraintAltitude) : wptToEvaluate.upperConstraintAltitude;
const upperAltitude = maxAltitude > 0 ? Math.min(maxAltitude, wptToEvaluate.upperConstraintAltitude) : wptToEvaluate.upperConstraintAltitude;
const altToUpperConstraint = upperAltitude - vwp.waypointFPTA;
const altToLowerConstraint = wptToEvaluate.lowerConstraintAltitude - vwp.waypointFPTA;
console.log("segment wpt " + wptToEvaluate.ident + " upperAltitude " + upperAltitude + " wptToEvaluate.lowerConstraintAltitude " + wptToEvaluate.lowerConstraintAltitude);
Expand Down Expand Up @@ -487,7 +487,7 @@ class WT_BaseVnav {
console.log("segmentMaxFPA updated to " + segmentMaxFPA + "; segmentMinFPA updated to " + segmentMinFPA);
console.log(wptToEvaluate.ident + " added to segment " + segment);
}

}
}
const segmentStartIndex = isFlatSegment ? flatPathStartIndex : Math.min(segmentBreakIndex + 1, endingIndex);
Expand Down Expand Up @@ -753,10 +753,12 @@ class WT_BaseVnav {
else if (this.flightplan.activeWaypointIndex > this._lastClimbIndex) {
altitude = this.indicatedAltitude;
if (currentSegment >= 0) {
fpta = this._verticalFlightPlan[this._verticalFlightPlanSegments[currentSegment].targetIndex].waypointFPTA;
fpa = this._verticalFlightPlanSegments[currentSegment].fpa;
const fptaSegment = this._verticalFlightPlan[this._verticalFlightPlan.findIndex(x => (x.waypointFPTA !== undefined && !x.isClimb && x.waypointFPTA < altitude))].segment;

fpta = this._verticalFlightPlan[this._verticalFlightPlanSegments[fptaSegment].targetIndex].waypointFPTA;
fpa = this._verticalFlightPlanSegments[fptaSegment].fpa;
const descentDistance = AutopilotMath.calculateDescentDistance(fpa, altitude - fpta);
todDistanceInFP = this.allWaypoints[this._verticalFlightPlanSegments[this._firstPathSegment].targetIndex].cumulativeDistanceInFP - descentDistance;
todDistanceInFP = this.allWaypoints[this._verticalFlightPlanSegments[fptaSegment].targetIndex].cumulativeDistanceInFP - descentDistance;
todExists = true;
} else {
todExists = false;
Expand All @@ -780,7 +782,7 @@ class WT_BaseVnav {
SimVar.SetSimVarValue("L:WT_CJ4_TOD_DISTANCE", "number", horizontalDescentDistance);
SimVar.SetSimVarValue("L:WT_CJ4_TOD_REMAINING", "number", distanceToTod);
SimVar.SetSimVarValue("L:WT_CJ4_ADV_DES_ACTIVE", "number", 1);
}
}
} else {
SimVar.SetSimVarValue("L:WT_CJ4_ADV_DES_ACTIVE", "number", 0);
}
Expand Down
4 changes: 2 additions & 2 deletions src/wtsdk/src/flightplanning/FlightPlanAsoboSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ export class FlightPlanAsoboSync {

if (plan.hasOrigin && plan.hasDestination) {
if (plan.hasOrigin) {
await Coherent.call("SET_ORIGIN", plan.originAirfield.icao);
await Coherent.call("SET_ORIGIN", plan.originAirfield.icao, false);
}

if (plan.hasDestination) {
await Coherent.call("SET_DESTINATION", plan.destinationAirfield.icao);
await Coherent.call("SET_DESTINATION", plan.destinationAirfield.icao, false);
}

let coIndex = 1;
Expand Down

0 comments on commit da9c7de

Please sign in to comment.