Jump to content

[1.8.x] Precise Maneuver editor


Morse
 Share

Recommended Posts

@Morse Precise Maneuver appears to be nullreffing a lot sometimes:

 
NullReferenceException: Object reference not set to an instance of an object
  at Targeting+Sample.Borrow (.Conic o1, .Conic o2, Double v) [0x00000] in <filename unknown>:0
  at Targeting+Interval.FindRoot () [0x00000] in <filename unknown>:0
  at Targeting.Intercepts (.Conic orbit1, .Conic orbit2, Int32 samples) [0x00000] in <filename unknown>:0
  at Orbit._FindClosestPoints (.Orbit p, .Orbit s, System.Double& CD, System.Double& CCD, System.Double& FFp, System.Double& Darn it, System.Double& SFp, System.Double& SFs, Double epsilon, Int32 maxIterations, System.Int32& iterationCount) [0x00000] in <filename unknown>:0
  at (wrapper delegate-invoke) Orbit/FindClosestPointsDelegate:invoke_int__this___Orbit_Orbit_double&_double&_double&_double&_double&_double&_double_int_int& (Orbit,Orbit,double&,double&,double&,double&,double&,double&,double,int,int&)
  at PatchedConics._CheckEncounter (.Orbit p, .Orbit nextPatch, Double startEpoch, .OrbitDriver sec, .CelestialBody targetBody, .SolverParameters pars, Boolean logErrors) [0x00000] in <filename unknown>:0
  at (wrapper delegate-invoke) PatchedConics/CheckEncounterDelegate:invoke_bool__this___Orbit_Orbit_double_OrbitDriver_CelestialBody_PatchedConics/SolverParameters_bool (Orbit,Orbit,double,OrbitDriver,CelestialBody,PatchedConics/SolverParameters,bool)
  at PatchedConics._CalculatePatch (.Orbit p, .Orbit nextPatch, Double startEpoch, .SolverParameters pars, .CelestialBody targetBody) [0x00000] in <filename unknown>:0
  at (wrapper delegate-invoke) PatchedConics/CalculatePatchDelegate:invoke_bool__this___Orbit_Orbit_double_PatchedConics/SolverParameters_CelestialBody (Orbit,Orbit,double,PatchedConics/SolverParameters,CelestialBody)
  at PatchedConicSolver.CheckNextManeuver (Int32 nodeIdx, .Orbit nodePatch, Int32 patchesAhead) [0x00000] in <filename unknown>:0
  at PatchedConicSolver.CheckNextManeuver (Int32 nodeIdx, .Orbit nodePatch, Int32 patchesAhead) [0x00000] in <filename unknown>:0
  at PatchedConicSolver.CheckNextManeuver (Int32 nodeIdx, .Orbit nodePatch, Int32 patchesAhead) [0x00000] in <filename unknown>:0
  at PatchedConicSolver.CheckNextManeuver (Int32 nodeIdx, .Orbit nodePatch, Int32 patchesAhead) [0x00000] in <filename unknown>:0
  at PatchedConicSolver.UpdateFlightPlan () [0x00000] in <filename unknown>:0
  at ManeuverNode.OnGizmoUpdated (Vector3d dV, Double ut) [0x00000] in <filename unknown>:0
  at KSPPreciseManeuver.NodeManager.UpdateNodes () [0x00000] in <filename unknown>:0
  at KSPPreciseManeuver.PreciseManeuver.Update () [0x00000] in <filename unknown>:0 

Not quite sure on the steps needed to reproduce it. I was messing with my MinMus transfer that was set by Astrogator and somewhere along the way the game started to 'have trouble' with running smoothly.

If it matters, Output log: https://www.dropbox.com/s/r61lgadiw8qalzm/output_log.zip?dl=0

Edit: The flood of the above Nullref stopped once the game said "[Orbit Targeter]: Dropping target because it is the current main body". Maybe that's of use?

Edited by Jognt
Link to comment
Share on other sites

I'll look into it, but it's probably some bug inside KSP. When I update the maneuver, I just provide the new dV and ut. If some dV/ut combination breaks KSP, there is not much I can do about it, all of them should be perfectly valid.

Link to comment
Share on other sites

1 hour ago, Morse said:

I'll look into it, but it's probably some bug inside KSP. When I update the maneuver, I just provide the new dV and ut. If some dV/ut combination breaks KSP, there is not much I can do about it, all of them should be perfectly valid.

Anything I can do locally to help figuring out where it goes wrong?

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
12 hours ago, Morse said:

Does it prevent the mod from launching or something?

No, and I'm not sure whether it necessary to fix such issues. I'm getting this when run KSP in attachable/debuggable mode using EXE from Unity binaries.

Link to comment
Share on other sites

1.7.3 works well enough, but I've been having input locks whenever I get near the end of a maneuver node, which means I can't turn off the thrust at all. Really annoying, but idk whether it's because of KSP or this mod.

Link to comment
Share on other sites

  • 2 months later...

@Morse - Thanks so much for updating this to 1.8! PreciseManuever is one of the first mods I load into any game, because I hate manually circularizing orbits. Love the other features too, and especially the Gizmo, but I'll be honest, more than anything I use it to precision maneuver craft into LKO. I appreciate having a code-updated version.

Link to comment
Share on other sites

  • 3 months later...

I've sort of gotten used to watching out for it, but every once and a while I forget to check and it catches me (like just now :-)) that the display of the periapsis for the next encounter shows the absolute value - that is, it omits any negative sign. I'll have plotted a nice encounter trajectory with the periapsis at a reasonable altitude, but then as soon as I enter the SOI I find I'm on an impact trajectory because that 100km (or whatever) periapsis I thought I had set up turned out to be -100km. :-( BTW, thanks for the very useful mod.

 

Link to comment
Share on other sites

  • 1 month later...
21 minutes ago, Morse said:

Is the update needed? I never launched 1.9, so I don't really know, but no bugreports so far.

I've been using it all along in 1.9 and 1.9.1. No observed problems (other than the forum flaking out on my first attempt to post this; sorry if it double posts.)

Link to comment
Share on other sites

On 4/9/2020 at 6:24 PM, rmaine said:

I've been using it all along in 1.9 and 1.9.1. No observed problems (other than the forum flaking out on my first attempt to post this; sorry if it double posts.)

Same here - no issues, even with 65+ other mods running. (in 1.9.1.) Also no issues when using with various Kopernicus planet packs in 1.8.1.

Edited by panarchist
Link to comment
Share on other sites

  • 2 weeks later...

I would love to know what I am doing wrong then I have it installed with my other mods but there is no ui appearing in the map mode and no icon located on the right to enable the ui assuming it ever used one. Any suggestions as to how to get this running would be great I also can not find it in ckan like marty_i stated  so again any help would be appreciated. I am also running the following mods if anyone sees an obvious conflict or something that I am missing to make it work. I tried removing them one at a time to see if I could get the interface to start but I ended up breaking the game instead making it so it would not load at all fortunately I backed up the directory so I just restored it to make the game work again but no interface still.

000_AT_Utils
000_ClickThroughBlocker
000_USITools
001_ToolbarControl
CommunityCategoryKit
CommunityResourcePack
ConfigurableContainers
ContractConfigurator
ContractPacks
EasyVesselSwitch
ExtraplanetaryLaunchpads
Firespitter
FP_DPSoundFX
GroundConstruction
Hangar
JSI
KAS
KIS
KSP-AVC
KSPModFileLocalizer.dll
KSPPreciseManeuver-master
LETech
MagicSmokeIndustries
ModuleManager.4.1.3.dll
NavyFish
OrbitalMaterialScience-master
PlanetaryBaseInc
REPOSoftTech
Science-Full-reward-master
SETIgreenhouse
SpaceY-Expanded
SpaceY-Lifters
Squad
SquadExpansion
StageRecovery-master
ThunderAerospace
Trajectories
TriggerTech
UmbraSpaceIndustries

Link to comment
Share on other sites

JohnAC, CKAN catches so many problems that I sure recommend using it. For example, I don't see "zero miniAVC" in your mod list above. CKAN would have installed that as a dependency. It's a sort of odd "mod" in that all it does is delete the broken miniAVC that's otherwise in a lot of other mods. I couldn't testify as to what effect that might have, but it likely isn't good. Who knows what other problems it might help you with.

I just finished making the same explanation in another thread, but you can tell CKAN to accept mods listed as compatible with other versions of KSP than the one you are running. That of course has the potential problem of allowing you to install mods that actually are not compatible, but it also allows you to install ones that work fine but just don't have their compatibility data updated. In the CKAN settings menu there is a "compatable KSP versions" tab. Go there and select both 1.8 and 1.9. Then it should allow you to install precise maneuver.

P.S. I'm fighting with a bug that sure appears to relate to Trajectories, but no solid conclusion yet.

Link to comment
Share on other sites

5 hours ago, JohnAC said:

I would love to know what I am doing wrong then I have it installed with my other mods but there is no ui appearing in the map mode and no icon located on the right to enable the ui assuming it ever used one. Any suggestions as to how to get this running would be great I also can not find it in ckan like marty_i stated  so again any help would be appreciated. I am also running the following mods if anyone sees an obvious conflict or something that I am missing to make it work. I tried removing them one at a time to see if I could get the interface to start but I ended up breaking the game instead making it so it would not load at all fortunately I backed up the directory so I just restored it to make the game work again but no interface still.

@JohnAC - you downloaded the source rather than the release, and installed that ("KSPPreciseManeuver-master") in your GameData folder. That's why it's not working - it's only the source without a compiled dll. Download the release and extract the "PreciseManeuver" folder into GameData (and delete the KSPPreciseManeuver-master folder) and you'll be good to go.

 

Edited by panarchist
Link to comment
Share on other sites

18 hours ago, panarchist said:

@JohnAC - you downloaded the source rather than the release, and installed that ("KSPPreciseManeuver-master") in your GameData folder. That's why it's not working - it's only the source without a compiled dll. Download the release and extract the "PreciseManeuver" folder into GameData (and delete the KSPPreciseManeuver-master folder) and you'll be good to go.

 

That worked.  Thank you for the help I very much appreciate it. I would say I will try to avoid making that mistake in the future but thanks to your information I just noticed that I have the "master" of 3 other files in my list as well. I guess I better check to see if they are source files too not that I really know how to tell the difference.  The mod I am using to check the versions of my installed mods is called "KSP-AVC" and it seems to be directing me to download the wrong files. 

 

Again thank you for the help.

Edited by JohnAC
Link to comment
Share on other sites

1 hour ago, JohnAC said:

The mod I am using to check the versions of my installed mods is called "KSP-AVC" and it seems to be directing me to download the wrong files. 

AVC will direct you to the website, noted in the .version file of the mod. Many mod creators will put their github repository there but not always the release section of it but the code section, which presents you with a convenient download button. BEWARE: This will download the source code of this repository, not the compiled mod. You have to navigate on your own to the release section and download the actual mod there.
If you are slightly confused now, you may want to check out my tutorial on this topic, especially the chapter about downloading the correct mod version. I've added a few screenshots there to make everything easy to follow :) 

 

Edited by 4x4cheesecake
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...