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", Version = "1.0", 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" }