The Innsewerants Space Agency is very happy to present the ISA MapSat Module and MapGen rendering tool.
Code: Innsewerants, Special thanks to Giucam for finding a way around the pqs weirdness.
Part Model & Animation: Innsewerants
Part Texture: Innsewerants
Special Thanks
r4m0n, C7 - 4 Being on IRC and guiding me towards solutions learning c#.
And anyone I might forget at the moment.
Features:
Collect elevation data and map planets with the ISA MapSat.
New in game GUI and maps.
<iframe width="560" height="315" src="http://www.youtube.com/embed/0NAI0WDASos" frameborder="0" allowfullscreen></iframe> <iframe width="560" height="315" src="http://www.youtube.com/embed/YXz1K-E9nM8" frameborder="0" allowfullscreen></iframe>
-Automatically scans for artefacts within range which you can show using a toggle.
-KSC\'s are marked on maps, show using toggle.
-Current satellite position marker available on toggle as well.
Of course MapGen is still included to render data files if you are collecting raw data: Change the maximum elevation e.g. white = 8000 m or generate really small maps
Generate polar views Map Kerbin, give it a nice 'natural' colour if you like
[size=8pt]*Images were generated with data collected during testing and likely containing errors, I used this data because it\'s enough to show what the MapGen can do.[/size]
Installation:
Note 1:
If you have an unofficial 2.0.3 version installed, consider removing it, everything in my code has changed.
Perhaps it will somehow interfere or make bug finding/fixing more difficult.
Note 2:
you can append to your old csv\'s by renaming them appropriately (Kerbin_elevation.csv , Mun_elevation.csv and Minmus_elevation.csv) and placing them in the PluginData\isa_mapsat folder.
Note 3:
If you want to start MapSat with prerendered textures from old csv data run mapgen using 'isa_mapgen.exe texture' and 'isa_mapgen.exe texture polar' this will render out textures suited for the gui.
Install
-Extract the archive somewhere and copy over the files, I left the structure of KSP_win in the archive to make it easier to figure out.
-Copy old csv files to the pluginData/isa_mapsat folder and rename if required.
-Prerender textures with mapgen if desired.
-Launch KSP.
IMPORTANT - You need to copy over and replace all on the part folder too not just the dll and the mapgen.exe when you update. Textures used in the gui are stored in the parts folder. Not doing this can result in squashed textures, corrupt textures and missing gui elements. As of 3.1.0 the map textures are 400x256 not 400x400, 400x400 are incompatible and you either need to crop the old ones to the correct size, delete them and start new or render out ones from csv data using 'isa_mapgen.exe texture' and 'isa_mapgen.exe texture polar'.
You can delete any isa_RAM_Module folder if you don\'t use a third party unofficial version of 2.0.3 that uses it and don\'t have anything in there you want to keep.
This directory will never be used again and the mod has changed permanently to the name ISA_MapSat, getting rid of the RAM crap in the name.
General Usage:
You need preferably 1 sat only on your craft.
The gui maps are updated as long as you are in range and continue to be updated in the background if you look at different maps.
You can switch maps by clicking on the button with the current map name.
The rest of the buttons speak for themselves I think, all the overlays are on toggles.
Toggle open the information panel to get Wikipedia-like information about the planetoid straight from the game.
Toggle on raw data collection if you want to collect csv data for the MapGen tool.
You can find stored csv\'s and the MapGen tool in the PluginData\isa_mapsat directory
NOTE: Toggle raw data collection off before running MapGen!!.
More information in spoilers.
[spoiler=Frequently Asked Questions]
Can it map Kerbin/future bodies?
-As of 3.0.0 a manual update is required to support new planetoids as the devs add them. Not a lot of work though So expect a quick update whenever they add something new to map.
Can it collect data from high altitude
-Yes, it can collect data from as far away as 500km but beam density suffers, but then again the sparse beam density but wider coverage is handy to get a general overview first to render small maps with or find artefacts somewhat quicker.
Can it collect data while in map view
Yes, as of v2.0.0
Can it collect data while speeding up time?
Yes, as of v2.0.0 it can collect data up to 10x speed, but you will get big spaces between readings, might be handy at high alt to collect enough spread out data to render a filled small global map quickly though.
[/spoiler]
[spoiler=To do / Requests / Known Bugs / Working on]
- [li][MapSat][Bug]There is a bug when occasionally not all ksc markers show up, this code is up for planned changes anyway.[/li]
[/spoiler]
[spoiler=New features, changes and fixes]
Version 3.3.1
-Added GPS part, it's very compact as to not get in the way but lack the ability to map itself, for navigation purposes without lugging a whole dish. [MAPSAT]
-Fixed Mac file path problem. [MAPSAT]
Version 3.3.0
-Rewrote maphandling completely to be dynamic. 17 and future content like planet should work without manual updating on my end.[MAPSAT]
-Enhanced the beam/drawing. [MAPSAT]
-Gave the wiki a workover and renamed it KerbalPedia since it's not really a wiki. [MAPSAT]
-Fixed the icon tooltip. [MAPSAT]
-Fixed the icon positioning after reports of issues on some resolutions. [MAPSAT]
-Renamed artefacts to anomalies. [MAPSAT]
-Enabled one more notch of timewarp increasing mapping capability up to max 50x err timewarp.[MAPSAT]
(Note: gameplay wise I find it too fast and feeling a bit cheaty but after considerations about how much harder it is to reach other planets than mun and minmus I enabled it.)
-Some performance tweaks.[MAPSAT]
Version 3.2.1
-Added forgotten Geostationary orbit altitude and velocity to wiki.[MAPSAT]
-Forgot to change main button to the new icon as planned, fixed.[MAPSAT] (update Parts folder too!)
Version 3.2.0
-Added some batch files to render textures from csv data.
-Replaced the information panel completely, you can now look up wiki data on any body regardless of current orbit and it's in a more readable scrolling window. [MAPSAT]
-Added a mouse tooltip when you hover over the map that gives you the GPS coordinates of the pixel underneath, doesn't work in polar. [MAPSAT]
-Removed saving textures when part gets destroyed for now, you won't lose much and it's a suspect for texture problems. [MAPSAT]
-Fixed another instance where texture corruption could happen. [MAPSAT]
-Changed beam from a premade pattern to a simpler to handle grid [MAPSAT]
-Increased the density of the scan beam a lot [MAPSAT]
-Can't believe noone including me noticed but fixed the north pole being mirrored [MAPSAT & MAPGEN]
(requires re-rendering the polar textures with MapGen, deleting polar textures or manually doing a horizontal mirror on the North pole half of every polar texture, sorry)
-CSV data now collects over a period of time without writing to file as often [MAPSAT]
-The previous change allows me to remove duplicates somewhat, at least per write. [MAPSAT]
Version 3.1.0
-0.16 Compatible.
-Made drawing on a toggle after requests [MAPSAT]
-A few optimizations and code changes [MAPSAT]
-Fixed a bug on info panel when around Kerbol [MAPSAT]
-SOme typo corrections in the info panel, uses more scientific notation for large numbers[MAPSAT]
-Cut up the info panel into 2 pages so it will fit with the new dimensions. [MAPSAT]
-Fixed the blank instead of black map error. Requires deletion of any erronous transparent maps. [MAPSAT]
-Tweaked GUI size [MAPSAT]
-Added Polar maps [MAPSAT]
-Increased the beam resolution/number of measuring points in the beam. [MAPSAT]
-Added 'texture' to mapgen\'s command line options to pre-render textures for the gui from old csv data. [MAPGEN]
-Added 'texture polar' to mapgen\'s command line options to pre-render polar textures for the gui. [MAPGEN]
-Added scale, sea level marker and labels [MAPSAT]
-Resized GUI texture size [MAPSAT]
-Fixed long unnoticed bug in topography colour scheme in Mapgen when rendering bodies with negative elevations like kerbin [MAPGEN]
-Removed missed test log output spam [MAPSAT]
Version 3.0.0
-Changed name of mode to ISA_MapSat and ISA_MapGen.
-Started mod with a blank slate.
-15.2 compatible csv collection
-Added the GUI features inc maps, artefact detection and more.
-Fixed MapGen to work with new file names.
-New beam code, separation between measuring points now worked out with meters.
(since the beam doesn\'t erroneously distorts you will now see mapping distortion on isa/Mercator as the beams seem to diverge at poles, polar renders no longer show the erroneous thinning of the beam at poles).
Version 2.0.3
-Fixed crashing on unpause [MODULE]
-Some code optimizations. you code, you learn. [MODULE]
Version 2.0.2
-Fixed beams behaving inverted, gets wider at higher altitude and narrower at low altitudes, data is still valid.[MODULE]
-Fixed grey scale becoming broken with Kerbin\'s negative ocean elevations[MAPGEN]
-Tweaked the default topography gradient, also increased the amount of distinct elevation colours it has available[MAPGEN]
-Fixed the small unsightly graphic error in the scale at the bottom that showed in bigger renders[MAPGEN]
-Added bot#### argument to control the bottom elevation for the gradient[MAPGEN]
-Autoscale is now the default render mode unless bot#### and/or top#### are provided[MAPGEN]
Version 2.0.1
-Corrected an overlooked math.round.[MODULE]
-A few code tweaks.[MODULE]
Version 2.0.0 (I think Kerbin is a big new feature so 2 point o it is.)
-New data gathering code allowing mapping of any planet, including Kerbin, at any altitude, within reason (<2000km) , it will keep separate csv\'s automatically. [MODULE]
-Changed to a matrix of 'beams' for a wider 'beam', beam density and width is dependent on orbital altitude. [MODULE]
-Rewrote parts of mapgen\'s file handling to work with the additional planet files [MAPGEN]
-Added highest elevation and it\'s location to the 'report' after running mapgen [MAPGEN]
-Added a dedicated part model to replace the borrowed antenna [PART]
-Added Mercator projection [MAPGEN]
-Added Azimuthal projection for north and south poles [MAPGEN]
-Added new 'natural' colour scheme based on a topography map of India I found, gives Kerbin texture-like colours based on height [MAPGEN]
-Added requested autoscale feature, currently only works with the normal topography colours, natural is pretty specific for Kerbin and needs some more work [MAPGEN]
-Added meridian gridlines option, should work with any projection [MAPGEN]
-Command line arguments can now be given in any arbitrary order [MAPGEN]
Version 1.4.1
-Fixed mapgen crashing on certain data[MAPGEN]
Version 1.4.0 (First public release)
-Completely overhauled how the satellite determines data to be valid this now also allows mapping higher peaks and plateaus without dipping into collision prone orbits after a few hours of collecting a fresh csv at 3800-4100m with additional debug data I have not seen a single erroneous measurement any more.. This includes preventing all the other known causes for erroneous data (including but not limited to going to map view and auto/quicksave)[MODULE]
-Added grey-scale elevation map option. [MAPGEN]
-Added better more forgiving console prompt argument handling. [MAPGEN]
-Added option to set the maximum elevation for the colour mapping. [MAPGEN]
-Added ability to mix and match render options[MAPGEN]
Version 0.3.0
-Fixed a core problem in the mapper that was the main cause for exceptions [MAPGEN]
-Fixed: Found that ksp doesn\'t always switch N/S or E/W quick enough and outputs coordinates like 181 or -90.5, rewrote part of the program to correct for it when making maps [MAPGEN]
-Added Directory check should now always write to the correct folder inside the kspwin directory regardless of \'start in\' in a shortcut or whatnot [MODULE]
-Fixed: if no csv exists yet one will be created instead of spamming the console with errors. [MODULE]
-Added console output in ksp (alt-F2) when mapping activates or stops. [MODULE]
-Satellite should now only scans when < 3400m to prevent bad data. [MODULE]
-Various small changes and optimizations[MODULE] [MAPGEN]
-Fixed MapGen so instead of crashing it properly checks for the data file first. [MAPGEN]
-The map generator will now create file names including set parameters. [MAPGEN]
Version 0.2.0
-Added the option to render a scale gradient along with the map. [MAPGEN]
-Removed outdated debug console output. [MAPGEN]
-Various optimizations. [MAPGEN]
-The mapping module now only collects data if orbiting the Mun. [MODULE]
Version 0.1.0
-Fixed a typo that caused bad averaging of pixel colours.[MAPGEN]
-Fixed map projection to fill image correctly [MAPGEN]
-Fixed float rounding issue causing bad colour mapping [MAPGEN]
-Added option give any image width to the MapGen[MAPGEN]
Version 0.0.0 (Never public)
-Started learning c# trying to make a mapping satellite.
-Added data collection with a few checks to prevent bad data. [MODULE]
-Added MapGen tool to render colour topography maps with the data.[MAPGEN]
[/spoiler]
[spoiler=MapGen command line arguments/usage]
No arguments Renders 400px wide colour topography map using the NASA/moon colour band <number> Render colour topography map of given width in pixels grey Render grey-scale elevation map natural Uses more natural terrain colours, resulting in a texture-like map scale Render the scale at the bottom. gridw## or gridb## Overlay a white or black meridians grid, ## is the separation between lines in degrees. top#### The elevation with # in meters that is taken as the top of the colour scale bot#### The elevation with # in meters that is taken as the bottom of the colour scale mercator Use Mercator projection instead of default azimuthalNP Create an azimuthal projection of the northern hemisphere azimuthalSP Create an azimuthal projection of the southern hemisphere texture Renders normal textures for use in MapSat texture polar Renders polar textures for use in MapSat
You can mix up the different arguments, order should not matter, if you run into any combination that breaks please let me know.
Do not use 'texture' and 'texture polar' with other arguments, these are tweaked to fit with the drawing in MapSat\'s gui.
e.g.
isa_RAM_MapGen.exe 1600 natural azimuthalNP scale grid10 would generate a 1600 pixel wide, natural coloured, azimuthal polar view of the northern hemisphere with a grid overlay that\'s spaced 10 degrees apart and the scale added to the bottom.
[/spoiler]
Download via Kerbal.net (preferred because this gives me some statistics like number of downloads that dropbox doesn't, thank you)
(Kerbal.net won't take my description updates atm, it does however give you the updated version when you click download)
DropBox mirror
Source
Cheers and happy orbiting,
Innsewerants
Problems?
If you have problems and want to help me fix them (It\'s my first c# learning project after all) please do the following:
if it\'s the module in ksp:
Check the console alt-f2 and if it\'s spamming something there. If so send me what errors is spamming so I can find out what\'s happening.
If it\'s the mapgen
Run from command line so you can see if it spits out a file not found or if it crashes what the exception is it gives, these usually show me the way to what\'s wrong.
[edit]fixed some information, spell checked my heinous errors that crept in from being exhausted lol.[/edit]












Reply With Quote
, those maps look great.

.
