{"action":"created","issue":{"url":"https://api.github.com/repos/Pulsar4xDevs/Pulsar4x/issues/152","repository_url":"https://api.github.com/repos/Pulsar4xDevs/Pulsar4x","labels_url":"https://api.github.com/repos/Pulsar4xDevs/Pulsar4x/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/Pulsar4xDevs/Pulsar4x/issues/152/comments","events_url":"https://api.github.com/repos/Pulsar4xDevs/Pulsar4x/issues/152/events","html_url":"https://github.com/Pulsar4xDevs/Pulsar4x/issues/152","id":155703328,"number":152,"title":"Orbit Ring positions","user":{"login":"se5a","id":1490538,"avatar_url":"https://avatars.githubusercontent.com/u/1490538?v=3","gravatar_id":"","url":"https://api.github.com/users/se5a","html_url":"https://github.com/se5a","followers_url":"https://api.github.com/users/se5a/followers","following_url":"https://api.github.com/users/se5a/following{/other_user}","gists_url":"https://api.github.com/users/se5a/gists{/gist_id}","starred_url":"https://api.github.com/users/se5a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se5a/subscriptions","organizations_url":"https://api.github.com/users/se5a/orgs","repos_url":"https://api.github.com/users/se5a/repos","events_url":"https://api.github.com/users/se5a/events{/privacy}","received_events_url":"https://api.github.com/users/se5a/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-19T10:24:41Z","updated_at":"2016-06-18T02:42:08Z","closed_at":null,"body":"OrbitRings in the NewOrbitRings branch are out of position.\r\n\r\nthese orbit rings should be\r\na bit faster than how they're currently done.\r\na bit more control over the number of alpha arcs (OrbitRing.Segments = 1 to 255)\r\na bit more control over how much of the ring gets shown (OrbitRing.OrbitPercent )\r\nwill look better with lower segment counts (due to being arcs rather than lines)\r\n\r\nIn the NewOrbitRings branch, they are the red arcs, the white being the currently drawn ones.\r\n\r\nellipses are drawn by defining a rectangle, giving a position, and a width and a height.\r\narcs are drawn exactly the same way as an ellipse, but are given a start and sweep angle.\r\n\r\nto get an ellipse, we set the width and height, which gives us an ellipse, you can see this in the contructor. this is static. \r\nwe then have to rotate the ellipse so that the major axis is in line with the orbit we're trying to represent, this is also static, set in the constructor, and is is done as a transform in DrawMe().\r\n\r\nthe other important point is we have to position and rotate around the focal point, the focal point is static, but the position is not. these are also set in the contructor, and done as transforms in the DrawMe() method.\r\nnote that the position is stored as a reference to the datablob. \r\n\r\nI *think* the rotation is correct (for an non inclined orbit anyway, for an inclined orbit the current calculation is definitely wrong. I'm not sure how to calculate for an inclined orbit, but at this point all orbits are 2d)\r\nI suspect the focal point may be off. as I understand it, in a two body orbit, the child's focal point is at the parent's position.  (is this correct? maybe this is wrong)\r\n\r\n\r\nclass is here: https://github.com/Pulsar4xDevs/Pulsar4x/blob/ECS-NewOrbitRing/Pulsar4X/Pulsar4X.CrossPlatformUI/Views/OrbitRing.cs\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Pulsar4xDevs/Pulsar4x/issues/comments/226917391","html_url":"https://github.com/Pulsar4xDevs/Pulsar4x/issues/152#issuecomment-226917391","issue_url":"https://api.github.com/repos/Pulsar4xDevs/Pulsar4x/issues/152","id":226917391,"user":{"login":"se5a","id":1490538,"avatar_url":"https://avatars.githubusercontent.com/u/1490538?v=3","gravatar_id":"","url":"https://api.github.com/users/se5a","html_url":"https://github.com/se5a","followers_url":"https://api.github.com/users/se5a/followers","following_url":"https://api.github.com/users/se5a/following{/other_user}","gists_url":"https://api.github.com/users/se5a/gists{/gist_id}","starred_url":"https://api.github.com/users/se5a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se5a/subscriptions","organizations_url":"https://api.github.com/users/se5a/orgs","repos_url":"https://api.github.com/users/se5a/repos","events_url":"https://api.github.com/users/se5a/events{/privacy}","received_events_url":"https://api.github.com/users/se5a/received_events","type":"User","site_admin":false},"created_at":"2016-06-18T02:42:08Z","updated_at":"2016-06-18T02:42:08Z","body":"So we seem to have fixed the primary problem with this, (well done Nathan) though the fix leads me to suspect that there is a bug in the orbitProcessor somewhere, since the 'fix' doesn't make a whole lot of sense, ie: \r\n_rotation = (float)(_orbitDB.LongitudeOfAscendingNode + _orbitDB.ArgumentOfPeriapsis*2); \r\nwe can put trying to figure that out on the backburner, but it should probably be looked into at some point, just for the sake of correctness. \r\n\r\nNow that the orbit line is in the right place, I can see the start of the orbit line is not always where the planet is, at first I thought that this was because I wasn't adjusting for the planet speeding up and slowing down on elliptical orbits, but looking at the code, I'm getting the angle for where the start of the line should be directly from the position of the planet. so that's not it. though it does appear to be more prominent on more elliptical orbits... odd.  \r\nDo you want to keep banging away at this Nathan or do you want to do something different now? "}}
{"actor":{"display_login":"se5a"}}