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

Does not support STK12 #7

Open
theChef613 opened this issue Apr 4, 2022 · 6 comments
Open

Does not support STK12 #7

theChef613 opened this issue Apr 4, 2022 · 6 comments

Comments

@theChef613
Copy link

Current version does not support STK 12

@sammmlow
Copy link
Owner

sammmlow commented Apr 4, 2022

Yes you are right. Thanks for raising the issue! If you have the GUID for STK12, please let me know, I can add that into ORBITM quickly just by adding an extra mode and line in the code snippet from the STK integration Python file. Below is the code snippet for STK10/11

# GUID for STK10: 90E096F9-9615-4BA8-BA23-680F8D236959
GUID_STK10 = "{90E096F9-9615-4BA8-BA23-680F8D236959}"
# GUID for STK11: 090D317C-31A7-4AF7-89CD-25FE18F4017C
GUID_STK11 = "{090D317C-31A7-4AF7-89CD-25FE18F4017C}"
    
# Replace below where necessary.
if orbm_mode == 2:
    comtypes.client.GetModule((comtypes.GUID( GUID_STK10 ),1,0))
elif orbm_mode == 3:
    comtypes.client.GetModule((comtypes.GUID( GUID_STK11 ),1,0))

@theChef613
Copy link
Author

thanks for such a quick response!
I'm not sure which GUID you need but here's a link to a migrating STK 11 to STK 12 https://help.agi.com/stkdevkit/index.htm#mappingTo12.htm#guid

@theChef613
Copy link
Author

looking at the table, it looks like the GUID associated with the STK 11 one you have above is: FEAEF02E-48CE-42AE-B99B-FB9871A69E4B

@sammmlow
Copy link
Owner

sammmlow commented Apr 4, 2022

Ooooh thanks! It seems for Astrogator, it is FEAEF02E-48CE-42AE-B99B-FB9871A69E4B.

I will try to do a commit sometime this week to include that in the GUI, in the mean time, if you are in urgent need to automate STK12 using ORBITM, maybe you can try to manually replace the GUID for STK11 in the file orbmstk.py:

  1. At line 130, replace it with:
GUID_STK12 = "{FEAEF02E-48CE-42AE-B99B-FB9871A69E4B}"
  1. At line 135-136, replace it with:
elif orbm_mode == 3:
        comtypes.client.GetModule((comtypes.GUID( GUID_STK12 ),1,0))
  1. At line 202-208, replace it with:
    elif orbm_mode == 3:
        try:
            uiApp = GetActiveObject('STK12.Application')
            uiApp.Quit()
        except:
            print("Wrong STK version selected! Currently selected STK 12. \n")
            pass
  1. At line 222 - 223, replace it with:
    elif orbm_mode == 3:
        uiApp = CreateObject("STK12.Application")
  1. Now if you select STK 11 in the GUI, it will actually run STK 12. I think. Let me know if this hack works in the mean time! I might take awhile to get the commits in due to work/school, but I'll try to do it this week =)

@theChef613
Copy link
Author

I get an "error in running! DeltaVVector" using that hack. don't worry about rushing it. Work and school come first :)

@sammmlow
Copy link
Owner

sammmlow commented Apr 4, 2022

Oooh that actually sounds like an error coming from STK12 because DeltaVVector is a sub-class of the Maneuver object in STK... I don't have STK12 unfortunately, so I'm not able to replicate this error, but is there a chance you can share a print out of the full error log (if any) so I can understand what happened? My guess is that STK12 Integration and Astrogator probably had changes to their Integration API as they upgraded from 10 -> 11 -> 12.

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