Jump to content

Codapop

Members
  • Posts

    76
  • Joined

  • Last visited

Everything posted by Codapop

  1. I'm getting a surface speed bug when landed, or even before launch (53m/s in this case). Otherwise the mod seems to be working really well for me in v1.6.1. I really hope Dagger returns and decides to complete this mod. Seems it could be a cornerstone of the modding community.
  2. Task Manager performance window shows my GTX 1060 6GB gets to about 40% at times at default graphics settings (8k textures). I run at a steady 9+GB of RAM with no other mods installed when in the tracking station. It's probably your RAM.
  3. Does anyone know how to make city lights work with AVP? I tried using the config from SVE and moving the textures over, but Kerbin remains dark. The EVE window shows no errors, and I'm able to get them with SVE no problem. Also, does anyone have a good solution for Outer Planets Mod? I might just move the AVP Jool clouds over to Pood's OPM overhaul, but my attempts so far have caused errors. EDIT: Also, the volumetric clouds do some weird things when passing through them. Is there a way to make them stay visible for longer? They cut in and out as I rotate my camera, and then cut off instantly once I reach the top of them. Would be nice for them to stay there until I was too high up to notice them disappear.
  4. Ahhh I'm dumb! I was so used to skipping MM because every mod comes prepackaged with it. Sorry about that. Thanks for the great dev work!
  5. How do I apply the patch for RealPlume? I didn't see a download link, so I assume I need to manually change the code somewhere. Actually, all I really need is the sounds from RealPlume or one of the better sound mods, but I can't seem to figure out how sound files are treated in the config.
  6. Launch Failure not working properly on ksp v1.6.1 with no other mods installed (just dependencies). Game settings show up properly, and icon is on the toolbar, but clicking it does nothing. Parts "fail" on launch, but nothing actually happens to them. The part will be highlighted red and there will be a warning (icon changes), but the part remains unaffected, and nothing shows up in the F3 window. Logs: http://s000.tinyupload.com/?file_id=02774875759744315903 Let me know if you need anything else!
  7. EDIT: Fixed my issue. Forgot to install ModuleManager. Thanks for the quick response anyway!
  8. Tinyupload won't let me upload a folder, so I uploaded the 3 relevant files in the "save" folder. Let me know if I need to provide anything else. persistent.sfs: http://s000.tinyupload.com/?file_id=40365282862172479307 persistent.loadmeta: http://s000.tinyupload.com/?file_id=21177122333228759185 persistent (date).sfs: http://s000.tinyupload.com/?file_id=00406662548965238109 I am using the ksp_64x.exe rather than Launcher.exe, if that matters.
  9. Oh Scrap/Scrap Yard not working properly on 1.6.1 save file with no other mods. Logs: http://s000.tinyupload.com/?file_id=09253975294622581446 Mod shows up in game with difficulty options and icons. Scrap Yard doesn't seem to apply old parts, but ever increasing new parts. Oh Scrap window only has an indicator saying that my craft is at level 0. I tested it previously on a heavily modded build, and the Oh Scrap window was more detailed. Let me know if there's anything else I can provide.
  10. I tried Dang It! on a clean install of KSP v1.6.1 with the required dependencies, and it doesn't seem to be working properly. The mod loads and I can edit the difficulty settings, but the in-game UI only shows the "Multiplier Entry" window (current modifier, edit additional modifier, enter decrease per minute) and none of the parts seem to be changed at all to reflect the mod. Also the part tool tips don't include any buttons to cause failures for testing. I would love to use this mod for 1.6.1, as I have 60+ mods working on this version already, so please let me know if I can help you in any way.
  11. Not sure why you would spend time coding the arm switch when you can just do it mechanically. Just have both the switch and the button complete the same circuit. Like VCC > switch > button > Arduino input pin, with a pull down resistor in there. You can do the same with the precision controls switch by turning it into a voltage divider, as SimPit doesn't have that functionality either.
  12. Wow, that fixed it! Thank you very much. Ok, so both throttle and rotation are working perfectly for me. Here's my code in case you or anyone needs it: ROTATION #include "KerbalSimpit.h" KerbalSimpit mySimpit(Serial); rotationMessage myRotation; void setup() { Serial.begin(115200); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); while (!mySimpit.init()) {delay(100);} digitalWrite(LED_BUILTIN, LOW); mySimpit.registerChannel(ROTATION_MESSAGE); } void loop() { int pitchRead = analogRead(A0); int pitchR = map(pitchRead, 0, 1023, -32768, 32767); // Set myRotation.mask to 7 for pitch+yaw+roll, 1 for only pitch. myRotation.mask = 1; myRotation.pitch = pitchR; mySimpit.send(ROTATION_MESSAGE, myRotation); delay(1); } THROTTLE #include "KerbalSimpit.h" KerbalSimpit mySimpit(Serial); void setup() { Serial.begin(115200); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); while (!mySimpit.init()) {delay(100);} digitalWrite(LED_BUILTIN, LOW); mySimpit.registerChannel(THROTTLE_MESSAGE); } void loop() { int pitchRead = analogRead(A0); int throttle = map(pitchRead, 0, 1023, 0, 32767); mySimpit.send(THROTTLE_MESSAGE, throttle); delay(1); } I went ahead and downloaded the latest version of the arduino library to try to help work through the SAS mode problem, and I had the same luck as you. mySimpit.send(SAS_MODE_MESSAGE, AP_PROGRADE); resulted in a compiling error. mySimpit.setSASMode(AP_PROGRADE); compiles fine but doesn't work in game, though the LED on my arduino shows it's sending properly. My guess is there's an issue between the arduino library and the mod itself. You may be able to download the latest version of Simpit and see if it works (not off CKAN but whereever new releases are kept), or perhaps Stibbons still needs to upload it.
  13. I believe Simpit expects 16-bit integers: -32768 to 32767. So 0 on throttle is -32768, and 100% throttle is 32767. For rotation/translation it should still use the same intregers, but the program would interpret them differently (like -32768 is all the way left and 32767 is all the way right). When using Arduino, you map the input from the potentiometer to those integers. So the potentiometer reads a voltage, arduino reads that voltage as being somewhere between 0 and 1023, and then it gets mapped relative to -32768 and 32767 and then sent to Simpit.
  14. I'm using the latest release on bitbucket (I think it was #64?) and used this code: #include "KerbalSimpit.h" KerbalSimpit mySimpit(Serial); rotationMessage myRotation; void setup() { Serial.begin(115200); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); while (!mySimpit.init()) {delay(100);} digitalWrite(LED_BUILTIN, LOW); mySimpit.registerChannel(THROTTLE_MESSAGE); } void loop() { int pitchRead = analogRead(A0); int throttle = map(pitchRead, 0, 1023, -32768, 32767); mySimpit.send(THROTTLE_MESSAGE, throttle); delay(1); } This works well for me, though for some reason it seems to not register until the potentiometer reads above about 1/3. It's been this way for several months, so it's not a new development. My serial monitor shows the pot is working correctly. Stibbons do you happen to know why or how to fix this? Also, I still can't seem to get rotation messages to work properly. I'm using this: #include "KerbalSimpit.h" KerbalSimpit mySimpit(Serial); rotationMessage myRotation; void setup() { Serial.begin(115200); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); while (!mySimpit.init()) {delay(100);} digitalWrite(LED_BUILTIN, LOW); mySimpit.registerChannel(ROTATION_MESSAGE); } void loop() { int pitchRead = analogRead(A0); int pitchR = map(pitchRead, 0, 1023, -32768, 32767); myRotation.pitch = pitchR; mySimpit.send(ROTATION_MESSAGE, myRotation); delay(1); } I tried making some various changes to reflect the discussion above, but the information is sorta randomly talked about and difficult for me to understand with my limited coding knowledge. Can you please give a short example of how to write a proper rotation message?
  15. So you're saying I should unplug it and upload and then plug it back in while the game is running? That may work, but I think a simple command to Simpit to disconnect, or some sort of basic UI (like an on/off button) would be a great addition if it isn't already included. The keyboard issues might have just been something with my code or machine. I'll do some more testing with it once I figure out the analog code problem I posted above.
  16. I'm having some trouble getting analog controls to work. I am using a slide pot for debugging purposes, and I am able to get it to control the throttle, but adapting that code to control rotation is producing no results. Here's the code: #include "KerbalSimpit.h" KerbalSimpit mySimpit(Serial); rotationMessage myRotation; void setup() { Serial.begin(115200); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); while (!mySimpit.init()) {delay(100);} digitalWrite(LED_BUILTIN, LOW); mySimpit.registerChannel(ROTATION_MESSAGE); } void loop() { int pitchRead = analogRead(A0); int pitchR = map(pitchRead, 0, 1023, -32768, 32767); myRotation.pitch = pitchR; myRotation.yaw = pitchR; myRotation.roll = pitchR; mySimpit.send(ROTATION_MESSAGE, myRotation); delay(1); } Based on the code, the p/y/r of the vessel should all move together, but nothing happens when I move the potentiometer. The LED_BUILTIN turns off indicating a connection. Similar code works with the same hardware to control the throttle, so I'm probably missing some key component in my code. Also, is there a way to upload new code to the arduino while KSP is running? It's a bit of a pain to have to close out of the game and reopen just to edit the code. EDIT: Also is there a way to allow for keyboard functionality while Simpit is running?
  17. EDIT: oops, I didn't see the reply from Stibbons. I was able to get SAS modes to work by using a kOS module and including a script that attaches modes to extended action groups, but that's a bit of a forced solution.
  18. Though Simpit doesn't receive all of the orbital data, a lot of useful info can be deduced from the data it gets as well as the info from the Wiki. You can extrapolate the following: mu = GM (G = gravitational constant, M = planet mass) SEMIMAJORAXIS { a = (r1 + r2)/2 r1 = APOAPSIS + BODY RADIUS r2 = PERIAPSIS + BODY RADIUS } HORIZONTAL SURFACE VELOCITY { sqrt(sV^2 - vV^2) sV = SURFACE VELOCITY vV = VERTICAL VELOCITY } HORIZONTAL ORBITAL VELOCITY { sqrt(oV^2 - vV^2) oV = ORBITAL VELOCITY vV = VERTICAL VELOCITY } TIME PERIOD OF ORBIT { T = 2pi*sqrt(a^3/GM) a = SEMIMAJORAXIS G = GRAVITATIONAL CONSTANT M = MASS OF PLANET } IMPACT VELOCITY { V = sqrt(2mu/(r+(H-Hs))-(mu/a)) mu = GRAVITATIONAL CONSTANT (GM) r = BODY RADIUS H = ALTUTUDE (SEA) Hs = ALTITUDE (SRF) a = SEMIMAJORAXIS } ROTATIONAL VELOCITY { HV = sa/r s = PLANET ROTATION SPEED a = Orbit Alt r = BODY RADIUS } ROUGH UNSIGNED INCLINATION { I = ARCCOS(((A^2)+(C^2)-(B^2))/(2AC)) a = HORIZONTAL ORBITAL VELOCITY b = HORIZONTAL SURFACE VELOCITY c = ROTATIONAL VELOCITY } Rough inclination is an interesting one, as it uses some really hack-ey math. It can tell you the rough inclination of the orbit, but it cannot tell you if it is North or South. This will produce a value between 0-180 that will oscillate. It will reach maximum at the equator (AN/DN) and will be accurate at the equator. Elsewhere it will be as much as 10% low. As far as I can tell, this is the absolute best inclination reading you can get with this mod. You could potentially take samples at intervals (say, each second) and get a perfect reading, but that's beyond me. You could also write some code to only show the maximum (the most accurate) and only seek a new maximum when the SMA changes. This kind of messy code could also get you the AN/DN (by taking the time when the Inclination reading is maximum and then taking the Period and dividing by 2.) Calculate T at Impact { T = t1 + t2 + t3 } Time to Impact is one that I never personally got working, but it's an attempt to solve some complicated math with a close approximation. t1, t2, and t3 are simple time to impact equations at varying altitudes, each one for a different gravity to account for the change in gravity at higher altitudes. It breaks up the distance into 3 parts and calculates them separately and then adds together the pieces. It should be accurate within a few seconds at least. Here's the relevant data from the wiki. This can be dropped into your arduino project as a list, and just add commas and the necessary syntax. Eeloo data is for the OPM mod and may not be the same as for stock KSP. Body Data Chart Body | Radius | mu | Rotation Speed Kerbol 261600000 1.1723328×10^18 3804.8 Moho 250000 1.6860938×10^11 1.2982 Eve 700000 8.1717302×10^12 54.636 Gilly 13000 8289449.8 2.8909 Kerbin 600000 3.5316000×10^12 174.94 Mun 200000 6.5138398×10^10 9.0416 Minmus 60000 1.7658000×10^9 9.3315 Duna 320000 3.0136321×10^11 30.688 Ike 130000 1.8568369×10^10 12.467 Dres 138000 2.1484489×10^10 24.916 Jool 6000000 2.8252800×10^14 1047.2 Laythe 500000 1.9620000×10^12 59.297 Vall 300000 2.0748150×10^11 17.789 Tylo 600000 2.8252800×10^12 17.789 Bop 65000 2.4868349×10^9 0.75005 Pol 44000 7.2170208×10^8 0.30653 Sarnus 5300000 8.2089702×10^13 1168.5 Hale 6000 811990.62 1.6005 Ovok 26000 13258591 5.5490 Eeloo 210000 7.4410815×10^10 22.783 Slate 540000 1.9788564×10^12 17.601 Tekto 280000 1.9244099×10^11 2.6410 Urlum 2177000 1.1944574×10^13 333.62 Polta 220000 9.0181953×10^10 18.931 Priax 74000 3.3831766×10^9 6.3678 Wal 370000 4.9673624×10^11 2.3031 Tal 22000 2.1358884×10^8 2.8283 Neidon 2145000 1.4167882×10^13 334.84 Thatmo 286000 1.8609758×10^11 5.8640 Nissee 30000 3.9716933×10^8 6.7501 Plock 189000 5.1844895×10^10 11.170
  19. Since this thread isn't checked very often, I can try to give some input, but I'm only a bit more into it than you are. You can get the mod from the github site. I don't use CKAN yet, as I'm just testing with a few mods, so github is fine for me and should work for you. The best bet for testing is to simply use the example scripts. They aren't comprehensive (like personally I still have a lot of trouble with the messages functions as they aren't really explained in detail) but you can usually get what you need through copying parts of the example code and then changing a few things or expanding upon them. The best script for testing the connection is the HelloWorld script, as it will turn your built in LED off when it connects. If you're having trouble with that, then you need to change the settings.cfg file and make sure you're on the correct port.
  20. Does ACTIONSTATUS_MESSAGE work for AG1-10 and CAG's too? Or does it only work for the standard AG's? EDIT: Also I've come across a problem using the Arduino Due and Simpit. The Due has two serial ports, programming and native. Programming port is like the normal Arduino port, and the Native port has extra features. I would greatly prefer to use the native port, as the rest of my project relies on those extra features. This requires me to use "SerialUSB" instead of "Serial". Normally this isn't a problem, but it doesn't seem to work at all in the mod. I've tried running the HelloWorld script with both ports, making sure to edit the settings.cfg in the process. I get the handshake with the programming port using "Serial" but not with the native port using either "Serial" nor "SerialUSB". Is there a possible fix for this? EDIT 1.5: I've managed to open the Arduino library files as well as the .dll in a hex editor. I see a lot of mentions of "Serial" but probably too many for me to guess at what to change. I'll try to edit the ones in the Arduino library one by one and see if that will fix it, but if you have any other ideas I'd be happy to try them out. EDIT 2: Can Simpit be used with the Outer Planets Mod? Like can it tell which body the vessel is orbiting?
  21. I could just be doing something wrong, but for some reason "while (!mySimpit.init()) {delay(100);}" doesn't work. It's in all of the examples, and I have it in all of my testing code, but it never connects to the Simpit on its own. I always have to push the reset button on the Arduino Mega. Is there a way to fix this? EDIT: Also I managed to get my potentiometer to control throttle, but there appears to be a noticeable delay of something like 300-500ms. Also, the throttle hits 0 when the pot is still at about 50%. Are these known issues or do I just have buggy gear? I'm using a Mega with a slide pot. Code is:
  22. Ah, my circuit looked differently, which might have affected my results. I just had 5V going to the button going to the input pin. No ground.
  23. Unfortunately, I wouldn't have any idea where to start building something like that. I'm already holding on for dear life just trying to get my arduino code working with Simpit. Perhaps adding compatibility with some of the more popular mods that add resources (TAC, Near-Future, etc) by hard-coding them could suffice. Or requiring TAC Fuel Balancer, as it already displays fuel data of stock and mod fuels, and building the new version off of that. I have no idea what is possible nor what is easiest, though. In other news, I think the stage tutorial is broken. It works, but it doesn't work twice, so it stages once and then gets stuck (requiring a reset on the arduino). I think it has to do with the "buttonState" not getting reset to LOW, but my attempts to make it work perfectly are in vain. I was able to get it to work well enough by adding: buttonState = LOW; delay(1000); after the stage command in the same IF statement. This doesn't work like the space bar, since it will just stage every second if the button is held down, but it doesn't get stuck at least. If this was brought up previously, I apologize. I've only read through about half of this post's comments and hope to finish reading soon.
  24. I got it working manually, but I'll keep that in mind for the future, thanks! Is it possible to link up multiple Arduino microcontrollers to the same instance of KSP? Would this be as simple as editing the config file? I'm hoping to run one for inputs and one for outputs. EDIT: Also, do other resources work? Like if I install TAC Life Support, can the Simpit return values for amount of food? Or are those commands hard coded?
×
×
  • Create New...