New Release Extended Map MFD

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
Extended Map MFD, a.k.a. Map MFD 2, is a clone/improvement of the default Map MFD in Orbiter 2016.

Download: https://www.orbithangar.com/showAddon.php?id=c97c2ce4-ef13-4fa7-bd9a-58b6071341c3

ExtMap2.png

In addition to having most of the features of the built-in Map, it also supports multiple targets (vessels, bases, planets, moons), inputting coordinates as targets, 15 different map projections (including some polar ones), setting the colours in a config file, and setting the default display configurations in the config file.

Hopefully, you will also see improved performance, especially when fully zoomed out.

Update log:
July 19, 2020: initial release. (1.0)
August 5, 2020: bug fixes, added version for OrbiterBETA. (1.1)
January 30, 2021: include daylight fill, some new projections and other features. (2.0)

Known issues:
The daylight fill is a bit unstable for some projections. This is from the graphics client's side (struggling with complex polygon shapes), and I can't do much with it. The inline client manages this better than the D3D9 client. When using D3D9 client, you must use its version 4.10 or newer (released August 29th 2020 or later, which you can find here http://users.kymp.net/~p501474a/D3D9Client/ ).

Please use this thread for help, bugs, and general feedback!
 
Last edited:

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
This a great surprise asbjos thank you,does it work in orbiter 2010 also?

You people really do love O2010, don't you! :p

No it doesn't, and it doesn't seem to be easily doable either.
First, my code relies on several API functions only available in O2016. Mainly for math and surface elevation. That could be remade or reworked.
The bigger issue is the function that reads the map vector file (oapiOpenFile). It was improved in O2016, and I use those improvements, meaning that backporting to O2010 would need a rewrite of the map reading logic, which of course is a quite integral part of the MFD.

So I'm not prioritising that. :compbash:

But the source code is included, if anyone wants to give it a go!
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,063
Reaction score
507
Points
113
MapMFD2 v1.0 (for BETA)

Hi Asbjørn,

I found that your 2016 release does not work for Orbiter BETA...
So I rebuild it and this works for Orbiter BETA.

Why they are not compatible between 2016 and BETA is still a mystery to me. :idk: Maybe I'll find the time to look a little deeper into it.

So attached you'll find a Orbiter BETA build!

Note to all: This is only for Orbiter BETA!. No feature was added, so don't use it on Orbiter 2016.

Two small changes were needed to get rid of warnings (see files in Orbitersdk\samples\MapMFD2\ folder).

--- Update ---
I accidentally had created the module with the wrong resource-ID for the IDS_INFO, therefore the Modules description isn't shown in the Modules Tab :facepalm:
Sorry Asbjørn, I should have been more strict with my own quality control :)
The current attachment (2020-07-20 20:13 UTC) has this fixed:thumbup:
 

Attachments

  • MapMFD2-v1.0 (for BETA).zip
    62.4 KB · Views: 7
Last edited:

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
There's a bug with selection.

Here "Spacecraft" was expanded, some spacecraft was selected, then I clicked on "Moons", "Spacecraft" collapsed, but the "selector bar" didn't move accordingly.

zy4uA6w.png
 
Last edited:

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,063
Reaction score
507
Points
113
I accidentally had created the module with the wrong resource-ID for the IDS_INFO, therefore the Modules description isn't shown in the Modules Tab. :facepalm: Sorry Asbjørn, I should have been more strict with my own quality control
The current attachment (post above) has this fixed
 
Last edited:

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
Thanks alot, kuddel!
Please do explain why it won't run in the Beta, if you ever find out! I at least have no clue.
I've downloaded the Beta now, so for the next release (shortly upcoming; thanks for the report Ripley!), I can add a Beta-version to OHM.

This is the first time I'm using a resource file, so I'm just glad that it works at all!

---------- Post added at 00:11 ---------- Previous post was at 00:07 ----------

Also want to say that I plan to add the lighter fill for the sun-lit side, but just haven't found a way to do it yet. The big challenge is to have it work for all projections, which I haven't figured out / prioritised during the month it took to develop the MFD.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,063
Reaction score
507
Points
113
Wow!
I found why the MapMFD2 versions for BETA and 2016 are incompatible!

My explanations below are with the following setup: Run a BETA-build MapMFD2 on Orbiter 2016 (the other way around would be vice versa).

It all has to do with the different Orbitersdk\include\DrawAPI.h files.

In the BETA there is a new method Sketchpad::TextW, which is placed right after the method Sketchpad::Text. This "shifts" all entry points of the following methods one up!

So for example, when skp->Line(int,int,int,int) is called, it actually calls skp->Rectangle(int,int,int,int) etc. pp. (for those two it's "harmless" as they share the same signature)

But when your MFD tries to call skp->Ellipse(int,int,int,int), ... skp->Polygon(const IVECTOR2*, int) is called!! (Which leads to a call stack corruption due to the completely different parameter signature)

To fix this problem one could either
  • Add
    Code:
    virtual bool TextW (int x, int y, const LPWSTR str, int len) { return false; }
    to the Orbiter 2016 DrawAPI.h file (same place!)
  • Or move that line in Orbiter BETAs DrawAPI.h to the end of the other methods

As DrawAPI.h is provided by the Doctor I would recommend to let him decide what he is thinking about that.

A patch for Orbiter 2016 would add the wide-char feature to Orbiter 2016 (NASSP would like that, too :thumbup: )
A change in the BETA repository would be the "easier choice".

The D3D9Client for BETA and/or for Orbiter 2016 would have to be re-build anyway.


I am a bit busy the next few days, so if you (or somebody else) likes to inform Martin it might speed things up. Else I'll contact him later on.

---------- Post added 24-07-20 at 00:13 ---------- Previous post was 23-07-20 at 23:49 ----------

BTW: If my conclusions are nonsense, please tell me :thumbup:
 

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
I've now updated the MFD to version 1.1, which includes a fix to the target selection box bug, wrong distances for target information, and probably some more fixes that I've forgotten.

When downloading from OHM, you can pick between the regular Orbiter2016 version, or a version for OrbiterBeta (compiled for the 190914 beta).
They are NOT interchangeable (using the beta version in O2016 will lead to crash, and vice versa).

Thanks to kuddel and Ripley
 

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
I've uploaded new versions (v2.0, both for O2016 and OBeta), now including daylight fill, some new features (like ability to display location of where you cross a specific altitude, useful for seeing where your reentry interface begins), and some updated map projections (added loximuthal, sterographic, Laskowski, Hammer, Robinson, Van der Grinten, Gall-Peters. To reduce complexity, I also had to remove some old ones, like Ortelius Oval and Miller).

While the daylight fill is undoubtedly the biggest new feature, it's a bit buggy, flickering for some projections. This is from the graphics client's side (struggling with complex polygon shapes), and I can't do much with it. At least not this month :) . The inline client manages this better than the D3D9 client. When using D3D9 client, you must use its version 4.10 or newer (released August 29th 2020 or later, which you can find here http://users.kymp.net/~p501474a/D3D9Client/ ).

1612041808134.png
 

Nicholas Kang

Tutorial Publisher
Tutorial Publisher
News Reporter
Joined
Apr 3, 2016
Messages
522
Reaction score
10
Points
18
Location
-
I've uploaded new versions (v2.0, both for O2016 and OBeta), now including daylight fill, some new features (like ability to display location of where you cross a specific altitude, useful for seeing where your reentry interface begins), and some updated map projections (added loximuthal, sterographic, Laskowski, Hammer, Robinson, Van der Grinten, Gall-Peters. To reduce complexity, I also had to remove some old ones, like Ortelius Oval and Miller).

While the daylight fill is undoubtedly the biggest new feature, it's a bit buggy, flickering for some projections. This is from the graphics client's side (struggling with complex polygon shapes), and I can't do much with it. At least not this month :) . The inline client manages this better than the D3D9 client. When using D3D9 client, you must use its version 4.10 or newer (released August 29th 2020 or later, which you can find here http://users.kymp.net/~p501474a/D3D9Client/ ).

View attachment 23890

Do you plan to include surface features names like crater's and valley's names in your map MFD in future releases? It's a bit tedious to switch back and forth between the extended Map MFD and the "original" Map MFD to look at the surface features near my vessel. Also a topographic map integrated with your MFD would be nice too. (https://www.orbiter-forum.com/threads/topographic-map-mfd-v-0-7.33676/)

Just some suggestions.
 

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
Do you plan to include surface features names like crater's and valley's names in your map MFD in future releases? It's a bit tedious to switch back and forth between the extended Map MFD and the "original" Map MFD to look at the surface features near my vessel. Also a topographic map integrated with your MFD would be nice too. (https://www.orbiter-forum.com/threads/topographic-map-mfd-v-0-7.33676/)

Just some suggestions.
There's a simple elevation radar you can activate on the config page (or set permanently in config file), showing red if ground is higher than directly underneath, and green if elevation is lower.
It only samples 160 spots, but is still quite slow.
And as the Topographic Map add-on works so well, I will probably not try to duplicate it.

I haven't implemented the surface features yet, as I don't use that feature myself.
But it should be quite straightforward to implement, so I'll look at it this weekend. (y)
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
While you are at it, can you increase the zoom-in range ?
I'm thinking about some situations where we are driving around bases with lots of landed objects, pads, etc.
Also perhaps a heading indicator line while landed (similar to the orbital ground track)? Would be useful with surface features ;-)
 

Nicholas Kang

Tutorial Publisher
Tutorial Publisher
News Reporter
Joined
Apr 3, 2016
Messages
522
Reaction score
10
Points
18
Location
-
There's a simple elevation radar you can activate on the config page (or set permanently in config file), showing red if ground is higher than directly underneath, and green if elevation is lower.
It only samples 160 spots, but is still quite slow.
And as the Topographic Map add-on works so well, I will probably not try to duplicate it.

I haven't implemented the surface features yet, as I don't use that feature myself.
But it should be quite straightforward to implement, so I'll look at it this weekend. (y)

Thanks, One thing to note. If possible, consider implement the surface feature label on your MFD with an option for the user to store the default setting, perhaps in a config file (say I want to see only craters name but not the maria's name or some users want to load all the surface labels by default).

By default, in the original Map MFD, these settings are not remembered and switching between vessels will result in lost of memory and I have to go to the DSP page to turn on each surface label settings (press MOD multiple times) between each vessels.

ZENUqdR.png
 

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
Thank you for your interest and suggestions!

I've uploaded a new version (v2.1), which you as usual download from Orbithangar.
Includes ability to display markers (it wasn't as easy to implement as I thought :p ). As with many other settings on the config page, you can specify markers to be enabled by default in the Config\MFD\MapMFD2.cfg file (at the bottom of the file, e.g. "DefaultMarkers = Config\Mars\Marker\Valles.mkr").
I've also increased the max zoom level to 32768, and added a simple line indicating heading while the vessel has ground contact.
 

Nicholas Kang

Tutorial Publisher
Tutorial Publisher
News Reporter
Joined
Apr 3, 2016
Messages
522
Reaction score
10
Points
18
Location
-
Thank you for your interest and suggestions!

I've uploaded a new version (v2.1), which you as usual download from Orbithangar.
Includes ability to display markers (it wasn't as easy to implement as I thought :p ). As with many other settings on the config page, you can specify markers to be enabled by default in the Config\MFD\MapMFD2.cfg file (at the bottom of the file, e.g. "DefaultMarkers = Config\Mars\Marker\Valles.mkr").
I've also increased the max zoom level to 32768, and added a simple line indicating heading while the vessel has ground contact.

Thanks, asbjos! That's quite fast.

The markers work well for me. In fact, I just realized that your Map MFD can actually display projections of vessels orbiting Earth onto the Moon's map. Doesn't makes a lot of sense for practical usage, but nevertheless, pretty impressive feat. Nice work!

1616894610780.png
 

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
Updated to version 2.2 on OHM.

Changes:
  • When inputting target in text box, type "x" for current position of focus vessel (for example if you want to set a checkpoint, and measure distance to some new point).
  • New numeric groundtrack calculation for correct track with non-spherical gravity. You should also notice improvements with orbits with eccentricity close to 0 or 1.
  • More snappy panning of map.
  • Add terrain check for ground track, so that track stops when you crash with a mountain. This way you can avoid something like this happening to you:
    As checking the terrain elevation for every ground track step is very slow, this is disabled by default. In the config screen, set "Consider terrain for groundtrack" to ON.
 

dgatsoulis

ele2png user
Donator
Joined
Dec 2, 2009
Messages
1,924
Reaction score
340
Points
98
Location
Sparta
Thank you so much for this asbjos! A must have MFD!

I have a feature request. Would it be possible to allow the user to load an image file instead of the contour/coast .vec files? The MFD would look in the "usual" place for a bmp file: "Textures\EarthM.bmp", etc.. and it could load that instead, with the feature being selectable in the config page. If it messes with the other projections, perhaps it could be an "equirectangular only" option.
 
Top