Welcome Guest.   Make a donation to an author on the site September 30, 2014, 11:05:44 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
View the new Member Awards and Badges page.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Aviation Business Project using a Flight Simulator  (Read 4126 times)
CodeTRUCKER
Supporting Member
**
Posts: 1,028



Bush Flying... where I'd rather be.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« on: July 21, 2011, 06:33:22 PM »

Hello DCers,

I would like to create a virtual aviation business environment using a flight simulator, like Flightgear, X-Plane, FSX, FS9, etc. Most likely it will be the FS9/FSX route.

For the purpose of this discussion, Ill use the following abbreviations...

-- N009BH = The callsign of a specific aircraft.
-- FSApp = Flight Simulator Application
-- FCA = Stands for "FS Control Application which is the client software the pilot will interface with.
-- FSUIPC = Flight Simulator User Interface Personal Computer - A module by Pete Dowson integrated with flight simulator variables which allow for reading and writing of those variables.
-- AFL = Aircraft Fuel Level
-- TEH = Total Engine Hours

What I would *like* to do is...

@ Pilot manually opens the FSApp, loads the aircraft and the FCA.
@ Pilot enters or selects from a drop-down, an aircraft, such as "N009BH" into the "Aircraft" field and presses the "Get Aircraft Data" button on the FCA.
@ The FCA connects to a specific URL where a table of data is stored.
@ The "N009BH" row is located on the table and the "AFL" and "TEH" fields are located and retrieved to the FCA.
@ FCA disconnects from the URL
@ FCA seeds the FSApp with new values via the FSUIPC.
@ Pilot flies......
@ At end of the flight, the pilot clicks the "Send Aircraft Data" button on the FCA.
@ The FCA reads the FSApp values from the FSUIPC and connects back to the URL.
@ The "N009BH" row is located on the table again and the new "AFL" and "TEH" values are overwritten.
@ FCA disconnects from the URL.

Actually there is a lot more values I need to work with, i.e., "Battery_Level," "Engine_Component_Failure_Coefficient, etc. for the aircraft and various fields for the Pilot Logbook. If I can get just the simple(?) AFL and TEH above working correctly, I'm sure I can make the rest hum.

I realize there must be some steps I missed, but I just wanted to give a reasonable idea of what was happening.

Now...

How would you suggest I go about doing this project? To my mind's eye it seems fairly simple, but the four things I don't know are...

1. How to have the client get to the URL?
2. How to make the table (or should I just parse a text file)?
3. How to access table values and read/write?
4. How to make it reasonably secure (UID and PWD)?

I'm doing some experimenting with the Joomla CMS, but I don't think I can automate locating the URL with the FCA. Also, I realize that FCA, FSApp, FSUIPC, etc. abbreviations may drive you bats, but since I am anticipating this project (and this thread) may take some time, I thought having some shorthand would be good.

~CT
« Last Edit: July 24, 2011, 07:51:34 AM by CodeTRUCKER » Logged

I applaud those that refuse to commit "intellectual suicide."

Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

I am persuaded the only reason bad men have succeeded is not because good men have done nothing, but that good men did not do enough.

An Open Letter to My Friends


Notice: - Unless stated otherwise, I receive no compensation for anything I post here.
hamradio
Charter Honorary Member
***
Posts: 585



Amateur Radio Guy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: July 21, 2011, 08:34:03 PM »

Regarding NANY 2012 - See -> http://www.donationcoder....rum/index.php?board=304.0
Logged

Carroll - HamRadioUSA
CodeTRUCKER
Supporting Member
**
Posts: 1,028



Bush Flying... where I'd rather be.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: July 21, 2011, 09:57:00 PM »


I was really just trying to tease Perry a bit.  I had no idea the NANY was starting this early, but thanks for the link.
« Last Edit: July 21, 2011, 10:13:30 PM by CodeTRUCKER » Logged

I applaud those that refuse to commit "intellectual suicide."

Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

I am persuaded the only reason bad men have succeeded is not because good men have done nothing, but that good men did not do enough.

An Open Letter to My Friends


Notice: - Unless stated otherwise, I receive no compensation for anything I post here.
CodeTRUCKER
Supporting Member
**
Posts: 1,028



Bush Flying... where I'd rather be.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: July 22, 2011, 02:25:41 PM »

I've been giving this some more thought... would it be better to put the aircraft data in a text ini-type file, instead of on a table?  I know how to parse text.  Anyone see any problems with this?
Logged

I applaud those that refuse to commit "intellectual suicide."

Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

I am persuaded the only reason bad men have succeeded is not because good men have done nothing, but that good men did not do enough.

An Open Letter to My Friends


Notice: - Unless stated otherwise, I receive no compensation for anything I post here.
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #4 on: July 22, 2011, 02:34:02 PM »

Your plans sound ambitious and complicated. Therefore, I say go with a proper database and thus a table within said database. That way, no matter how complicated it gets, you already have a place where you can stow all the stuff. One-to-many relationships are tough in plain text, nevermind many-to-many ones which are a complete hell.
Logged
CodeTRUCKER
Supporting Member
**
Posts: 1,028



Bush Flying... where I'd rather be.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: July 22, 2011, 02:41:21 PM »

Your plans sound ambitious and complicated. Therefore, I say go with a proper database and thus a table within said database. That way, no matter how complicated it gets, you already have a place where you can stow all the stuff. One-to-many relationships are tough in plain text, nevermind many-to-many ones which are a complete hell.

Alrighty then, I have to learn how to do it, so is php my friend, or MySQL, etc.?  I don't mind doing the work, but I need a push in the right direction.  smiley

How would you do it?
Logged

I applaud those that refuse to commit "intellectual suicide."

Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

I am persuaded the only reason bad men have succeeded is not because good men have done nothing, but that good men did not do enough.

An Open Letter to My Friends


Notice: - Unless stated otherwise, I receive no compensation for anything I post here.
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #6 on: July 22, 2011, 03:43:51 PM »

They serve different purposes. PHP is for the logic, MySQL is for the data (and thus also the relationships between the data).

Proper database design is a course on its own, and I really can't begin to explain the finer points. A good one to keep in mind however is that you should never duplicate data (example: storing John's birthdate twice, once for his passport and once for his birth certificate), and that a field can only describe a single thing (example: list of hotel rooms on the fourth floor should NOT be a comma seperated '401,402,404,405' but instead the proper database relationships should be used so such information can be stored and properly queried). Finally, it also pays to keep in mind that a table should be considered to represent the blueprint of an entity, and a record in said table is such an entity.

To be honest, I am way too tired to go into your specific project. But I'd imagine an airplane table (which describes the aircraft), pilots (describing pilot qualifications), flights (which describes flights of different aircrafts with different pilots), pilot_log (storing dated log entries for all the pilots), etc. Just try to work out in your mind what sort of relationships the various pieces of data have to each others. One on one? Many on many? One on many? Etc.

Try looking at the various images on this pagae for inspiration and a better understanding of what I am trying to get across. If you split all the data up sensibly, a proper SQL query can be launched from PHP at any time to get exactly the data you need. (Example: All of Pilot CodeTRUCKERs log entries between April and July, 2011. Or the amount of flights flown by him in Cessna model aircrafts.) The better your database schema, the easier the more difficult stuff becomes. (Comparitively speaking, anyway.)
Logged
CodeTRUCKER
Supporting Member
**
Posts: 1,028



Bush Flying... where I'd rather be.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: July 22, 2011, 04:10:51 PM »

Worstje, that's a lot to chew on and exactly what I was looking for!  Thanks for your input.

I guess at this juncture I will...

@ ...chew on what you posted and explore your link.
@ ...search DC to find a good on PHP and MySQL.  I have an old copy of Sam's "PHP and MySQL Web Development" that is based on PHP 4, but it should give me a good start (~800 pages). 
@ ...give it some trial and error.
@ ...report back later or ask questions while I work through all the above.
Logged

I applaud those that refuse to commit "intellectual suicide."

Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

I am persuaded the only reason bad men have succeeded is not because good men have done nothing, but that good men did not do enough.

An Open Letter to My Friends


Notice: - Unless stated otherwise, I receive no compensation for anything I post here.
steeladept
Supporting Member
**
Posts: 1,056



Fettucini alfredo is macaroni & cheese for adults

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #8 on: July 23, 2011, 02:59:09 AM »

If it helps any, the way I think of a database is this (it helps me to develop it conceptually):

An abstract object is a table:  Examples - aircraft, person, airport, etc.

Adjectives common to that object are your fields:  Examples for aircraft - color, engine size, engine type, etc.

Specifics about one particular object are your records:  Example for "My plane" - white, 185 hp, twin turbo, etc.

It doesn't go into the rules of who, when, how, where, or why; but it does make it easier to visualize the conceptual data structure to me.  The only thing it doesn't really explain are foreign keys which are how tables are joined together.  For this, I just remember that one field in one table (say person) is the same as one field in another table (say aircraft).  So in the aircraft table, you might only have one Beachcraft Premier I listing, and in the person table, it would show in an equally named field several times (once for each person owning one).  If all that makes sense to you, then you are much further ahead in database design than you think you are....and yet still so far to go.... undecided
Logged
CodeTRUCKER
Supporting Member
**
Posts: 1,028



Bush Flying... where I'd rather be.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: July 24, 2011, 08:29:04 AM »

FYI - This is only the first stage of this project, i.e., setting up the DB and building the client.  The long-term goal of this project is to provide a realistic framework my children and others can experiment with starting and managing a virtual business.  Pursuant to this, what I would like to do in the future is to model...

@ A supply-and-demand market economy.
@ Real-life fuel sales, repair costs, maintenance costs, etc. according to location.
@ Real-life airplane and airport fixed-base operations (FBOs) purchases, etc.
@ Systematic "job" opportunities which will be seeded with A.I. and live-pilot buying and selling.
@ Accurate "wear" models of aircraft life which will be reflected in efficiency and performance.
@ The above "wear" will be based on "component" use and failure modeling.
@ ?????

As you can see this project is VERY ambitious and it will be years before it matures to everything envisioned.  In the meantime, the goal is to get some baseline interaction ("starting small") and build from there.  Besides coding, a massive amount of research will be necessary.  For example, consider how a poor pilot could impact the engine and airframe of the ubiquitous piston-engine Cessna 172 Skyhawk?  Modeling each engine component and airframe component is a daunting project.  Now imagine the interactions between each component and how a failure ( oil pump goes "boing!") could cascade through the others (piston rings, rods, etc.) and you get how large the project could grow.  As immense as all that adds up to, multiply it by the number of different aircraft models available and wowzee!  It's a big one (and I didn't mention turboprops and jets)!

Granted, I am trying to singularly accomplish with my feeble skills what whole corporations have been working toward for decades.  The chances I will succeed in everything is not realistic, but I will take the project as far as I can.  

To this end, there is an official forum for this specific project.  If this project sounds like something you would like dabble in every now and then send me a PM and I will provide more details.

It should be clear, but just so no one gets their tail twisted, this is in no way meant to proselytize anyone away from DonationCoder, but to allow any like-minded aviation enthusiasts a fuller participation in the project which would not be appropriate to do on the DC forums.  
« Last Edit: July 24, 2011, 08:33:16 AM by CodeTRUCKER » Logged

I applaud those that refuse to commit "intellectual suicide."

Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

I am persuaded the only reason bad men have succeeded is not because good men have done nothing, but that good men did not do enough.

An Open Letter to My Friends


Notice: - Unless stated otherwise, I receive no compensation for anything I post here.
CodeTRUCKER
Supporting Member
**
Posts: 1,028



Bush Flying... where I'd rather be.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: July 25, 2011, 05:00:45 PM »

Great! This is really good information and the graphics *really* require some concentration.  Thanks a lot, folks!

[FYI - I am moving my PHP/MySQL self-teaching initiative to the "Programming School" board.]

Logged

I applaud those that refuse to commit "intellectual suicide."

Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

I am persuaded the only reason bad men have succeeded is not because good men have done nothing, but that good men did not do enough.

An Open Letter to My Friends


Notice: - Unless stated otherwise, I receive no compensation for anything I post here.
kyrathaba
N.A.N.Y. Organizer
Honorary Member
**
Posts: 3,010



while(! dead_horse){beat}

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: August 04, 2011, 06:53:57 AM »

CT, PHP/MySQL can work together to accomplish what you want to do.  If you download and install XAMP (a free software suite that will allow you to simulate how your PHP webpage code would interact with a MySQL database), I have some working code for a very simple table that I can share with you, that may help you get a feel for how to pull data from a table and display it in a webpage.
Logged

Win 7 Home Premium 64bit-SP1 AMD Athlon II X2 220 Socket AM3 (938) @ 2.1GHz 6GB RAM Firefox 26.0
_________________________________________________________________________________________

I'm fighting against patent trolls. Join me and tell your representative to support the #SHIELDAct: https://eff.org/r.b6JJ /via @EFF

My DC page: http://kyrathaba.dcmembers.com | My blog: http://williambryanmiller.com/ | Proofreading Service: http://bit.ly/1fQSqQP

Stoic Joker
Honorary Member
**
Posts: 5,270



View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: August 05, 2011, 04:38:34 PM »

[FYI - I am moving my PHP/MySQL self-teaching initiative to the "Programming School" board.]

I'm no expert, but I have slapped together a ton of PHP/MySQL stuff ... Let me know if you get stuck.
Logged
MKappy
Supporting Member
**
Posts: 5

View Profile Give some DonationCredits to this forum member
« Reply #13 on: August 07, 2011, 01:11:21 PM »

Accidently posted into this thread by mistake.  sorry.
   Mark
« Last Edit: September 02, 2011, 01:25:13 PM by MKappy » Logged
CodeTRUCKER
Supporting Member
**
Posts: 1,028



Bush Flying... where I'd rather be.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #14 on: December 01, 2011, 03:04:15 PM »

Unless I can come up with some simple but positively ingenious app (along the lines of "Hello world!") for NANY2012, I will have to bow out this year.  Since the last time I posted, we have had to face some more funerals, we moved from Texas to Missouri and two months later were required to vacate and move back to Texas (expensive and exhausting).  I'm out of time for development this year.  Thanks to everyone for the help.  On another note, I am involved in writing an original holiday stage play ("A Sweet Christmas Tragedy").  I'll post the details in the "Living Room."

I'll be around, though.  smiley
Logged

I applaud those that refuse to commit "intellectual suicide."

Truth, unlike opinion, tradition, etc. will always be able to stand on its own.  Truth is not a static, but a living entity and will perpetually impart life; therefore, any "truth" that does not or can not impart life can not be Truth.

I am persuaded the only reason bad men have succeeded is not because good men have done nothing, but that good men did not do enough.

An Open Letter to My Friends


Notice: - Unless stated otherwise, I receive no compensation for anything I post here.
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.04s | Server load: 0.05 ]