{"action":"created","comment":{"url":"https://api.github.com/repos/KMC-70/kaos/pulls/comments/232776690","pull_request_review_id":174047005,"id":232776690,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjc3NjY5MA==","diff_hunk":"@@ -0,0 +1,90 @@\n+from math import sqrt,sin,cos,pi,atan,tan\n+from numpy import rad2deg,deg2rad\n+from astropy import coordinates, units\n+from astropy.time import Time\n+from kaos.algorithm import Vector3D\n+\n+def lla_to_ecef(lat, lon, alt=0):\n+    \"\"\"converts latitude, longitude, and altitude to earth-centered, earth-fixed (ECEF) Cartesian.\n+\n+    Args:\n+    lat = geodetic latitude (decimal degrees)\n+    lon = longitude (decimal degrees)\n+    alt = height above WGS84 ellipsoid (m)\n+\n+    Returns:\n+    (x,y,z) such that:\n+      x = ECEF X-coordinate (m)\n+      y = ECEF Y-coordinate (m)\n+      z = ECEF Z-coordinate (m)\n+\n+    Notes: This function assumes the WGS84 model. Latitude is customary geodetic (not geocentric).\n+\n+    Source: Adapted from a Matlab script by Michael Kleder\n+    https://www.mathworks.com/matlabcentral/fileexchange/7942-covert-lat-lon-alt-to-ecef-cartesian\n+\n+    based on: Department of Defense World Geodetic System 1984\"\n+              Page 4-4\n+              National Imagery and Mapping Agency\n+              Last updated June, 2004\n+              NIMA TR8350.2\n+    \"\"\"\n+\n+    # WGS84 ellipsoid constants:\n+    a = 6378137\n+    e = 8.1819190842622e-2\n+    #decimal degrees to radians\n+    lat = lat/360*2*pi\n+    lon = lon/360*2*pi\n+    # intermediate calculation\n+    # (prime vertical radius of curvature)\n+    N = a / sqrt(1 - pow(e,2) * pow(sin(lat),2))\n+    # results:\n+    x = (N+alt) * cos(lat) * cos(lon)\n+    y = (N+alt) * cos(lat) * sin(lon)\n+    z = ((1-pow(e,2)) * N + alt) * sin(lat)\n+\n+    return (x,y,z)","path":"kaos/algorithm/coord_conversion.py","position":47,"original_position":47,"commit_id":"cca50eda9a33e5cff29dabc0296e129c183a62fb","original_commit_id":"cca50eda9a33e5cff29dabc0296e129c183a62fb","user":{"login":"ZeyadTamimi","id":14227029,"node_id":"MDQ6VXNlcjE0MjI3MDI5","avatar_url":"https://avatars1.githubusercontent.com/u/14227029?v=4","gravatar_id":"","url":"https://api.github.com/users/ZeyadTamimi","html_url":"https://github.com/ZeyadTamimi","followers_url":"https://api.github.com/users/ZeyadTamimi/followers","following_url":"https://api.github.com/users/ZeyadTamimi/following{/other_user}","gists_url":"https://api.github.com/users/ZeyadTamimi/gists{/gist_id}","starred_url":"https://api.github.com/users/ZeyadTamimi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZeyadTamimi/subscriptions","organizations_url":"https://api.github.com/users/ZeyadTamimi/orgs","repos_url":"https://api.github.com/users/ZeyadTamimi/repos","events_url":"https://api.github.com/users/ZeyadTamimi/events{/privacy}","received_events_url":"https://api.github.com/users/ZeyadTamimi/received_events","type":"User","site_admin":false},"body":"Vector3D?","created_at":"2018-11-12T19:04:54Z","updated_at":"2018-11-12T19:05:59Z","html_url":"https://github.com/KMC-70/kaos/pull/6#discussion_r232776690","pull_request_url":"https://api.github.com/repos/KMC-70/kaos/pulls/6","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/KMC-70/kaos/pulls/comments/232776690"},"html":{"href":"https://github.com/KMC-70/kaos/pull/6#discussion_r232776690"},"pull_request":{"href":"https://api.github.com/repos/KMC-70/kaos/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/KMC-70/kaos/pulls/6","id":230234125,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMjM0MTI1","html_url":"https://github.com/KMC-70/kaos/pull/6","diff_url":"https://github.com/KMC-70/kaos/pull/6.diff","patch_url":"https://github.com/KMC-70/kaos/pull/6.patch","issue_url":"https://api.github.com/repos/KMC-70/kaos/issues/6","number":6,"state":"open","locked":false,"title":"Coord translations","user":{"login":"rouyeen","id":14202455,"node_id":"MDQ6VXNlcjE0MjAyNDU1","avatar_url":"https://avatars1.githubusercontent.com/u/14202455?v=4","gravatar_id":"","url":"https://api.github.com/users/rouyeen","html_url":"https://github.com/rouyeen","followers_url":"https://api.github.com/users/rouyeen/followers","following_url":"https://api.github.com/users/rouyeen/following{/other_user}","gists_url":"https://api.github.com/users/rouyeen/gists{/gist_id}","starred_url":"https://api.github.com/users/rouyeen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rouyeen/subscriptions","organizations_url":"https://api.github.com/users/rouyeen/orgs","repos_url":"https://api.github.com/users/rouyeen/repos","events_url":"https://api.github.com/users/rouyeen/events{/privacy}","received_events_url":"https://api.github.com/users/rouyeen/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-12T18:52:00Z","updated_at":"2018-11-12T19:05:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1505cdc9027042ff14631c8ecdfdebbfcfc36d1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/KMC-70/kaos/pulls/6/commits","review_comments_url":"https://api.github.com/repos/KMC-70/kaos/pulls/6/comments","review_comment_url":"https://api.github.com/repos/KMC-70/kaos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KMC-70/kaos/issues/6/comments","statuses_url":"https://api.github.com/repos/KMC-70/kaos/statuses/cca50eda9a33e5cff29dabc0296e129c183a62fb","head":{"label":"KMC-70:coord_translations","ref":"coord_translations","sha":"cca50eda9a33e5cff29dabc0296e129c183a62fb","user":{"login":"KMC-70","id":43869542,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzODY5NTQy","avatar_url":"https://avatars2.githubusercontent.com/u/43869542?v=4","gravatar_id":"","url":"https://api.github.com/users/KMC-70","html_url":"https://github.com/KMC-70","followers_url":"https://api.github.com/users/KMC-70/followers","following_url":"https://api.github.com/users/KMC-70/following{/other_user}","gists_url":"https://api.github.com/users/KMC-70/gists{/gist_id}","starred_url":"https://api.github.com/users/KMC-70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KMC-70/subscriptions","organizations_url":"https://api.github.com/users/KMC-70/orgs","repos_url":"https://api.github.com/users/KMC-70/repos","events_url":"https://api.github.com/users/KMC-70/events{/privacy}","received_events_url":"https://api.github.com/users/KMC-70/received_events","type":"Organization","site_admin":false},"repo":{"id":151758240,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE3NTgyNDA=","name":"kaos","full_name":"KMC-70/kaos","private":false,"owner":{"login":"KMC-70","id":43869542,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzODY5NTQy","avatar_url":"https://avatars2.githubusercontent.com/u/43869542?v=4","gravatar_id":"","url":"https://api.github.com/users/KMC-70","html_url":"https://github.com/KMC-70","followers_url":"https://api.github.com/users/KMC-70/followers","following_url":"https://api.github.com/users/KMC-70/following{/other_user}","gists_url":"https://api.github.com/users/KMC-70/gists{/gist_id}","starred_url":"https://api.github.com/users/KMC-70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KMC-70/subscriptions","organizations_url":"https://api.github.com/users/KMC-70/orgs","repos_url":"https://api.github.com/users/KMC-70/repos","events_url":"https://api.github.com/users/KMC-70/events{/privacy}","received_events_url":"https://api.github.com/users/KMC-70/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/KMC-70/kaos","description":"KAOS: Kerbodyne Analytical Orbit System","fork":false,"url":"https://api.github.com/repos/KMC-70/kaos","forks_url":"https://api.github.com/repos/KMC-70/kaos/forks","keys_url":"https://api.github.com/repos/KMC-70/kaos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KMC-70/kaos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KMC-70/kaos/teams","hooks_url":"https://api.github.com/repos/KMC-70/kaos/hooks","issue_events_url":"https://api.github.com/repos/KMC-70/kaos/issues/events{/number}","events_url":"https://api.github.com/repos/KMC-70/kaos/events","assignees_url":"https://api.github.com/repos/KMC-70/kaos/assignees{/user}","branches_url":"https://api.github.com/repos/KMC-70/kaos/branches{/branch}","tags_url":"https://api.github.com/repos/KMC-70/kaos/tags","blobs_url":"https://api.github.com/repos/KMC-70/kaos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KMC-70/kaos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KMC-70/kaos/git/refs{/sha}","trees_url":"https://api.github.com/repos/KMC-70/kaos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KMC-70/kaos/statuses/{sha}","languages_url":"https://api.github.com/repos/KMC-70/kaos/languages","stargazers_url":"https://api.github.com/repos/KMC-70/kaos/stargazers","contributors_url":"https://api.github.com/repos/KMC-70/kaos/contributors","subscribers_url":"https://api.github.com/repos/KMC-70/kaos/subscribers","subscription_url":"https://api.github.com/repos/KMC-70/kaos/subscription","commits_url":"https://api.github.com/repos/KMC-70/kaos/commits{/sha}","git_commits_url":"https://api.github.com/repos/KMC-70/kaos/git/commits{/sha}","comments_url":"https://api.github.com/repos/KMC-70/kaos/comments{/number}","issue_comment_url":"https://api.github.com/repos/KMC-70/kaos/issues/comments{/number}","contents_url":"https://api.github.com/repos/KMC-70/kaos/contents/{+path}","compare_url":"https://api.github.com/repos/KMC-70/kaos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KMC-70/kaos/merges","archive_url":"https://api.github.com/repos/KMC-70/kaos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KMC-70/kaos/downloads","issues_url":"https://api.github.com/repos/KMC-70/kaos/issues{/number}","pulls_url":"https://api.github.com/repos/KMC-70/kaos/pulls{/number}","milestones_url":"https://api.github.com/repos/KMC-70/kaos/milestones{/number}","notifications_url":"https://api.github.com/repos/KMC-70/kaos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KMC-70/kaos/labels{/name}","releases_url":"https://api.github.com/repos/KMC-70/kaos/releases{/id}","deployments_url":"https://api.github.com/repos/KMC-70/kaos/deployments","created_at":"2018-10-05T17:50:45Z","updated_at":"2018-11-11T17:49:06Z","pushed_at":"2018-11-12T19:02:11Z","git_url":"git://github.com/KMC-70/kaos.git","ssh_url":"git@github.com:KMC-70/kaos.git","clone_url":"https://github.com/KMC-70/kaos.git","svn_url":"https://github.com/KMC-70/kaos","homepage":null,"size":2447,"stargazers_count":0,"watchers_count":0,"language":"Eiffel","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"KMC-70:master","ref":"master","sha":"977b55acd57a9097b8a364c0af3863245e079903","user":{"login":"KMC-70","id":43869542,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzODY5NTQy","avatar_url":"https://avatars2.githubusercontent.com/u/43869542?v=4","gravatar_id":"","url":"https://api.github.com/users/KMC-70","html_url":"https://github.com/KMC-70","followers_url":"https://api.github.com/users/KMC-70/followers","following_url":"https://api.github.com/users/KMC-70/following{/other_user}","gists_url":"https://api.github.com/users/KMC-70/gists{/gist_id}","starred_url":"https://api.github.com/users/KMC-70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KMC-70/subscriptions","organizations_url":"https://api.github.com/users/KMC-70/orgs","repos_url":"https://api.github.com/users/KMC-70/repos","events_url":"https://api.github.com/users/KMC-70/events{/privacy}","received_events_url":"https://api.github.com/users/KMC-70/received_events","type":"Organization","site_admin":false},"repo":{"id":151758240,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE3NTgyNDA=","name":"kaos","full_name":"KMC-70/kaos","private":false,"owner":{"login":"KMC-70","id":43869542,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzODY5NTQy","avatar_url":"https://avatars2.githubusercontent.com/u/43869542?v=4","gravatar_id":"","url":"https://api.github.com/users/KMC-70","html_url":"https://github.com/KMC-70","followers_url":"https://api.github.com/users/KMC-70/followers","following_url":"https://api.github.com/users/KMC-70/following{/other_user}","gists_url":"https://api.github.com/users/KMC-70/gists{/gist_id}","starred_url":"https://api.github.com/users/KMC-70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KMC-70/subscriptions","organizations_url":"https://api.github.com/users/KMC-70/orgs","repos_url":"https://api.github.com/users/KMC-70/repos","events_url":"https://api.github.com/users/KMC-70/events{/privacy}","received_events_url":"https://api.github.com/users/KMC-70/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/KMC-70/kaos","description":"KAOS: Kerbodyne Analytical Orbit System","fork":false,"url":"https://api.github.com/repos/KMC-70/kaos","forks_url":"https://api.github.com/repos/KMC-70/kaos/forks","keys_url":"https://api.github.com/repos/KMC-70/kaos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KMC-70/kaos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KMC-70/kaos/teams","hooks_url":"https://api.github.com/repos/KMC-70/kaos/hooks","issue_events_url":"https://api.github.com/repos/KMC-70/kaos/issues/events{/number}","events_url":"https://api.github.com/repos/KMC-70/kaos/events","assignees_url":"https://api.github.com/repos/KMC-70/kaos/assignees{/user}","branches_url":"https://api.github.com/repos/KMC-70/kaos/branches{/branch}","tags_url":"https://api.github.com/repos/KMC-70/kaos/tags","blobs_url":"https://api.github.com/repos/KMC-70/kaos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KMC-70/kaos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KMC-70/kaos/git/refs{/sha}","trees_url":"https://api.github.com/repos/KMC-70/kaos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KMC-70/kaos/statuses/{sha}","languages_url":"https://api.github.com/repos/KMC-70/kaos/languages","stargazers_url":"https://api.github.com/repos/KMC-70/kaos/stargazers","contributors_url":"https://api.github.com/repos/KMC-70/kaos/contributors","subscribers_url":"https://api.github.com/repos/KMC-70/kaos/subscribers","subscription_url":"https://api.github.com/repos/KMC-70/kaos/subscription","commits_url":"https://api.github.com/repos/KMC-70/kaos/commits{/sha}","git_commits_url":"https://api.github.com/repos/KMC-70/kaos/git/commits{/sha}","comments_url":"https://api.github.com/repos/KMC-70/kaos/comments{/number}","issue_comment_url":"https://api.github.com/repos/KMC-70/kaos/issues/comments{/number}","contents_url":"https://api.github.com/repos/KMC-70/kaos/contents/{+path}","compare_url":"https://api.github.com/repos/KMC-70/kaos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KMC-70/kaos/merges","archive_url":"https://api.github.com/repos/KMC-70/kaos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KMC-70/kaos/downloads","issues_url":"https://api.github.com/repos/KMC-70/kaos/issues{/number}","pulls_url":"https://api.github.com/repos/KMC-70/kaos/pulls{/number}","milestones_url":"https://api.github.com/repos/KMC-70/kaos/milestones{/number}","notifications_url":"https://api.github.com/repos/KMC-70/kaos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KMC-70/kaos/labels{/name}","releases_url":"https://api.github.com/repos/KMC-70/kaos/releases{/id}","deployments_url":"https://api.github.com/repos/KMC-70/kaos/deployments","created_at":"2018-10-05T17:50:45Z","updated_at":"2018-11-11T17:49:06Z","pushed_at":"2018-11-12T19:02:11Z","git_url":"git://github.com/KMC-70/kaos.git","ssh_url":"git@github.com:KMC-70/kaos.git","clone_url":"https://github.com/KMC-70/kaos.git","svn_url":"https://github.com/KMC-70/kaos","homepage":null,"size":2447,"stargazers_count":0,"watchers_count":0,"language":"Eiffel","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KMC-70/kaos/pulls/6"},"html":{"href":"https://github.com/KMC-70/kaos/pull/6"},"issue":{"href":"https://api.github.com/repos/KMC-70/kaos/issues/6"},"comments":{"href":"https://api.github.com/repos/KMC-70/kaos/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/KMC-70/kaos/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/KMC-70/kaos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KMC-70/kaos/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/KMC-70/kaos/statuses/cca50eda9a33e5cff29dabc0296e129c183a62fb"}},"author_association":"NONE"}}
{"actor":{"display_login":"ZeyadTamimi"}}