maja Posted July 1, 2018 Author Share Posted July 1, 2018 20 hours ago, Starwaster said: oh you know what, I forgot that I was also running a customized BV that rotates the rover... I had totally forgotten I did that. I thought it was World Stabilizer doing it Do you have that piece of code somewhere public? I would like to compare it with my changes. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted July 1, 2018 Share Posted July 1, 2018 6 hours ago, maja said: Do you have that piece of code somewhere public? I would like to compare it with my changes. Don't think I pushed it to my branch on github. I'll paste it here this evening or push the whole branch for perusal. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted July 2, 2018 Share Posted July 2, 2018 17 hours ago, maja said: Do you have that piece of code somewhere public? I would like to compare it with my changes. This is in BonVoyageModule.cs The five lines that actually handle the orientation come from HyperEdit. The commented out section was something of my devising and it probably should have worked better I think but I was having trouble getting the vectors right so I went with something a little more proven. Because it's using the terrain normal it should handle things like hillsides if they're shallow and not too uneven but with stock BV the vehicle probably can't get to really steep or uneven terrain as it probably pathfinds around them. The commented out section public override void OnStart(PartModule.StartState state) { if (HighLogic.LoadedSceneIsEditor) return; GameEvents.onVesselGoOffRails.Add(OnVesselOffRails); // wayPoints = PathUtils.DecodePath (pathEncoded, this.vessel.mainBody); } private void OnVesselOffRails(Vessel v) { if ((object)v == null || v.isEVA) return; double altitude = GeoUtils.TerrainHeightAt(v.latitude, v.longitude, vessel.mainBody); if (v.altitude < altitude + v.heightFromTerrain) v.altitude = altitude + v.heightFromTerrain; try { Quaternion rotation; Vector3d from = vessel.vesselTransform.up; Vector3d to = GeoUtils.GetTerrainNormal(vessel.mainBody, vessel.latitude, vessel.longitude, altitude); rotation = Quaternion.FromToRotation(from, to); vessel.SetRotation(rotation); /* Quaternion rotation; Vector3d forward = vessel.vesselTransform.forward; Vector3d up; if (vessel.Splashed) up = vessel.mainBody.GetSurfaceNVector(vessel.latitude, vessel.longitude); else up = GeoUtils.GetTerrainNormal(vessel.mainBody, vessel.latitude, vessel.longitude, vessel.altitude); rotation = Quaternion.LookRotation(forward, up); //rotation.SetLookRotation(forward); vessel.SetRotation(rotation); */ } catch (Exception e) { } finally { } vessel.UpdateLandedSplashed(); } Quote Link to comment Share on other sites More sharing options...
maja Posted July 2, 2018 Author Share Posted July 2, 2018 (edited) 7 hours ago, Starwaster said: This is in BonVoyageModule.cs The five lines that actually handle the orientation come from HyperEdit. The commented out section was something of my devising and it probably should have worked better I think but I was having trouble getting the vectors right so I went with something a little more proven. Because it's using the terrain normal it should handle things like hillsides if they're shallow and not too uneven but with stock BV the vehicle probably can't get to really steep or uneven terrain as it probably pathfinds around them. Many thanks, that terrain normal is probably what I missed. I used different vector to rotate and the result was overrotation. I test it later, because I'm at work now. Edited July 2, 2018 by maja Quote Link to comment Share on other sites More sharing options...
Jaeleth Posted July 15, 2018 Share Posted July 15, 2018 Hi. I recently installed Bon Voyage. I play KSP 1.2.2 with RO/RSS I tried Bon Voyage with a rover of mine I sent to Mars. The rover has enough energy to drive forever, 2 small solar panels, 1 nuke, pod is rovermate and 6 small wheels. Bon Voyage doesn't starts and says I should get more panels or nukes. But the energy is always maxed out... Even when I drive at full throttle. Any clues? Quote Link to comment Share on other sites More sharing options...
vardicd Posted July 16, 2018 Share Posted July 16, 2018 8 hours ago, Jaeleth said: Hi. I recently installed Bon Voyage. I play KSP 1.2.2 with RO/RSS I tried Bon Voyage with a rover of mine I sent to Mars. The rover has enough energy to drive forever, 2 small solar panels, 1 nuke, pod is rovermate and 6 small wheels. Bon Voyage doesn't starts and says I should get more panels or nukes. But the energy is always maxed out... Even when I drive at full throttle. Any clues? I note that in the known issues spoilers tab on the first page, it says: Module solar power calculation won't work if Sun is not central body of the system (change in progress, really) Now I know you're playing with Real Solar System mod, and, as I've never used that mod myself, I presume the sun is still the central body of the system, but it's entirely possible that somehow in the code to change Kerbol to Sol, the code is borking the Bon voyage code that allows it to 'see' if the rover is getting enough power. An alternative suggestion would be that if the solar panels and nuke power you're using isn't stock, it could very well be from a mod that bon voyage isn't recognizing, and there for thinks your rover has no power. Quote Link to comment Share on other sites More sharing options...
maja Posted July 16, 2018 Author Share Posted July 16, 2018 8 hours ago, Jaeleth said: Hi. I recently installed Bon Voyage. I play KSP 1.2.2 with RO/RSS I tried Bon Voyage with a rover of mine I sent to Mars. The rover has enough energy to drive forever, 2 small solar panels, 1 nuke, pod is rovermate and 6 small wheels. Bon Voyage doesn't starts and says I should get more panels or nukes. But the energy is always maxed out... Even when I drive at full throttle. Any clues? 1. Check, if you have the right version of BV (0.12.0) for KSP 1.2.2. 2. I don't play RO/RSS, so I don't know if there isn't changes in solar panels and generators modules. Check the numbers in BV panel and test a rover on the runway. You must move a bit after deployment, to change internal state of the rover to "flight". 3. It's the very old version of BV you have and not done by me. You are on your own here. Sorry. 11 minutes ago, vardicd said: I note that in the known issues spoilers tab on the first page, it says: Module solar power calculation won't work if Sun is not central body of the system (change in progress, really) Problems where the Sun isn't a central body is for dual star systems. BV asumes, that star and source of light is the first body in the list of celestial bodies. I have more pressing issues to fix than this and it will need probably some cooperation with Kopernicus authors, because that mod has info about parent star readily available. Quote Link to comment Share on other sites More sharing options...
maja Posted July 28, 2018 Author Share Posted July 28, 2018 (edited) KSP 1.4.5 is finally out and I have vaccation for the next two weeks right now. I was waiting for the update to push the new version of BV, but it must wait for a few weeks, because I'm out of country. So please, be patient. I'm still here and working on this mod. Well, last test in 1.4.4 ended with distorted rover. Current tests are really interesting and I hope, that KSP 1.4.5 will behave better to my rovers Edited July 28, 2018 by maja Quote Link to comment Share on other sites More sharing options...
DougS2K Posted August 1, 2018 Share Posted August 1, 2018 Will this mod work with 1.4.3? I've installed it and tried it but it doesn't seem to be working. Not sure if it's a mod conflict or just not supported on 1.4.3. Quote Link to comment Share on other sites More sharing options...
maja Posted August 1, 2018 Author Share Posted August 1, 2018 59 minutes ago, DougS2K said: Will this mod work with 1.4.3? I've installed it and tried it but it doesn't seem to be working. Not sure if it's a mod conflict or just not supported on 1.4.3. What do you mean not working? It works in 1.4.x. With some hiccups, because of KSP changes, but works. Quote Link to comment Share on other sites More sharing options...
DougS2K Posted August 1, 2018 Share Posted August 1, 2018 2 hours ago, maja said: What do you mean not working? It works in 1.4.x. With some hiccups, because of KSP changes, but works. Hmm ok then it's something on my end. I've tried this on two different rovers and while I can make a waypoint and have the mod activate, my rovers won't actually move. The mod seems to work in every regard except the actual movement part which is strange. Quote Link to comment Share on other sites More sharing options...
4x4cheesecake Posted August 1, 2018 Share Posted August 1, 2018 (edited) @DougS2K You know that the rover will not drive while you watch it? Switch to another vessel, the KSC or the tracking station and the rover should move (and stop as soon as you switch back to it again) Edited August 1, 2018 by 4x4cheesecake Quote Link to comment Share on other sites More sharing options...
DougS2K Posted August 1, 2018 Share Posted August 1, 2018 2 minutes ago, 4x4cheesecake said: @DougS2K You know that the rover will not drive while you watch it? Switch to another vessel, the KSC or the tracking station and the rover should move (and stop as soon as you switch back to it again) Well if that's the case then I am just an idiot. haha I thought it would start to move right from the get go and didn't realize I have to actually switch from the vessel. My bad and thanks for pointing that out. Quote Link to comment Share on other sites More sharing options...
4x4cheesecake Posted August 1, 2018 Share Posted August 1, 2018 Just now, DougS2K said: Well if that's the case then I am just an idiot. haha I thought it would start to move right from the get go and didn't realize I have to actually switch from the vessel. My bad and thanks for pointing that out. I did the same mistake so this was obviously the first thing I had to think of when I read your post Quote Link to comment Share on other sites More sharing options...
maja Posted August 2, 2018 Author Share Posted August 2, 2018 4 hours ago, DougS2K said: Well if that's the case then I am just an idiot. haha I thought it would start to move right from the get go and didn't realize I have to actually switch from the vessel. My bad and thanks for pointing that out. Did you read "How to" section in the OP? Quote Link to comment Share on other sites More sharing options...
DougS2K Posted August 2, 2018 Share Posted August 2, 2018 12 hours ago, maja said: Did you read "How to" section in the OP? The worst part is that I actually did. haha I just didn't realize I had to switch vessels in order for it to move. It's a little unclear that movement won't happen until then and I assumed it was like Mechjeb's implementation, in which you could see it move while it's still the active vessel. That being said, this mod is fantastic and I'm a little disappointed it took me this long to come across it. This mod would of saved a lot of time with rovers but I still have places to explore so it will get it's use now. Quote Link to comment Share on other sites More sharing options...
maja Posted August 2, 2018 Author Share Posted August 2, 2018 1 minute ago, DougS2K said: The worst part is that I actually did. haha I just didn't realize I had to switch vessels in order for it to move. It's a little unclear that movement won't happen until then and I assumed it was like Mechjeb's implementation, in which you could see it move while it's still the active vessel. That being said, this mod is fantastic and I'm a little disappointed it took me this long to come across it. This mod would of saved a lot of time with rovers but I still have places to explore so it will get it's use now. I have an idea how to communicate that switch to another scene to the player. I hope, that I remember to implement it when I return from vacation Quote Link to comment Share on other sites More sharing options...
whitespacekilla Posted August 13, 2018 Share Posted August 13, 2018 @Starwaster any chance you can push your branch of BV where you correct the rover's rotation to Github? Your snippet depends on "GeoUtils.GetTerrainNormal" which I believe you also implemented (it's not in any version of BV I can find online) and a PQS/terrain pleb like me is going to have a really hard time getting this right. Best (only?) example of calculating terrain normal I can find is https://github.com/CYBUTEK/KerbalEngineer/blob/master/KerbalEngineer/Flight/Readouts/Surface/Slope.cs line 68. Don't know if it'll help @maja correct it in the official, too, but it might. Quote Link to comment Share on other sites More sharing options...
Starwaster Posted August 15, 2018 Share Posted August 15, 2018 On 8/13/2018 at 5:26 PM, whitespacekilla said: @Starwaster any chance you can push your branch of BV where you correct the rover's rotation to Github? Your snippet depends on "GeoUtils.GetTerrainNormal" which I believe you also implemented (it's not in any version of BV I can find online) and a PQS/terrain pleb like me is going to have a really hard time getting this right. Best (only?) example of calculating terrain normal I can find is https://github.com/CYBUTEK/KerbalEngineer/blob/master/KerbalEngineer/Flight/Readouts/Surface/Slope.cs line 68. Don't know if it'll help @maja correct it in the official, too, but it might. I pushed it here: https://github.com/Starwaster/KSP-BonVoyage/tree/Battery-Support And updated it. I'm not sure what state the rotation correction is in; I was screwing with it and it doesn't work the way I had it working before - the working code is still in there in one of the commented out bits or in one of the commits. Also, there's other things in that that are not stable that I was experimenting with so if you build that code it can be buggy. Things like amphibious support for Lynx parts and it has on occasion broken my saves plunging vehicles to the bottom of the ocean requiring me to edit the save to fix it. Still, have at it if you want Quote Link to comment Share on other sites More sharing options...
whitespacekilla Posted August 15, 2018 Share Posted August 15, 2018 Thanks, I'll take a look tonight! Your fork first caught my attention with the battery support, when I find out you had other little gems floating around in local branches I just got more and more curious and the terrainnormal was too specific an ask to pass up ;-) Quote Link to comment Share on other sites More sharing options...
weregamer Posted September 4, 2018 Share Posted September 4, 2018 This might be a variant on "stuck in landscape". I built a test rover on Kerbin, and sent it into the mountains to play. It's not there yet, still on the plains, but if I switch to it it, well it explodes! Separates explosively into two pieces in the middle, they fly up and come down and disintegrate. I am running 1.4.1 with a pretty short list of mods. Of them, only MechJeb affects rovers. I don't think I even have any parts with fuel on them for IFS to affect. I vaguely recall, back when I last played KSP a few years ago and BonVoyage was new, there was a similar problem that came from bad luck on sloped terrain, and the solution was basically never to switch to the rover when it was "moving". Quote Link to comment Share on other sites More sharing options...
maja Posted September 4, 2018 Author Share Posted September 4, 2018 @weregamer Yes, it's the most probably a stuck rover. Sometimes the height of the terrain reported by KSP isn't right. You can switch to a moving rover. The height is updated every time the rover moves. This mod may help to lift the rover up. Quote Link to comment Share on other sites More sharing options...
siteonfly Posted September 16, 2018 Share Posted September 16, 2018 @maja Any reason why fuel cell not included in CalculateOtherPower()? It is very helpfull in early game. Quote Link to comment Share on other sites More sharing options...
maja Posted September 16, 2018 Author Share Posted September 16, 2018 Just now, siteonfly said: @maja Any reason why fuel cell not included in CalculateOtherPower()? It is very helpfull in early game. BV doesn't have catch up process to handle a fuel consuption. I assume that will happen when I do planned overhaul, because I want also a naval version of BV. Quote Link to comment Share on other sites More sharing options...
siteonfly Posted September 16, 2018 Share Posted September 16, 2018 18 minutes ago, maja said: BV doesn't have catch up process to handle a fuel consuption. I assume that will happen when I do planned overhaul, because I want also a naval version of BV. Oh, I understand, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.