# Cannon

Members

203

31 Excellent

## Profile Information

Spacecraft Engineer

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. ## [1.11.2][1.12.1+]Ore to Parts - Craft parts with ore / duplicate parts

Sorry for a late reply, I've been away for a few months due to college and stuff. I tested it with your latest release and now it reduces ship's monopropellant properly when transfering it to jetpack. Good work

3. ## KRPC landing and orbit autopilot

yeah just fixed it xD
4. ## KRPC landing and orbit autopilot

So, as the tittle says, I made an autopilot in krpc(java) that gets to desired orbit and lands boosters by itself.
5. ## Converting magnitude to vector components?

I finally figured it out. The problem was, I was taking my ship's current orientation as a prograde value, but it's never perfectly facing prograde in-game, there are always some micro movements and variations, that's why I couldn't get exact vectors. Now I took the actual prograde vectors and converted them to heading and pitch like this: progradePitch = asin(-(progradeY)) progradeHeading = atan2(progradeX, progradeZ) And then just used the formulas I mentioned in my last comment and got velocity vectors with 100% accuracy

8. ## Converting magnitude to vector components?

I tried using those 2 formulas but it's not giving me the correct results X=(magnitude)*(cos(heading)) OR X=(magnitude)*(cos(pitch)) OR x=(magnitude)*sin(heading)*cos(heading) OR x=(magnitude)*sin(heading)*cos(pitch) OR x=(magnitude)*sin(pitch)*cos(heading) OR x=(magnitude)*sin(pitch)*cos(pitch) I've tried all of the above combinations and none of them produced any of the correct numbers [-72.25886975259107, -2209.998264874299, 1.6282022342777325]
9. ## Converting magnitude to vector components?

Don't know if this is the right place to ask this, but I couldn't find any better. A spacecraft is travelling at given velocity. Velocity vectors are = [-72.25886975259107, -2209.998264874299, 1.6282022342777325]. When I calculate the magnitude of it, I get 2211.18m/s. That's easy to do. But what if I have to calculate all 3 vector components when I only have magnitude? Spacecraft bearing/heading is 90.389° so it's heading south-east, and its pitch is -1.725° which means it's going slightly "below the horizon"/towards the ground. I tried this formula: X=(magnitude)*(cos(heading)) to get one of the vectors but I know solution is incorrect because it's not equal to any of the vectors I wrote at the start. X=(2211.18)*(cos(90.389)=-15.01 . I also tried a formula from here which goes x=ρsinφcosθ. I used magnitude (2211.18m/s) as "ρ" value, and 90° for both θ and φ, since direction is 90° south of north pole, and 90° towards east too. So, x=2211.18*sin(90)*cos(90)*=-15, the result was -15, which still doesn't match any of the vector components [-72.25886975259107, -2209.998264874299, 1.6282022342777325] So how do I calculate it then? I'm trying to create something with krpc mod, and a certain function requires velocity vectors as input, instead of velocity's magnitude (2211.18m/s).
10. ## [1.11.2][1.12.1+]Ore to Parts - Craft parts with ore / duplicate parts

Alright, I changed all of reinitResourcesOnStoreInVessel to False and I fixed the typo in oretanks.cfg, and also replaced the OreToParts.dll. However, ship's monopropellant still doesn't get reduced after refuelling Here's the oretanks.cfg file and a console screenshot:
11. ## [1.8.x to 1.12.x] kRPC: Control the game using C#, C++, Java, Lua, Python, Ruby, Haskell, C (Arduino)... (v0.5.2, 18th March 2023)

For anyone trying to use LaunchOrbit java code from tutorials, there is a problem in every while loop. Basically lots of variables aren't declared as "volatile" which causes different threads to not be synchronized, and then your while loop keeps going on forever without doing anything. The reason for that is the JVM is allowed to assume that other threads do not change some of the variables during the loop. The proper fix would be to make them all "volatile", but you can also fix it more easily by adding the following at the start of every loop: System.out.print("."); System.out.print("\b"); This will add a dot and then delete it every time, but what it does is force syncrhronization which makes the loop work properly.
12. ## [1.8.x to 1.12.x] kRPC: Remote Procedure Call Server (v0.5.1, 2nd March 2023)

For anyone trying to use LaunchOrbit java code from tutorials, there is a problem in every while loop. Basically lots of variables aren't declared as "volatile" which causes different threads to not be synchronized, and then your while loop keeps going on forever without doing anything. The reason for that is the JVM is allowed to assume that other threads do not change some of the variables during the loop. The proper fix would be to make them all "volatile", but you can also fix it more easily by adding the following at the start of every loop: System.out.print("."); System.out.print("\b"); This will add a dot and then delete it every time, but what it does is force syncrhronization which makes the loop work properly.
13. ## [1.11.2][1.12.1+]Ore to Parts - Craft parts with ore / duplicate parts

Alright, I'll try that. The list of mods is: -ClickThroughBlocker -ToolbarControl -Astronomers Visual Pack -Chatterer -Distant Object Enhancement -Engine Light Relit -Environmental Visual Enhancements -KAS -KIS -Kopernicus -Loading Screen Manager -Modular Flight Integrator -NASA Countdown Clock -Docking Port Alignment Indicator -Parallax -Planetary Base Systems -Planet Shine -Scatterer -SunflaresOfMaar -TAC Life Support -TUFX -Vapor Vent I could also refuel the jetpacks in the new save BUT it still wasn't reducing the monopropellant of the ship, so I could refuel as many times as I want. I assume it should reduce the ship's monopropellant by an equal amount that the jetpack refueled with. And if ship has no monopropellant left, you should be unable to refuel. EDIT: Even after removing all mods (except this one) on the new save, the refueling still doesn't reduce ship's monopropellant. EDIT2: I managed to stop automatic refuel (upon entering the ship) in the old save without removing any mods, if I put a new jetpack in VAB. It still doesn't reduce ship's monopropellant when I click refuel though.
14. ## [1.11.2][1.12.1+]Ore to Parts - Craft parts with ore / duplicate parts

-I put the evafix.cfg inside the CustomPatches which is in GameData folder -I'm playing the career mode -Version is 1.12.2.3167 and I do have breaking ground dlc (1.7.1) -Sure thing, here's ksp.log and quicksave . However, I've also tested with new save, I mean I started new career mode from scratch, just to try it out. In new save, the jetpack actually wasn't refilling automatically by itself (while it does in old save), so that part was working properly now. However, when I clicked on "refuel EVA fuel" it still wasn't taking/reducing the ship's monopropellant, but it did refuel the jetpack. So basically this still gives me infinite fuel because I can refuel in the ship infinite amount of times. I decided to include the quicksave of the new game too, here it is . I don't want to abandon my old save though, this was just to test it. EDIT: fixed the link for new save
15. ## [1.11.2][1.12.1+]Ore to Parts - Craft parts with ore / duplicate parts

I did everything as you said, but jetpacks are still getting refueled upon entering the ship, without reducing the ship's monopropellant. I made a "CustomPatches" folder and then a file inside it called "evafix.cfg" and I put this in it: //Disable EVA jetpack infinite fuel @PART[evaJetpack] { @MODULE[ModuleCargoPart] { %reinitResourcesOnStoreInVessel = false } } @PART[evaCylinder] { @MODULE[ModuleCargoPart] { %reinitResourcesOnStoreInVessel = false } } and then I downloaded your mod and put the folder "OreToParts" into GameData. I also enabled "Persist kerbal inventory loadout" in difficulty settings. Why is it not working properly?
×
×
• Create New...