jkgarner -> Satellite generation in Latest release... (10/12/2021 4:36:12 PM)
|
I have been successfully creating satellites under version 1.15.5 (Pro) with no issues As we upgraded to the latest version (2), our satellite generation code stopped working. For example, say I wish to create a SAR Satellite using TOPAZ (dbid 95) as a template and match it to a TLE that I pulled from the Internet: In version 1.15.5 I would execute code like the following snippet:
ScenEdit_AddUnit({type='Satellite', side='US', guid='18957U', dbid=95 name='COSMOS 1932', Latitude='0',Longitude='0'})
local satU = ScenEdit.GetUnit({side='US', name='COSMOS 1932'})
local newTLE = 'COSMOS 1932\n1 18957U 88019A 20179.87780374 -.00000067 00000-0 19462-4 0 9999\n2 18957 65.0451 329.9962 0059909 254.4223 105.0217 13.79684050628349'
satU:updateorbit({TLE=newTLE})
Worked like a charm. In version 2, it returns an error from the ScenEdit_AddUnit: Script: ScenEdit_AddUnit({type='Satellite', side='US', dbid=95 name='COSMOS 1932', Latitude=0,Longitude=0}) Result: ScenEdit_AddUnit 0 : ,Unable to create new unit. Reason: Object reference not set to an instance of an object. Based on information in the forums, I tried a few other tests: Script: ScenEdit_AddUnit({type='Satellite', side='US', dbid=95, name='COSMOS 1932', guid='5',Latitude=0,Longitude=0}) Result: ScenEdit_AddUnit 0 : ,Unable to create new unit. Reason: Object reference not set to an instance of an object. Script: ScenEdit_AddUnit({type='Satellite', side='US', dbid=95, name='COSMOS 1932', orbit='5', Latitude=0,Longitude=0}) Result: ScenEdit_AddUnit 0 : ,Unable to create new unit. Reason: The given key was not present in the dictionary. Script: ScenEdit_AddUnit({type='Satellite', side='US', dbid=95, name='COSMOS 1932', orbit='5',guid='5', Latitude=0,Longitude=0}) Result: ScenEdit_AddUnit 0 : ,Unable to create new unit. Reason: There is no row at position 0. I short, there seems to have been a change between version 1.15.5 and version 2 with regards to Satellite creation/processing from Lua, which causes the code not to work. Any ideas what has changed or how I should alter my (once functional) scripts to get them to function in the latest build? [&:]
|
|
|
|