-
Posts
2,810 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by DoctorDavinci
-
KSP Math for distance is off?
DoctorDavinci replied to DoctorDavinci's topic in KSP1 C# Plugin Development Help and Support
Think so? .... I don't It is not an argument from authority, just a confirmation of my math Please, prove my math wrong... I beg you Over 28000 lines of code in here .... show me where I went wrong https://github.com/DoctorDavinci/OrX_Kontinuum Evidence instead of assertions please Honestly, do I need to break down the grade 3 mathematics I am using even further? -
KSP Math for distance is off?
DoctorDavinci replied to DoctorDavinci's topic in KSP1 C# Plugin Development Help and Support
I'm pretty sure this is part of why the targeting for BD Armory is off ... KSP using doubles for the coord system ... Unity can only use float values for anything as doubles are not in its repetoire When you convert a double based vector to a float based vector you lose accuracy ... my math is sound as confirmed by a math prof at Toronto University (not to menton a few other people) so the distance calculations are off ... no question about it -
KSP Math for distance is off?
DoctorDavinci replied to DoctorDavinci's topic in KSP1 C# Plugin Development Help and Support
Nope, you're wrong ... that is the math, can't argue with the math Let me break it down further for you since you seem to not understand what is going on The code below just initializes the values in the method double _latDiff = 0; double _lonDiff = 0; double _altDiff = 0; The line below grabs the list of vessels in the flight scene (all vessels) List<Vessel>.Enumerator v = FlightGlobals.Vessels.GetEnumerator(); The next line is used to iterate through each vessel in the list while (v.MoveNext()) Within the while (v.MoveNext()) deal I calculate the altitude of the targeted vessel and determine which is higher (altDiff = which altitude is the highest ... Altitude calculated from the radius of the celestial body plus the double value of the altitude of the vessel in question) if (_spawnLoc.z <= v.Current.altitude) { _altDiff = v.Current.altitude - _spawnLoc.z; } else { _altDiff = _spawnLoc.z - v.Current.altitude; } After calculating the altitude I then calculate the difference in degrees of latitude (latDiff = difference in lattitude ... the math below is perfectly clear and is irrefutable) if (v.Current.latitude>= 0) { if (_spawnLoc.x >= v.Current.latitude) { _latDiff = _spawnLoc.x - v.Current.latitude; } else { _latDiff = v.Current.latitude - _spawnLoc.x; } } else { if (_spawnLoc.x >= 0) { _latDiff = _spawnLoc.x - v.Current.latitude; } else { if (_spawnLoc.x <= v.Current.latitude) { _latDiff = _spawnLoc.x - v.Current.latitude; } else { _latDiff = v.Current.latitude - _spawnLoc.z; } } } Then I calculate the difference in longitude (same deal as the latitude calculation ... completely irrefutable unless you're using non reality mathematics in another universe) if (v.Current.longitude >= 0) { if (_spawnLoc.y >= v.Current.longitude) { _lonDiff = _spawnLoc.y - v.Current.longitude; } else { _lonDiff = v.Current.longitude - _spawnLoc.y; } } else { if (_spawnLoc.y >= 0) { _lonDiff = _spawnLoc.y - v.Current.longitude; } else { if (_spawnLoc.y <= v.Current.longitude) { _lonDiff = _spawnLoc.y - v.Current.longitude; } else { _lonDiff = v.Current.latitude - _spawnLoc.z; } } } I then calculate the hypotenuse using the following (Pythagoras perhaps?) double diffSqr = (_latDiff * _latDiff) + (_lonDiff * _lonDiff); I then use the altDiff to calculate the exact amount of degree difference double _altDiffDeg = _altDiff * (((2 * (FlightGlobals.ActiveVessel.mainBody.Radius + FlightGlobals.ActiveVessel.altitude)) * Math.PI) / 360); The above gives me how many degrees (in doubles) there is in altitude between the two vessles ... I then calculate the altitude to add using the altDiff squared plus the diffSqr calculated two steps above double altAdded = (_altDiffDeg * _altDiffDeg) + diffSqr; I then calculate the actual distance, using Pythagoras' Theorem double _targetDistance = Math.Sqrt(altAdded) * (1 / (((2 * (FlightGlobals.ActiveVessel.mainBody.Radius + FlightGlobals.ActiveVessel.altitude)) * Math.PI) / 360)); -
Community brainstormed fighter contest rules?
DoctorDavinci replied to a topic in KSP1 Challenges & Mission ideas
I'd be interested in discussing options for a creator of a BDA challenge using ORX Kontinuum to add in some toggle settings to add restrictions to any challenge they may create using OrX K Totally open for any sort of challenge setup being coded into ORX Kontinuum ... not that hard to add anything now that I have the HoloKron System working PM me if you're interested, I'd love to be able to include a way to setup more complicated challenges like the BAD T in OrX Kontinuum ... The challenge builder is already working quite nicely and adding in some more options wouldn't take much code at all (the heavy lifting is already done ... 6 month's of pulling my hair out ) -
So I created a mod that has some custom distance checking in it ... Seems that @SQUAD's math is off substantially Here's my code from OrX Kontinuum ... simply put all it does is use the latitude, longitude and altitude of a vessel to check the distance from another vessel using it's latitude, longitude and altitude Here's my code ... Tell me I'm wrong Yes, you can see I am not wrong If you do not understand the code in the spoiler, let me break it down for you .... I am using Pythagoras' theorem to calculate the distance to the target Using the double values for latitude, longitude and altitude of a given vessel I calculate it's distance from a second vessel ... My math is sound, no mistakes in the code as confirmed by a professor at Toronto University (I asked as a sanity check) Turns out there is a fairly major discrepancy in the tune of 200 meters or so at 24 to 25 km ... Methinks @SQUAD might want to look into this EDIT: So it turns out that my math was right ... I was just using the wrong math
-
The Official Kerbal Dakar 2020
DoctorDavinci replied to DoctorDavinci's topic in KSP1 Challenges & Mission ideas
HAPPY NEW YEAR EVERYONE THE KERBAL DAKAR 2020 IS NOW OFFICIALLY OPEN - CRASH AND BURN - -
You can do that through an mm patch to try it out ... just add the bfc module to the part and see if it actually controls the deploy ... even if the deploy is reversed it will tell me that all I need to do is add a reverse control button so it will work the way you want to use it If it does control the deploy then it's a fairly easy thing to add in a switch button
-
Well I would be willing to include some code to do this for you but it would require myself having the DLC, which I do not The reason for this is that they have different part modules, the elevons vs the BG props, and I would need to have the DLC in order to access the part module since the BG prop module is not in stock KSP
-
The Official Kerbal Dakar 2020
DoctorDavinci replied to DoctorDavinci's topic in KSP1 Challenges & Mission ideas
That would be very helpful ... Please post your results in the ORX Kontinuum Development thread if you decide to move forward with testing Please include some specs about your system as well if possible Thanx -
The Official Kerbal Dakar 2020
DoctorDavinci replied to DoctorDavinci's topic in KSP1 Challenges & Mission ideas
I really would have liked to see your KSP.log after that happened ... It is the first report of crash to desktop in 6 months of development and over 20 QA testers -
The Official Kerbal Dakar 2020
DoctorDavinci replied to DoctorDavinci's topic in KSP1 Challenges & Mission ideas
I think I know what is going on ... GitHub replaces spaces in a file name with periods and it could be that KSP is having a problem with more than 1 period in the file name Thanks for bringing this to my attention ... I'll update the OP One question though, since you're on KSP 1.8.1 why not just use OrX Kontinuum ... It does all the calculations for your times as well as saves it to a scoreboard -
The Official Kerbal Dakar 2020
DoctorDavinci replied to DoctorDavinci's topic in KSP1 Challenges & Mission ideas
Did you edit the file as described in the OP of the thread to match your KSP version? Need more information than 'it fails to load' -
The Official Kerbal Dakar 2020
DoctorDavinci replied to DoctorDavinci's topic in KSP1 Challenges & Mission ideas
All the distances below are as the crow fly's (in a straight line) Stage 1 - 24.5 km Stage 2 - 25.4 km Stage 3 - 23.3 km Stage 4 - 24.9 km Stage 5 - 23.6 km -
DAKAR 2020 concept open for suggestions
DoctorDavinci replied to Triop's topic in KSP1 Challenges & Mission ideas
OFFICIAL KERBAL DAKAR 2020 CHALLENGE THREAD HAS BEEN CREATED RACE OFFICIALLY STARTS ON NEW YEARS DAY GOOD LUCK TO ALL !!!! -
The Official Kerbal Dakar 2020 PLEASE NOTE: At the request of @Triop I am serving as a surrogate host for the Kerbal Dakar 2020 ... It is still his challenge, his rules and he has veto power over any decisions that may need to be made Now off to the races ........ This challenge will test your design, driving and strategy skills. Don't think this is going to be easy, expect bumps, hills, drops, mountains. Study the route you want to take before you start, A to B is never a straight line in the Dakar. Some stages will be more about braking than going fast. Make sure you will not be disturbed during your attempt. Put on your favorite music and play it loud, this will keep you focused while driving. The Kerbal Dakar 2020 challenge is more about finishing the race and sharing your experience, the leader boards that end up being created or the scoreboard from OrX Kontinuum are secondary ... It's not about the destination or your times on the scoreboard, it's about the journey and the trials you face in order to finish (although it is nice to have bragging rights ) All the distances below are as the crow fly's (in a straight line) Stage 1 - 24.5 km Stage 2 - 25.4 km Stage 3 - 23.3 km Stage 4 - 24.9 km Stage 5 - 23.6 km - HOW TO COMPETE - There are 2 ways to compete in this challenge ... The first is by downloading a save file, dropping it into a save directory in your KSP install and then loading the saved game ... Directions and download link are in the spoiler below The second method to compete is by downloading OrX Kontinuum and selecting Dakar 2020 from the HoloKron Group List menu and then selecting the stage you wish to race ... Directions and download link are in the spoiler below PLEASE NOTE: Unfortunately OrX Kontinuum will not work with any KSP version prior to 1.8.0 so if you're on 1.7.3 or below you are stuck with the save file method - ADDITIONAL NOTES - - Use mods or make it stock, it's up to you. - You can use electric, jet engines, both if you like but no powered flight (that also means don't use jet engines while jumping). - Boost Flaps are allowed but the above rule still stands, no powered flight (Boost Flap controller included in OrX Kontinuum ... See first post of the thread for details on Boost Flaps) - Minimum 1 Kerbal, so no drones. - No saving during stages. - When a stage is finished you can save and start the next stage when ever you like. - Put up a screenshot showing your vehicle. - When posting your times tag myself (@DoctorDavinci) in your post showing your screenshots so I can update any scoreboard that we decide to create - Give some information about your propulsion, mods used and tell us your story --------------------------------------------------------------------------------------------------------------- 'This looks cool but how do I get my vehicle there?' Well, it's fairly simple really ... either build some sort of contraption to fly or launch your rally entry to the starting line of the race or use Vessel Mover to pick your craft up and move it there PRO TIP: If you use Vessel Mover I recommend saving the game when you place the craft and then loading that save ... This will get rid of any flickering terrain textures Anyways .... START YOUR ENGINES !!!!!! - SCOREBOARD - STAGE 1 @DoctorDavinci - 7 minutes, 27.93 seconds @Pds314 - 9 minutes, 22 seconds @QF9E - 10 minutes, 20.70 seconds @purpleivan - 10 minutes, 45 seconds @Castille7 - 13 minutes, 8 seconds @ChaoticPheonix - 14 minutes, 28 seconds @klond - 30 minutes, 7 seconds STAGE 2 @DoctorDavinci - 8 minutes, 16.55 seconds @purpleivan - 11 minutes, 8 seconds @QF9E - 11 minutes, 13.03 seconds @Castille7 12 minute, 34 seconds @ChaoticPheonix - 19 minutes, 8 seconds @klond - 44 minutes, 51 seconds STAGE 3 @ChaoticPheonix - 10 minutes, 3 seconds @purpleivan - 10 minutes, 36 seconds @QF9E - 11 minutes, 44.59 seconds @Castille7 - 11 minutes, 58 seconds @klond - 22 minutes, 54 seconds STAGE 4 @purpleivan - 11 minutes, 41 seconds @QF9E - 12 minutes, 57.70 seconds @Castille7 - 14 minutes, 7 seconds @klond - 26 minutes, 55 seconds STAGE 5 @purpleivan 10 minutes, 12 seconds @QF9E - 10 minutes, 35.00 seconds
- 134 replies
-
- 10
-
-
DAKAR 2020 concept open for suggestions
DoctorDavinci replied to Triop's topic in KSP1 Challenges & Mission ideas
I'm sure you'll be up and racing again in no time I have everything I need to set up the thread however I'm just serving as a surrogate host for you ... Your challenge, your rules and you have final say in anything that may come up although, seeing as the previous KSP Dakar challenges was more about just finishing the race and sharing your experience, the leaderboard or scoreboard from OrX K really aren't that important For those who don't want to wait to start racing, as mentioned previously in this thread, OrX K has the track files included in it's download ... if you do not want to install OrX K then just download the Kerbal.Dakar.2020.sfs file, however if you do install OrX K then the Kerbal.Dakar.2020.sfs file is not needed https://github.com/DoctorDavinci/OrX_Kontinuum/releases/tag/0.1.1.4777 I'll have the thread up and running by new years day -
DAKAR 2020 concept open for suggestions
DoctorDavinci replied to Triop's topic in KSP1 Challenges & Mission ideas
Sorry to hear that you're under the weather ... I'm sure everyone feels the same Of course I'll set up the Dakar 2020 challenge for you, I still have your save file that you sent me and the track files are already made and in the latest release of OrX Kontinuum so everything is pretty much ready to go ... just need to set up a challenge thread So it shall be written ... So it shall be done 'Get to the choppah' -
Simple solution would be to create a mod that just deletes any avc or mini avc plugins I seem to remember there was one such mod but the latest versions have dependencies Oh well, guess everyone is stuck .... I'll see what I can come up with to nuke the problem from orbit Exterminatus
-
DAKAR 2020 concept open for suggestions
DoctorDavinci replied to Triop's topic in KSP1 Challenges & Mission ideas
If you are running KSP v1.8.x the Dakar 2020 track is included in OrX Kontinuum ready for racing -
OrX Kontinuum Short Track Racing The 3 races in this series take place around the Kerbal Space Center 1 Mile Drag Race is a drag race located on the KSC Runway ... 4 stage gates are placed down the runway (after the challenge has been spawned) separated by 402.3 meters each (1/4 mile) Ring Around the KSC is a single lap around the perimeter of the Kerbal Space Center... You can easily surpass 100 m/s so be careful Tracking Station Loop is a race from the KSC runway, around the Tracking Station then through the RnD tunnel and back to the runway - HOW TO COMPETE - 1 - Download and install the latest release of OrX Kontinuum ... The .orx files containing these 3 races are included in the download and are already set up for immediate racing 2 - Build yourself a rover to race with 3 - Use the Craft Tuning feature to adjust your craft and save your adjustments from within the flight scene (Please consult the first post of the OrX Kontinuum thread for further details) 4 - Scan for the challenge from within the OrX Kontinuum menu while in the flight scene 5 - Move to within 25 meters of the HoloKron and select 'Spawn Challenge' to have the challenge stage gates spawned and placed 6 - Click on 'Start Challenge' to start the race SHARE YOUR SCORES AND HAVE FUN
-
KSP Challenge Mode
DoctorDavinci replied to Clinton's topic in KSP1 Suggestions & Development Discussion
How about a mod that allows you to create your own challenges and share them with other players