User Created Custom Missions

  • I am almost done with building a tool which converts flightplans into custom missions. This is done by grabbing data from the main.mcf and converting it into a new custom_missions.tmc file.

    One of the obstacles I did not find an answer to was: How to convert the coordinates for a given waypoint (vector3_float64) in the main.mcf into a WGS84 coordinate for custom_missions.tmc?

    As an example find the to waypoint representations attached:

    Code: custom_missions.tmc
    <[string8u][name][CESRA]>
    <[vector2_float64][lon_lat][-119.761958333333 34.4294083333333]>
    <[float64][altitude][858.899]>
    <[float64][direction][88.6024010104634]>
    Code: main.mcf
    <[string8u][Identifier][CESRA]>
    <[vector3_float64][Position][-2614261.54352665 -4571804.72594129 3585834.88797721]>
    <[vector2_float64][Altitude][-1001 100001]>

    I found some geo conversion formulas in this forum, but obviously they are meant for other cases (or I am using them wrong). So does anybody know how to convert -2614261.54352665 -4571804.72594129 3585834.88797721 into -119.761958333333 34.4294083333333?


    How to convert the the vector matrix for the plane orientation (matrix3_float64) in the main.mcf into a regular heading in Degrees for custom_missions.tmc?

    As an exmaple find the two represntations of more or less the same state of heading attached:

    Code: main.mcf
    <[matrix3_float64][orientation][
    0.0300546374797615 0.537103816145256 0.842980551049764
    -0.909723140763483 0.364114416540669 -0.199560764747666
    -0.414126219799454 -0.760881188063847 0.499559097329999
    ]>
    Code: custom_missions.tmc
    <[float64]   [origin_dir]         [346.0]>

    I found some very interesting pages about matrix conversion and had my fun with cosinus, sinus, arctangents and all of their friends, but obviously this matrix is in a format that is not compatible with the (non-Aerofly) instructions I found. So does anybody know how to convert 0.0300546374797615 0.537103816145256 0.842980551049764 -0.909723140763483 0.364114416540669 -0.199560764747666 -0.414126219799454 -0.760881188063847 0.499559097329999 into a simple 346°?

    Aerofly Wettergerät - Load live METAR weather data into Aerofly FS 2 and Aerofly FS 4

    Aerofly Missionsgerät - Convert flight plan files into an Aerofly FS 4 custom missions file

    Edited 2 times, last by Jet-Pack (IPACS): Merged a post created by Armitage into this post. (October 12, 2022 at 9:16 AM).

    • Best Answer
    • Official Post

    To get the direction for the origin and destination simply go to the location menu, set the airplane onto the runway and the click on the map to move the airplane away from the runway. Now you can see the magnetic and true heading in the top right corner, just copy the true course.

    Here is the code snippet for converting from the 3d global coordinates (x, y, z) on the WGS84 ellipsoid to the longitude/latitude (+E, +N).

  • Jet-Pack (IPACS) Thank you, the conversion of coordinates works as advertised.

    I wrote a rather ugly NodeJs tool which now converts the main.mcf to a mission file. It still needs a ton of tweaking, but this weekend I am confident to have it up and running.

    Oh, and the mission file supplied with Aerofly is very interesting. Hidden in there is a hint of a supersonic surprise. ;)

  • 6233-custom-mission-generator-at-work

    Well, the custom mission generator seems to do its (basic) job. The tool is a little rough around the edges, but for tinkers it is a good start to craft custom mission files. Just build a flight plan, setup weather, time and plane, and have all of these exported into a single file.

    You find the instructions (as usual with no warranty) at https://github.com/fboes/aerofly-missions. aenbacka The source code is open source, so you might find some inspiration for your HEMS mission generator, even though NodeJs may not be your choice of programming language.

    Jet-Pack (IPACS) If there are plans for adding a custom mission folder (e.g. to Documents\Aerofly FS 4\addons\missions) I am happy to update the documentation.

    Oh, and EXTRA300L I hope you do not mind for you being one of the first inspirations for a demo mission (even though I do not have the Extra 300 to make it a proper flight setup) ;) .

  • 6233-custom-mission-generator-at-work

    Well, the custom mission generator seems to do its (basic) job. The tool is a little rough around the edges, but for tinkers it is a good start to craft custom mission files. Just build a flight plan, setup weather, time and plane, and have all of these exported into a single file.

    You find the instructions (as usual with no warranty) at https://github.com/fboes/aerofly-missions. aenbacka The source code is open source, so you might find some inspiration for your HEMS mission generator, even though NodeJs may not be your choice of programming language.

    Jet-Pack (IPACS) If there are plans for adding a custom mission folder (e.g. to Documents\Aerofly FS 4\addons\missions) I am happy to update the documentation.

    Oh, and EXTRA300L I hope you do not mind for you being one of the first inspirations for a demo mission (even though I do not have the Extra 300 to make it a proper flight setup) ;) .

    Very nice indeed, I will take a look at it:) For the HEMS mission generator I am looking into using custom objects depending on mission type, and I have methods of placing them according to real historical accident locations, which I hope to be able to use for the generator. Great work:)

  • Does anyone know how to get the altitude of a given waypoint from the main.mcf? Jet-Pack (IPACS) to the rescue (again)?

    Code: main.mcf
                        <[tmnav_route_waypoint][KAS][2]
                            <[string8u][Identifier][KAS]>
                            <[vector3_float64][Position][3525358.49776467 788889.817749687 5238813.34905962]>
                            <[uint64][Uid][9869705310650437632]>
                            <[float64][NavaidFrequency][112500000]>
                            <[uint64][NavaidUid][9869705310650437632]>
                            <[vector2_float64][Altitude][-1001 100001]>
                            <[bool][FlyOver][false]>
                        >

    The Altitude seems strange, so my hope is for the Position to be the fix.

    …because the mission generator can also be used to convert the main.mcf to a simple flight plan:

  • Quote

    I took the wrong turn and I just kept going

    The Aerofly Missions tool has grown beyond its intended purpose and is now quite capable to convert the main.mcf into a flight briefing:

    As of now I do not know about the local time, calculating Local Sun Time (LST) instead. This may be OK, but for the magnetic declination for every checkpoint I have no data, instead relying on a single user-supplied input (which may be incorrect for checkpoints farther away). So all tracks and headings may be somewhat off. But I found something in the Aerofly folder:

    There is a file world/magnetic.tmm and world/time_zones.tmm. Both contain binary content I am yet unable to interpret. I suspect in there is a map which (given the correct method of access) would give me the missing data which Aerofly uses internally for magnetic declination and time zones.

    So my question is: Does anybody know how to interpret these files? (Not to bother Jet-Pack (IPACS) again, but any help would be highly appreciated.)

  • These are binary data files which are not intended to be used outside of Aerofly FS.

    Instead of the magnetic track and heading, why not just use true track and heading? That way you don't need to update your files each year.

    For the time zones, check out the ourairports website, they have a lot of data which you may be able to use.

  • Not necessarily proper bugs, but as I mess around with custom missions here you go:

    Random cloud layer

    On loading a custom mission, a random second cloud layer seems to be set, even though there is no second cloud layer setting in custom missions. Explicitly setting the second cloud layer via missions would be very welcome for more weather variation.

    Cruise altitude

    On loading a custom mission, a new cruise altitude seems to be set, even though there is no cruise altitude in custom missions. This changes where TOC / TOD is happening, and affects the curve radius on the flight plan. Explicitly storing the cruise altitude via missions would be very welcome.

    Frequencies

    On loading a custom mission, the VOR/NDB frequencies stored in the custom mission are not transferred to the flight plan. Well, at least frequencies do not show up in main.mcf. ;)

  • Maybe this is getting out of hand, but just to let you know:

    • Convert Garmin fpl Flight Plan file to Aerofly FS 4 Custom Missions file.
    • Convert Microsoft FS pln Flight Plan file to Aerofly FS 4 Custom Missions file.
    • Convert X-Plane fms Flight Plan file to Aerofly FS 4 Custom Missions file.

    The Aerofly Missionsgerät is now able to convert the most relevant flight plan file formats to the Aerofly Custom Mission file format. This opens up some new ways for you to get custom missions:

    Flight planners:

    Flight plans:

    I know that as of now the Aerofly Missionsgerät is a rather hard to use tool, because you need to have Node.js installed and need to use obscure commands on your terminal. So I am exploring the possibility to build a web version of this tool, where you just upload your flight plan, fiddle with some settings, and download your custom missions file. But don't hold your breath. ;)

  • That's interesting. I'm still dreaming of such a feature in Aerofly itself. Save and load flight plans and import them from other formats. Great work!

    Well, it is open source. ;) I would be delighted if my programming could be the inspiration for an integrated feature.

    Same goes for the Wettergerät.

  • Maybe this is getting out of hand, but just to let you know:

    The Aerofly Missionsgerät is now able to convert the most relevant flight plan file formats to the Aerofly Custom Mission file format. This opens up some new ways for you to get custom missions:

    I know that as of now the Aerofly Missionsgerät is a rather hard to use tool, because you need to have Node.js installed and need to use obscure commands on your terminal. So I am exploring the possibility to build a web version of this tool, where you just upload your flight plan, fiddle with some settings, and download your custom missions file. But don't hold your breath. ;)

    Really cool and great work! 👍 This definitely opens up new possibilities. I am still working on my tool for creating custom rescue / HEMS missions, this could integrate nicely with it. The idea is that you should be able to select type of missions you want (and parameters like max distance, type of area etc), and the mission should be created (hopefully also using custom 3d objects).

  • The Aerofly Missionsgerät can now be used right out of your browser.

    Web version of Aerofly Missionsgerät

    Open https://fboes.github.io/aerofly-missions/dist/, supply your main.mcf or any other supported flight plan format, and at the end of the page you will find a download link for the missions file (as well as a Markdown text file as a mission description). (Actually no files are uploaded / downloaded, as all the magic happens inside of your browser.)

    This is just the beta version of the flight plan converter, this will improve along the way. Setting date, weather and other variables is still on my list. If I am going completely crazy I will add the Wettergerät to the web version, so the current real weather is added to your flight plan.

    (Tested in Firefox and Google Chrome.)

  • The Aerofly Missionsgerät can now be used right out of your browser.

    Web version of Aerofly Missionsgerät

    Open https://fboes.github.io/aerofly-missions/dist/, supply your main.mcf or any other supported flight plan format, and at the end of the page you will find a download link for the missions file (as well as a Markdown text file as a mission description). (Actually no files are uploaded / downloaded, as all the magic happens inside of your browser.)

    This is just the beta version of the flight plan converter, this will improve along the way. Setting date, weather and other variables is still on my list. If I am going completely crazy I will add the Wettergerät to the web version, so the current real weather is added to your flight plan.

    (Tested in Firefox and Google Chrome.)

    I did a test flightplan for the EC-135, and copies the created custom_missions.tmc file to the missions folder. However, when launching Aerofly FS4, the list of challenges seem to be empty (with the EC-135 selected). Is only fixed-wing / airliners currently supported?

  • I did a test flightplan for the EC-135, and copies the created custom_missions.tmc file to the missions folder. However, when launching Aerofly FS4, the list of challenges seem to be empty (with the EC-135 selected). Is only fixed-wing / airliners currently supported?

    Do you see any challenges at all? And do you have the possibility to put your file somewhere I could have a look at?

  • I did a test flightplan for the EC-135, and copies the created custom_missions.tmc file to the missions folder. However, when launching Aerofly FS4, the list of challenges seem to be empty (with the EC-135 selected). Is only fixed-wing / airliners currently supported?

    Well... ahem... erh...

    Actually it is called custom_missions.tmc, while the generator calls it custom_mission.tmc. Mind the missing "s". 8o