Added support for coordinate systems: old GSM as Static, real GSM, SM, GSE and time dependent GSM and SM (#3392)

* added old GSM as Static, real GSM, SM, GSE and time dependent GSM and SM

* small formating

* i dont rember changing this, so taking it back

* added support for time dependent GSM and SM to work to year 2099

* added newer kernel

* added HEEQ and HEE

* better naming and descriptions

* rename lowercase

* naming rewrite

* fix after name change

* added earth centric tf files. sun centric left to do and .bpc files and .bsp files

* including kernels with asset.resource now. Left is weather to move or change examples/debugcoordinateaxes

* minor naming cleanup

* cleanup. remove comment

* getting rid of debugcoordinateaxes example asset
This commit is contained in:
ElonOlsson
2024-12-10 18:05:40 -05:00
committed by GitHub
parent 2856085724
commit aad10ec154
11 changed files with 453 additions and 287 deletions

View File

@@ -1,133 +0,0 @@
local earthTransforms = asset.require("scene/solarsystem/planets/earth/transforms")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local SunRadius = 6.957E8
local EarthRadius = 6.371E6
local EarthBarycenterAxes = {
Identifier = "EarthBarycenterAxes",
Parent = earthTransforms.EarthBarycenter.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = EarthRadius * 3.5
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "Earth Barycenter Axes",
Path = "/Other/Coordinate Systems"
}
}
local EarthInertialAxes = {
Identifier = "EarthInertialAxes",
Parent = earthTransforms.EarthInertial.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = EarthRadius * 2.5
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "Earth Inertial Axes",
Path = "/Other/Coordinate Systems"
}
}
local EarthIAUAxes = {
Identifier = "EarthIAUAxes",
Parent = earthTransforms.EarthIAU.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = EarthRadius * 1.5
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "Earth IAU Axes",
Path = "/Other/Coordinate Systems"
}
}
local SunIAUAxes = {
Identifier = "SunIAUAxes",
Parent = sunTransforms.SunIAU.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = SunRadius * 300
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "Sun IAU Axes",
Path = "/Other/Coordinate Systems"
}
}
local SolarSystemBarycenterAxes = {
Identifier = "SolarSystemBarycenterAxes",
Parent = sunTransforms.SolarSystemBarycenter.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = SunRadius * 300
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "Solar System Barycenter Axes",
Path = "/Other/Coordinate Systems"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(EarthBarycenterAxes)
openspace.addSceneGraphNode(EarthInertialAxes)
openspace.addSceneGraphNode(EarthIAUAxes)
openspace.addSceneGraphNode(SunIAUAxes)
openspace.addSceneGraphNode(SolarSystemBarycenterAxes)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(SolarSystemBarycenterAxes)
openspace.removeSceneGraphNode(SunIAUAxes)
openspace.removeSceneGraphNode(EarthIAUAxes)
openspace.removeSceneGraphNode(EarthInertialAxes)
openspace.removeSceneGraphNode(EarthBarycenterAxes)
end)
asset.export(EarthBarycenterAxes)
asset.export(EarthInertialAxes)
asset.export(EarthIAUAxes)
asset.export(SunIAUAxes)
asset.export(SolarSystemBarycenterAxes)
asset.meta = {
Name = "Debug Coordinates",
Description = [[A set of coordinate axes demonstrating different XYZ coordinate
reference frames that are useful for debugging, such as the Earth or Solar
System Barycenter.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}