Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -59,21 +59,21 @@
"\n",
"\n",
"######################################### Col0 ########################################################\n",
"width=35\n",
"width = 35\n",
"padx = 3\n",
"pady = 1\n",
"column=0\n",
"row = 1\n",
"# Connect to STK\n",
"try:\n",
" root = ConnectToSTK()\n",
" root = ConnectToSTK(version=11)\n",
" startTime = root.CurrentScenario.QueryInterface(STKObjects.IAgScenario).StartTime\n",
" stopTime = root.CurrentScenario.QueryInterface(STKObjects.IAgScenario).StartTime+3600\n",
"except:\n",
" res = messagebox.askyesno('Constellation Wizard','Failed to connect to a scenario.\\nIs a scenario in STK open?')\n",
" if res == True:\n",
" try:\n",
" root = ConnectToSTK()\n",
" root = ConnectToSTK(version=11)\n",
" startTime = root.CurrentScenario.QueryInterface(STKObjects.IAgScenario).StartTime\n",
" stopTime = root.CurrentScenario.QueryInterface(STKObjects.IAgScenario).StartTime+3600\n",
" except:\n",
Expand All @@ -86,7 +86,7 @@
"\n",
"\n",
"def createConMsgBox():\n",
" res = messagebox.askyesno('Constellation Wizard',txt.get().replace(' ','-').replace(' ','-')+'.tce will be created and overwrite any existing file.\\nThis may take a while if there are many satellites in the scenario.\\nContinue?')\n",
" res = messagebox.askyesno('Constellation Wizard',txt.get().replace(' ','-')+'.tce will be created and overwrite any existing file.\\nThis may take a while if there are many satellites in the scenario.\\nContinue?')\n",
" if res == True:\n",
" CreateConstellation(root,txt,txtBox,ssc=00000)\n",
"\n",
Expand Down Expand Up @@ -127,11 +127,11 @@
"\n",
"# Save Deck Access\n",
"def saveDA():\n",
" newName = txt.get().replace(' ','-').replace(' ','-')\n",
" newName = txt.get().replace(' ','-')\n",
" res = messagebox.askyesno('Constellation Wizard',newName+'.tce will be created and overwrite any existing file.\\nContinue?')\n",
" if res == True:\n",
" copyfile(cwdFiles+'\\\\Constellations\\\\deckAccessTLE.tce', cwdFiles+'\\\\Constellations\\\\'+newName+'.tce')\n",
" txtBox.insert(END,'Created: '+txt.get().replace(' ','-').replace(' ','-')+'.tce\\n')\n",
" txtBox.insert(END,'Created: '+txt.get().replace(' ','-')+'.tce\\n')\n",
" \n",
"btnSave = Button(window,text='Save Deck Access',command=saveDA)\n",
"btnSave.grid(column=column,row=row,padx=padx,pady=pady,columnspan = 1,sticky=W+E)\n",
Expand Down Expand Up @@ -364,14 +364,14 @@
"row += 1\n",
"\n",
"# Satellite Template\n",
"def updateSatList(): \n",
" sats = FilterObjectsByType('Satellite',name = '')\n",
"def updateSatList(root): \n",
" sats = FilterObjectsByType(root,'Satellite',name = '')\n",
" for ii in range(len(sats)):\n",
" sats[ii] = sats[ii].split('/')[-1]\n",
" sats.insert(0,'')\n",
" comboSat['values'] = sats\n",
"comboSat = Combobox(window,width=width2,state='readonly',postcommand = updateSatList)\n",
"updateSatList()\n",
"updateSatList(root)\n",
"try:\n",
" comboSat.current(0) # set the selected item\n",
"except:\n",
Expand Down Expand Up @@ -413,14 +413,14 @@
"row += 1\n",
"\n",
"# Chain Template\n",
"def updateChainList(): \n",
" chains = FilterObjectsByType('Chain',name = '')\n",
"def updateChainList(root): \n",
" chains = FilterObjectsByType(root,'Chain',name = '')\n",
" for ii in range(len(chains)):\n",
" chains[ii] = chains[ii].split('/')[-1]\n",
"# chains.insert(0,'')\n",
" comboChain['values'] = chains\n",
"comboChain = Combobox(window,width=width2,state='readonly',postcommand = updateChainList)\n",
"updateChainList()\n",
"updateChainList(root)\n",
"try:\n",
" comboChain.current(0) # set the selected item\n",
"except:\n",
Expand All @@ -429,14 +429,14 @@
"row += 1\n",
"\n",
"# Chain Coverage\n",
"def updateCovList(): \n",
" covs = FilterObjectsByType('CoverageDefinition',name = '')\n",
"def updateCovList(root): \n",
" covs = FilterObjectsByType(root,'CoverageDefinition',name = '')\n",
" for ii in range(len(covs)):\n",
" covs[ii] = covs[ii].split('/')[-1]\n",
"# covs.insert(0,'')\n",
" comboCov['values'] = covs\n",
"comboCov = Combobox(window,width=width2,state='readonly',postcommand = updateCovList)\n",
"updateCovList()\n",
"updateCovList(root)\n",
"try:\n",
" comboCov.current(0) # set the selected item\n",
"except:\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,11 @@
"# aop = row['argp (deg)']\n",
"# mass = row['mass']\n",
"# ma = 0\n",
"# # Can add a column for mean anomaly of the first satellite to handle interplane phasing, otherwise the seed satellite will use a mean anomaly of 0\n",
"# try: \n",
"# ma = row['ma (deg)']\n",
"# except:\n",
"# ma = 0\n",
"# numSats = row['#sats']\n",
"\n",
"# # initial epoch\n",
Expand All @@ -471,7 +476,7 @@
"# UnloadObjs(root,'Satellite','*')\n",
"# print('Created: '+name+' at '+time.ctime())\n",
"\n",
"# root = ConnectToSTK()\n",
"# root = ConnectToSTK(version=11)\n",
"# UnloadObjs(root,'Satellite','*')\n",
"# planesPerOperator = df.groupby('Operator').describe()['#sats']['count']\n",
"# print('Starting to create constellations')\n",
Expand Down
Loading