- Messages
- 3
- Country
Hello all,
Recently signed up here for help with this, I am doing a FS App for an A-Level computing project. I have chosen to base it on flight simulator, and am finally at the point of starting the coding after writing the report.
Essentially, this app, to run just on the FS machine, will monitor airspeed, yaw, bank, pitch, gear and flap deployment upon gauges, present warning messages (whose urgency will be variable) when airspeed or an angle etc exceed the lower safety limit - taken from the aircraft.cfg files or looked up online. And will also issue piloting advice messages to assist in resolving a safety issue - such as excessive airspeed, eventually informing of a crash if a safety factor is over the maximum safety limit or that the aircraft has returned to a safe situation. Additionally, a user will be able to click on a button to display gauges showing these safety factors, the data read from the simulator, over time.
I have attached a few plans to hopefully describe my project better...
Anyway, I've already planned out psuedocode algorithms, and the actual logic of this part of the project I have a good idea about completing with the use of variables from FSX.
Obviously, those aren't completed and will need additions and changes when I've started making it, but hopefully allow you to see my rough ideas.
Having already discussed the early planing stage of this on the flightsim.com forums, what I need help with from you FS developers, before making a start on producing it, is how I actually 'go about making it'. I have been advised to use C++, and having read a fair bit of the SDK HTML document guide, it looks like 'SimConnect' and 'panels and gauges SDK' is what I need?
I was told I could produce an XML gauge, and have read some of these example projects, however it appears it would not be possible to produce it as a separate windows program and must be another window within the simulator itself. is this correct? Ideally, I'd need this to be a windows program that can connect to FSX via SimConnect.
it looks like making an XML gauge would be fairly simple, and I can use a tool to graphically design it before adding C++ code to it? But what other options to producing this project could I take? I don't have massive amounts of time available and really need this to be produced and ready for testing by the new year.
Although you may be struggling to fully understand what I am trying to do, I would really appreciate assurance that this project is feasible and an explanation of how to get started with it all. I have a development environment setup now with FSX and Visual Studio in place, but don't know how to begin, despite reading some guides. This is very daunting to me to start from complete scratch.
Many Thanks for your time.
Recently signed up here for help with this, I am doing a FS App for an A-Level computing project. I have chosen to base it on flight simulator, and am finally at the point of starting the coding after writing the report.
Essentially, this app, to run just on the FS machine, will monitor airspeed, yaw, bank, pitch, gear and flap deployment upon gauges, present warning messages (whose urgency will be variable) when airspeed or an angle etc exceed the lower safety limit - taken from the aircraft.cfg files or looked up online. And will also issue piloting advice messages to assist in resolving a safety issue - such as excessive airspeed, eventually informing of a crash if a safety factor is over the maximum safety limit or that the aircraft has returned to a safe situation. Additionally, a user will be able to click on a button to display gauges showing these safety factors, the data read from the simulator, over time.
I have attached a few plans to hopefully describe my project better...
Anyway, I've already planned out psuedocode algorithms, and the actual logic of this part of the project I have a good idea about completing with the use of variables from FSX.
Code:
This is the main feature and purpose of the program. This process is run as soon as a flight is initiated:
Monitor whether aircraft exceeds safety limits
Warn if limit(s) exceeded
Begin issuing instructions to correct the problem
Continue to warn if issue not resolved, these warnings becoming more urgent as does the problem
When ‘fatal’ limit exceeded, inform of crash
As algorithm:
Flight initiated
(Airspeed(0 - X)/Bank/Pitch/Flaps/Gear)SafetyExceededMessage = ‘written descriptions of outcomes of resulting crashes for each factor being exceeded’
//Have multiple messages (0-X) of different theoretical outcomes for each factor
Whilst (current airspeed or bank angle or pitch angle > lower limit of safety)
Display ‘warning’ message for X seconds
For every X seconds whilst current > lower limit
Repeat ‘warning’ message with iteratively increased message size, colour, urgency of wording etc
If PilotingAssistance = True
Display “Reduce airspeed, bank or pitch angle by (current - lower limit)” every X seconds
Whilst iterate (maximum safety limit – current < X – (X * i))
Message made (i) times larger or urgent etc
If (current < lower limit)
Display ‘safety returned’ message
If (current airspeed or bank angle or pitch angle > maximum limit of safety)
SafetyExceededMessageToDisplay = (Airspeed(RandomInt(0-X))/Bank/Pitch)SafetyExceededMessage
//Whichever of those 3 factors has been exceeded
Display ‘crashed’ message + SafetyExceededMessageToDisplay
//Various messages possible at random adds a degree of further ‘realism’
Pause operation until message dismissed by user
Allow simulation to continue to run and end algorithm
//These 2 lines of code possibly as an ‘End()’ function for use in below if statement
If ((Gear/Flaps)Extended = True and CurrentAirspeed > (Gear/Flap)SafeAirspeedLimit)
SafetyExceededMessageToDisplay = (Gear/Flap(RandomInt(0 – X))SafetyExceeded Message
Display ‘crashed’ message + SafetyExceededMessageToDisplay
Pause operation until message dismissed by user
Allow simulation to continue to run and end algorithm
Each ‘X’ can be any integer - yet to be decided
Code:
Graphing of Data
This is an ‘additional’ feature, and one where the storage of data is involved:
Continuously record data on various factors fed from the simulated aircraft.
Store this data to memory.
When user requests graphs’ display – in or outside of flight - output this data in graphical form.
User can adjust the display of this data slightly – per desired time period.
Adjust the graphs’ appearances accordingly.
Allow the closure of graphs.
As algorithm:
TimePeriodOnXAxisChoice = 1 // Default setting
Every minute in simulation:
LoggedAirspeedAt(X)Minutes = CurrentAirspeed // Read this variable through API / SDK.
LoggedAltitude...
When DisplayGraphs Button Clicked:
If TimePeriodOnXAxisChoiceBoxInput != 1 // Variable stores input in text box on form
TimePeriodOnXAxisChoice = TimePeriodOnXAxisChoiceBoxInput
Display graphs for LoggedAirspeed, LoggedAltitude... // Graphical aspect – display the forms.
YAxisName = ‘Airspeed/Altitude etc’ // Names to be displayed in the form.
XAxisName = ‘Minutes in to flight duration – At (TimePeriodOnXAxisChoice) minute intervals’
For each graph:
i++
// Numerical values to plot on graph
Y = LoggedAirspeed/AltitudeAt((TimePeriodOnXAxisChoice)*i)Minutes
at:
X = TimePeriodOnXAxisChoice * i
If GraphsClose Clicked:
Close graphs window
// Perhaps adjust colours of sections of graph lines as colour coded, if more than one graph plot is within any of the given iterated ranges of increased danger for a safety factor – Call and see part of the previous algorithm.
// Must consider way to avoid displaying too much data – Allow user to input range of time in past to show data for?
Obviously, those aren't completed and will need additions and changes when I've started making it, but hopefully allow you to see my rough ideas.
Having already discussed the early planing stage of this on the flightsim.com forums, what I need help with from you FS developers, before making a start on producing it, is how I actually 'go about making it'. I have been advised to use C++, and having read a fair bit of the SDK HTML document guide, it looks like 'SimConnect' and 'panels and gauges SDK' is what I need?
I was told I could produce an XML gauge, and have read some of these example projects, however it appears it would not be possible to produce it as a separate windows program and must be another window within the simulator itself. is this correct? Ideally, I'd need this to be a windows program that can connect to FSX via SimConnect.
it looks like making an XML gauge would be fairly simple, and I can use a tool to graphically design it before adding C++ code to it? But what other options to producing this project could I take? I don't have massive amounts of time available and really need this to be produced and ready for testing by the new year.
Although you may be struggling to fully understand what I am trying to do, I would really appreciate assurance that this project is feasible and an explanation of how to get started with it all. I have a development environment setup now with FSX and Visual Studio in place, but don't know how to begin, despite reading some guides. This is very daunting to me to start from complete scratch.
Many Thanks for your time.