Jump to content

[PLUGIN+PARTS][0.23] SCANsat terrain mapping


damny

Recommended Posts

Found a bit of a problem in built 3 with mapping in the background while you do something else.

What I did was start a new game and on Day 1 I created 1 probe for every system, except Jool got 2 because there's a lot of work there. Then I sent them on their way, as it happened in the order Moho, Jool, Eeloo, Duna, Dres, Eve. So after the Moho probe, I was frequently jumping around between them all either doing their ejection burns, midcourse burns, getting captured, setting up the proper orbit, etc. Each probe had 3 instruments: the high resolution altimetry/slope thingy, the anomaly thingy, and a large Kethane scanner. All orbits were chosen from that post about ISA, using the lowest orbit listed that still allowed a 100x warp.

For the most part, all went OK. However, there were a few times I had probes busily mapping and then jumped to other ships which were some days out from their next maneuver, and warped 10Kx or 100Kx until maneuver time. Then I'd do the maneuver and jump back to whichever probe was mapping at the time. This is when I discovered that at max warp, the background coverage got a bit spotty.

Here's what it did to Moho:

10663960166_1234806041_b.jpg

The interruption occurred where you see the vertical line of squares and the whole gap in the pattern surrounding them.

And here's what happened to Ike:

10663959514_aff8e1fbf4_b.jpg

All the vertical dotted lines of missed areas happened during the high-warp interruption.

The Moho situation wasn't very hard to fix because Moho doesn't rotate enough to notice, so any orbit will eventually mapt the whole thing. With Ike, however, I had to do major fiddling with the orbit to get my track back to where the interruption caused gaps, so it ended up taking an extra week of gametime to finish this place.

HOWEVER, on the whole, the mod worked excellently. I think this was a fairly severe test of its capabilities and it really didn't do too badly. Most folks probably wouldn't have so much stuff happening at once.

Link to comment
Share on other sites

I wrote that in the first post in this thread - it's stable up to 1000x time warp for me. It's a function of your frame rate and your time warp multiplier: One update per frame, for the position it's currently at. For playable frame rates and time warp up to 1000x, this generally results in a mostly spotless map because ground speed of a satellite in range of these sensors is so low that they move so little that subsequent scans generally overlap.

I'm changing the scanning logic for the next build though, and there will at least be the option to accurately follow the satellites during time warp. "Option", because this requires quite a bit of processing at high time warp multipliers, and I'm not sure yet how well I can tune this so that it won't be frame drop hell on slower computers. I don't want to tune it so that it doesn't kill fps on pocket calculators if that means players on faster systems lose accuracy, because even if your computer is slow, you don't need to have this on for very long.

For reference, typical real world mapping satellites retrace their path every few weeks, and have revisit times in the range of days because they can align their sensors. SCANsat satellites can't align their sensors (I can't think of a good way to include remote imaging controls that are not boring) but this is compensated by their relatively large footprints. As a real world example, SPOT can angle the sensors resulting in up to around 10 degrees difference in longitude around the equator. That's exactly the width of SCANsat's low resolution altimetry footprint (but latitude affects these numbers differently). Either way, if you could 100k time warp the real world, a single typical mapping satellite would cover the entire Earth within 10 to 30 seconds. So that's kind of the benchmark. Say you decide to send something to Jool. It should not take a signfiicant part of the 100k time warp you're going to do for that until your existing satellites have completed their maps if they're in any kind of suitable orbit. My thinking is that because of this, even if it's slow to follow them accurately, the option to do it will not be useless even on slow systems.

And then, of course, this lets me differentiate the sensors more by e.g. making the high res altimetry sensor have a smaller footprint, or making the footprint depend on altitude, and make it more important to choose the right orbit. Again my thinking is that if you do it right it should not take long, but if you don't do it right then the consequences should be a little worse than they are in build 3.

Edit: For debugging, I made satellites paint their tracks in pink on the minimap in the build I'm currently working with:

o8XSEV1.png

The pink stuff gets cleared by the red scan line, so all the pink in this image is from one second of 100k time warp with four active satellites (#2 is a rover sitting still at the KSC, so I can time warp; and there also are a few other satellites in different SoIs). The only thing is, with this kind of accuracy, and the actual calculation happening once per second, I get a noticeable frame drop once per second at high time warp (10k+). So that's why there'll probably be an option to turn it off, or rather, limit it to a resolution that'll work for 1000x.

Edited by damny
added image
Link to comment
Share on other sites

I wrote that in the first post in this thread - it's stable up to 1000x time warp for me. It's a function of your frame rate and your time warp multiplier: One update per frame, for the position it's currently at. For playable frame rates and time warp up to 1000x, this generally results in a mostly spotless map because ground speed of a satellite in range of these sensors is so low that they move so little that subsequent scans generally overlap.

-snip-

Pretty awesome you give us the choice to enable this 'Overdrive' mode.

The easier option would have been: "Nope, too high performance impact, not gonna happen, deal with it".

I haven't run into the issue, because I never warped higher than 1k yet, I used the Kerbal Alarmclock to kill timewarp for course corrections & other stuff. (That might be an intermediate solution forGeschosskopf and drtedastro)

Along with this "Givin' it all she got" mode (*cough*, extra warp, Enterprise, get it? *cough*), have you discovered a way to keep SCANsat active in KSC-view or when focussed on non-SCAN enabled vessels?

Link to comment
Share on other sites

have you discovered a way to keep SCANsat active in KSC-view or when focussed on non-SCAN enabled vessels?

Technically it's easy, I've just not treated it as a priority because I figure that this way, if something goes terribly wrong, it'll only go wrong once you switch to a SCAN vessel.

Link to comment
Share on other sites

@ Danny

Thanks for the in-depth explanation. And of course thanks for this wonderful mod, too :). As others have said, I think this works well enough to commit it to a major, long-term mission. Feel free to break that, though. Easy come, easy go. I can always blame it on a supernova and besides, I usually have engineer's remorse about my projects anyway so am usually looking for an excuse to start over and do it better :).

Link to comment
Share on other sites

@ Danny

Thanks for the in-depth explanation. And of course thanks for this wonderful mod, too :). As others have said, I think this works well enough to commit it to a major, long-term mission. Feel free to break that, though. Easy come, easy go. I can always blame it on a supernova and besides, I usually have engineer's remorse about my projects anyway so am usually looking for an excuse to start over and do it better :).

His name is Damny... Heh....

Link to comment
Share on other sites

Seriously, Damny is just genius. The speed of his SINGLE development is just insane. I'm writing on a mapping plugin too, with less features. Only single scanning and only with biome and height maps and I'm not even at the point where the map is drawn.

Also looking at his code to get some "inspiration", but I code like a one week old monkey compared to him.

Hail to damny!

Link to comment
Share on other sites

Awesome!

Hey damny, would it be possible to output the generated PNG at a higher resolution than it's displayed in game? Or include settings to define the size of the PNG?

Also, would it be possible to output the anomaly and flag markers to the PNG file? And possibly include an option to choose to do so or not?

Link to comment
Share on other sites

Started working on the settings screen that everybody wanted to adjust the cross marks.

mfBfTvi.png

I like that you can turn scanning off for the worlds you've covered, and also that it tells you how covered they are. Good work, sir!

Link to comment
Share on other sites

CONGRATULATIONS Damny! You made it to the very first page of Modding Mondays!

(I TOLD you this thing would explode with attention)

I didn't tip them off, since I think it's a bit premature. This still being in the dev-forum and in alpha.

I do realize I was the one who advocated an early 'full' release, and if you would have released this result would have probably been the same.

But as long that hasn't happened OFFICIAL-Community-Wide attention might be a bit overwhelming.

Also: They redirect to your first post (of course), and you might want to update the feature list since a lot has changed.

The 'customer-care' side of this project is going to suck up a lot more time now. I'll try to help out with answering some questions if you like.

Edited by OrtwinS
typos, formatting, extra's
Link to comment
Share on other sites

The actual biome map from the game is very colourful, with lots of brightly coloured blobs of biome. Unfortunately, there is a small problem: There is a function in the API that seems to be made for finding the biome at a given location, but I couldn't figure out how to use it without printing debug messages to the screen. So I implemented my own interpretation of "closest map color", meaning biome edges can be inaccurate on these maps.

I use the VOID addon that has a display for current biome. There's a comment on a biome related function in the tools.cs file that seems pertinent:

// Toadicus edit: Added re-implementation of the CBAttributeMap.GetAtt function that does not fire a debug message to the game screen.

Perhaps this may be useful to you in some way? Seems the author has reused code from other addons with permission, so would probably be open to a discussion if you wanted to go that route.

VOID on Spaceport: http://kerbalspaceprogram.com/void/

VOID on forums: http://forum.kerbalspaceprogram.com/threads/54533-0-22-VOID-Vessel-Orbital-Informational-Display

Also, just to echo everyone else, your work is impressive. This is a fantastic addon.

Link to comment
Share on other sites

Well bloody hell .. First we got the self-destruct of the obsolete part, not to mention you can just keep it in the already flying ships no problem.

Then we have the free-fps meter xD ..

Finally damny asked "So guys what you want for symbols?", people responded "this-or that-or that other"... What does damny do? A settings page where you can choose the one you want...

Crazy stuff damny .. hmm now i wondered if you should name your thread like this "Damny's Crazy stuff" :cool:

Link to comment
Share on other sites

Finally damny asked "So guys what you want for symbols?", people responded "this-or that-or that other"... What does damny do? A settings page where you can choose the one you want...

To be honest I'm not sure what part of that discussion was serious - I just figured if we're joking then actually doing it is funny, and if we're not then it's a genuine concern that's easily addressed...

Link to comment
Share on other sites

First go with it this evening - damn, only thing was power use but I got both sats into polar orbits with better sun exposure and it was fine. No issues to report - it's brilliant. Got Kerbin scanned for biome, altimeter and slopes very quickly. With landings made on both the Mun and Minmus I was hoping to find some more landing sites, and now I can get a SCANsat up and scope them properly.

Feel sorry for Insewerants - the excellent ISA project has been dead in the water with the 0.22 update and his own personal issues, but tip of the hat, damny, this is a mighty fine replacement.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...