Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing key in dictionary when running createDragData.ks #30

Open
CharlesA18 opened this issue Jul 8, 2022 · 7 comments
Open

Missing key in dictionary when running createDragData.ks #30

CharlesA18 opened this issue Jul 8, 2022 · 7 comments

Comments

@CharlesA18
Copy link

Attempting to create drag profiles for an Eve lander using Ren0k's Atmospheric Drag Project and the kOS scripts provided with TOT, I encountered a number of errors, the first one being that createDragData.ks (from TOT) tried to run a non-existent file "Telemetry.ks." After some tinkering, I figured out that Ren0k has (I think) updated his project in a way that restructures the directories, gets rid of Telemetry.ks, and puts required functions from it into different places (in particular I found I needed the contents of "Vectors.ks"

I have attached an edited version of the createDragData.ks* script (with edited instructions in the header) which runs without errors. I need to do some testing to figure out if the output .csv file has the correct information. I noticed that column D (which I see in the script holds CdACube) was all zeros after a test run on a ship I made, but maybe that's normal.

*As .txt because github doesn't like .ks and .txt runs anyways.
createDragData_MODIFIED.txt

@CharlesA18 CharlesA18 changed the title Provided createDragData.ks createDragData.ks does not work due to Atm Drag Project Updates - Possible fix provided Jul 8, 2022
@Arrowstar
Copy link
Owner

Can you point me to which version of Ren0k's code you used? I'm not seeing any updates in the past ~1.5 years in his git repo.

@CharlesA18
Copy link
Author

Hmm, you're right, it looks like there's nothing in the last 1.5 years. Maybe I misunderstood something?

I am simply using the folders and files from the main branch currently linked to in the header comments in your script (https://github.com/Ren0k/Project-Atmospheric-Drag).
I initially only copied the atmoData folder (inside "Library") and DragProfile folder (inside "CCAT") into the Ships/Script folder as described in the steps commented in the header of createDragData.ks, and copied/pasted the part database and craft files into the places described in the steps as well. Followed the steps exactly as far as I can tell (except on the last step, I realize I should run "createDragData.ks" not "createDragProfile.ks" which doesn't exist.
But upon running, it spat out an error when trying to execute the command 'runpath("dragProfile/LIB/Telemetry.ks").'
A simple search looking in the DragProfile/LIB folder showed that Telemetry.ks did not exist.

After seeing this, I pulled the full CCAT and Library folders from the github, edited the paths for the things in dragProfile to point to said folder now inside CCAT, and commented out the line for running Telemetry.ks. I then got an error about lib_VesselOrientation not existing, and assumed it must have been something that was once inside Telemetry.ks. Poking through the different files (I've worked with kOS a lot before) I found it was defined in Vectors.ks, and so updated the code to run this script instead of Telemetry.ks. The code then ran fine.

Is there a different version I'm supposed to be using? Is the telemetry.ks supposed to be found somewhere else?

@Arrowstar
Copy link
Owner

I was using the "Latest" normal release, "dragProfile 1.01". Can you try downloading that and see if it helps?

@CharlesA18
Copy link
Author

Ok, well this is embarrassing. I just didn't understand github enough to realize clicking on "dragProfile v1.01" did something different than downloading the folders and files right next to it.

@CharlesA18
Copy link
Author

CharlesA18 commented Jul 8, 2022

Alright, using the 1.01 version, with files set up as described in the createDragData.ks instructions, I'm getting a new error.
I tried replacing my craft file and part database file (and deleting the old database .json file) in case maybe the old ones had some artifacts from me having used the wrong Atm Drag Project earlier, but that didn't fix it.

image

I can provide my craft file if you think it would be beneficial. My craft does have a fairing, which I read in Ren0k's readme would require a manually-entered drag cube for accuracy. Perhaps I need to do some tinkering using the gui/tools in his mod?

@CharlesA18 CharlesA18 changed the title createDragData.ks does not work due to Atm Drag Project Updates - Possible fix provided Missing key in dictionary when running createDragData.ks Jul 8, 2022
@Arrowstar
Copy link
Owner

Alright, using the 1.01 version, with files set up as described in the createDragData.ks instructions, I'm getting a new error. I tried replacing my craft file and part database file (and deleting the old database .json file) in case maybe the old ones had some artifacts from me having used the wrong Atm Drag Project earlier, but that didn't fix it.

image

I can provide my craft file if you think it would be beneficial. My craft does have a fairing, which I read in Ren0k's readme would require a manually-entered drag cube for accuracy. Perhaps I need to do some tinkering using the gui/tools in his mod?

So this appears to be a bug with the mod. If you try to use the 1.01 version of the drag profile mod by itself, as the author intended it to be used (so no integration with my code), do you get the same error?

@CharlesA18
Copy link
Author

It may be a while before I get back to you on this. I broke my own rule of not putting an uncovered drink within arm's reach of my laptop and... well... "It's dead Jim."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants