Pilot Journey v1.20 - Economy game

  • Actually you answered my question perfectly.:)


    I had the idea of compiling a list of all airports present in the local copy of Aerofly FS2 so users could select them for the Wettergerät app. Presently Wettergerät's users have to enter the ICAO airport code manually if it is not present in their flight plan.


    I also had the idea that the Wettergerät optionally sets the starting position of the plane to the airport the user fetches the weather data for. But like you said: one needs to know much more about the airport in order to solve this.


    Thank you for your insights. :thumbup:

  • Ah, great idea,

    automatically detecting all the installed airports in FS2 would certainly be very comfortable for PJ too.


    Fetching the official weather data is a nice feature btw. PJ can only create random weather with a bias towards less extreme conditions.


    I think with a little testing and some work it should be possible to convert the x,y,z from the main.mcf into latitude, longitude and altitude (or at least distance to the center of the earth) and vice-versa.


    We would need precise coordinates of the parking positions or at least the start of the runway for each airport to really utilize this though. The coordinates in the "runways.csv" are rather detailed, if we get a reliable conversion from lat/long to x,y,z at some point it might be worth checking out if those can be used to put a plane into the right position in the main.mcf

  • Well, the Wettergerät is open source.;) I tried to build it in a way that parts of it can be recycled for other projects. So if you are interested, you are free to integrate the DLLs / source code into your project.


    I will look into the idea of compiling a list of airports from the local files. May be I find something usable, which both PJ and WG can utilize for their own benefit. Like a small tool which build the CSV file with the actual local airports.:/

  • Well, the Wettergerät is open source.;) I tried to build it in a way that parts of it can be recycled for other projects. So if you are interested, you are free to integrate the DLLs / source code into your project.


    I will look into the idea of compiling a list of airports from the local files. May be I find something usable, which both PJ and WG can utilize for their own benefit. Like a small tool which build the CSV file with the actual local airports.:/

    I am also interested in being able to read an airport file for something I am testing. Good thoughts, guys. Thanks.

  • Well, the Wettergerät is open source.;) I tried to build it in a way that parts of it can be recycled for other projects. So if you are interested, you are free to integrate the DLLs / source code into your project.


    I will look into the idea of compiling a list of airports from the local files. May be I find something usable, which both PJ and WG can utilize for their own benefit. Like a small tool which build the CSV file with the actual local airports.:/

    Yea the airport data are stored in the scenery folders in a .tcm file.

    There are exact coordinates for parking positions too, but in latitude, longitude and elevation in meters.


    I have tried to convert those values to the cartesian format that is used in the main.mcf, but so far I was always off by a few kilometres.


    It may have used different polar and/or equatorial earth radius in my approach than fs2 uses.


    I'm currently trying a numerical approach to determine the earth radii fs2 calculates with, assuming they use a spheroid model of the earth.

  • No luck so far converting lat/long to cartesian. Always off by a few km.



    The longer description (beware, math...):


    I have used the following approach:


    x = r*sin(theta)*cos(phi)

    y = r*sin(theta)*sin(phi)

    z = r*cos(theta)


    with


    r = geocentrical earth radius + local elevation;

    phi = longitude;

    theta = 90°-latitude (standard spherical coordinates are 0° at the north pole and 90° at the equator)


    The geocentrical earth radius r in this case is dependent on local latitude (and of course the polar and equatorial radius of the earth). This is due to the fact that earth is not a perfect sphere but an ellipsoid


    I have initially tried the following numbers:


    r1=6335439m (polar earth radius)

    r2=6399594m (equatorial earth radius)


    Which resulted in being off by a few kilometers in x and y and a little more in z direction compared to what FS2 does. Being off just very few km is really not all that bad, I'd exclude having messed up the obvious stuff like mixing up degrees and radians or ft and m at that point.


    So I thought it is maybe just that fs2 uses a different polar and equatorial radius than the numbers I dug up. But changing them around (even in a systematical way) doesn't seem to solve the problem.


    To check that I have varied both radii by about +15km and checked every combination with a stepsize of 1m. Even for combinations where x and y came out perfect, z was still off by at least 10km. (I used the airport TFFF at Martinique for testing).


    If somebody notices an obvious flaw in my approach please let me know, I don't do such calculations on a regular basis. I'll check my script has other errors in the meantime. This also was just one test with one airport, so my findings are pretty vague at this point. any tipps are appreciated.


    I found a pretty critical bug:


    currently the program freezes and becomes unplayable when trying to import customs airports which have no elevation or runway surface info in the database.


    I have made a quick hotfix (download on page one) so these airports will be skipped. I'll do an update soon with better import display and information which airports were skipped and for what reason.


    I made another quick update, which adds a progress window while importing the custom airports so you can see whether everything is working as planned.

    The procedure can take a minute or so if you have many custom airports. There is certainly potential to cut the import time in half, I'll probably do this eventually.


    The update is available on page 1.


    version 1.13 is up. (first page)


    - Includes previous hotfixes.

    - Importing custom airports is a lot faster now.

    - New button that opens a browser with google maps and shows the selected destination on the mission table. (With all the custom airports I got a little lost when deciding where i want to fly next).

    - savegames from 1.10 are fully compatible.


    Note:

    The "custom_airports.txt" in the download is the one I am using right now, it has bavaria, the canaries, czech republik, madrid, venice, martinique and a few other airports in it. A lot of the smallest bavarian airports will not be imported because some info is missing in the database, mostly elevation or runway length. PJ will show a detailed list during import.


    Important:

    In case you want to edit the airports.csv and/or runways.csv yourself to make some of the smaller airports playable, use a simple text editor, not MS excel because it can mess up the file and make it unreadable for PJ.


    If in doubt, you can always download the latest database files here: http://ourairports.com/data/


    After all the coding I managed to fly a bit.


    One of my first missions was from Lugano to Ulrichen in Switzerland in the PA Arrow, with offers gorgeous views along the way. I recorded the landing:


    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

  • perestain

    Changed the title of the thread from “Pilot Journey v1.10 - Economy game” to “Pilot Journey v1.20 - Economy game”.
  • v1.20 is available for download now:


    - All supported planes are stored in a textfile, so you can edit them and add custom ones.


    - You can now switch between playing with the FS2 airports & custom airports and the full database of over 30000 airports & helipads.


    The game can now be customized for any future dlc and custom scenery and also for occasional flights with other simulators.

  • Hey, was wondering if anyone can help me out. I would like to fly just in the Netherlands scenery from Orbx. I have unchecked everything but the "Netherlands" Scenery but when I start a new game, I either get put somewhere not in the Netherlands, or nothing shows up at all. Is there a way to just use Netherlands scenery?


    Thanks

  • I figured out the above,but now, every time I close out Pilots Journey and go back in, it starts me at the Airport I originally started at. Flew from EHSE to EHBG, saved game and went back in and I am at EHSE still. Is this how it is supposed to work?

  • Just did a test and added EHBG to the custom airports file and when it goes to import, it states EHBG is not in the airport.csv file. I am going to try and add it here manually and see what happens.

  • Hi guys.


    Thank you perestain for your work on this. Regarding the geo coordinates, here is a couple of Wolfram Alpha pages that might be of use.


    This one is on the math more in general:

    https://mathworld.wolfram.com/CartesianCoordinates.html


    This one is on the syntax for using the wolfram console inputs:

    https://reference.wolfram.com/…e/ref/GeoPositionXYZ.html


    I think you need the pro license to use the console for computation, but afaik once you have it, you can give it list files and convert the entries en masse and print the results. I've no first hand knowledge, but might be something to look into.


    Anyway, thanks again and just thought I would share the idea, would be cool to get the positions automated too if you are still working on this. Regardless it's nice to have this game.