{"action":"created","issue":{"url":"https://api.github.com/repos/Aclaiborne1/Delay_Deploy_Modular/issues/1","repository_url":"https://api.github.com/repos/Aclaiborne1/Delay_Deploy_Modular","labels_url":"https://api.github.com/repos/Aclaiborne1/Delay_Deploy_Modular/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Aclaiborne1/Delay_Deploy_Modular/issues/1/comments","events_url":"https://api.github.com/repos/Aclaiborne1/Delay_Deploy_Modular/issues/1/events","html_url":"https://github.com/Aclaiborne1/Delay_Deploy_Modular/issues/1","id":174927614,"number":1,"title":"Patch for improved max altitude and groundlevel assignment","user":{"login":"ekchess","id":21979299,"avatar_url":"https://avatars.githubusercontent.com/u/21979299?v=3","gravatar_id":"","url":"https://api.github.com/users/ekchess","html_url":"https://github.com/ekchess","followers_url":"https://api.github.com/users/ekchess/followers","following_url":"https://api.github.com/users/ekchess/following{/other_user}","gists_url":"https://api.github.com/users/ekchess/gists{/gist_id}","starred_url":"https://api.github.com/users/ekchess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekchess/subscriptions","organizations_url":"https://api.github.com/users/ekchess/orgs","repos_url":"https://api.github.com/users/ekchess/repos","events_url":"https://api.github.com/users/ekchess/events{/privacy}","received_events_url":"https://api.github.com/users/ekchess/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-04T02:23:53Z","updated_at":"2016-09-04T03:52:09Z","closed_at":null,"body":"While testing the program I noticed that the max altitude was not being selected properly prior to storage in FRAM, nor was the ground level being recorded in FRAM correctly.  Both functions were in the Rocket.cpp file, and the patched versions of getgroundlevel() and altitude() are shown below.\r\n\r\nvoid getgroundlevel()\r\n{\r\n  int i, intground;\r\n  float floatground, groundacc;\r\n  \r\n  groundacc = 0.0;\r\n  for (i = 0; i < 10; i++)\r\n    groundacc += getaltitude();\r\n  \r\n  floatground = groundacc / 10.0; // gets average value\r\n  groundlevel = 3.2808 * floatground; // converting meters to feet\r\n  \r\n // intground = floatground + 0.5; //error in original program\r\n  intground = (int) groundlevel + 0.5; // store ground level in feet as an int\r\n  store(intground, groundAdd); // store for posterity\r\n} \r\n\r\nint apogee()\r\n{\r\n  int i, temp, mheight, mheight2, mheight3;\r\n  int dataindex = 0;\r\n  mheight = 0; mheight2 = 0; mheight3 = 0;\r\n  for (i=1; i < limit; i++)\r\n  {\r\n    temp = retrieve(altstart + dataindex);\r\n    if (temp > mheight)\r\n    {\r\n      mheight3 = mheight2; //added to correct assignment\r\n      mheight2 = mheight;  //added to correct assignment\r\n      mheight = temp;\r\n    }\r\n      \r\n    if ((temp < mheight) && (temp > mheight2))\r\n    {\r\n      mheight3 = mheight2;  //added to correct assignment\r\n      mheight2 = temp;\r\n    }\r\n      \r\n    if ((temp < mheight) && (temp < mheight2) && (temp > mheight3))\r\n      mheight3 = temp;\r\n    dataindex += 2; //two bytes to make an integer\r\n  }\r\n  return(mheight3);\r\n}"},"comment":{"url":"https://api.github.com/repos/Aclaiborne1/Delay_Deploy_Modular/issues/comments/244582839","html_url":"https://github.com/Aclaiborne1/Delay_Deploy_Modular/issues/1#issuecomment-244582839","issue_url":"https://api.github.com/repos/Aclaiborne1/Delay_Deploy_Modular/issues/1","id":244582839,"user":{"login":"Aclaiborne1","id":10331675,"avatar_url":"https://avatars.githubusercontent.com/u/10331675?v=3","gravatar_id":"","url":"https://api.github.com/users/Aclaiborne1","html_url":"https://github.com/Aclaiborne1","followers_url":"https://api.github.com/users/Aclaiborne1/followers","following_url":"https://api.github.com/users/Aclaiborne1/following{/other_user}","gists_url":"https://api.github.com/users/Aclaiborne1/gists{/gist_id}","starred_url":"https://api.github.com/users/Aclaiborne1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aclaiborne1/subscriptions","organizations_url":"https://api.github.com/users/Aclaiborne1/orgs","repos_url":"https://api.github.com/users/Aclaiborne1/repos","events_url":"https://api.github.com/users/Aclaiborne1/events{/privacy}","received_events_url":"https://api.github.com/users/Aclaiborne1/received_events","type":"User","site_admin":false},"created_at":"2016-09-04T03:52:08Z","updated_at":"2016-09-04T03:52:08Z","body":"I like this change.  I want to try it out.  Thanks!\n\nAnthony Claiborne\n\n> On Sep 3, 2016, at 7:23 PM, ekchess <notifications@github.com> wrote:\n> \n> While testing the program I noticed that the max altitude was not being selected properly prior to storage in FRAM, nor was the ground level being recorded in FRAM correctly. Both functions were in the Rocket.cpp file, and the patched versions of getgroundlevel() and altitude() are shown below.\n> \n> void getgroundlevel()\n> {\n> int i, intground;\n> float floatground, groundacc;\n> \n> groundacc = 0.0;\n> for (i = 0; i < 10; i++)\n> groundacc += getaltitude();\n> \n> floatground = groundacc / 10.0; // gets average value\n> groundlevel = 3.2808 * floatground; // converting meters to feet\n> \n> // intground = floatground + 0.5; //error in original program\n> intground = (int) groundlevel + 0.5; // store ground level in feet as an int\n> store(intground, groundAdd); // store for posterity\n> }\n> \n> int apogee()\n> {\n> int i, temp, mheight, mheight2, mheight3;\n> int dataindex = 0;\n> mheight = 0; mheight2 = 0; mheight3 = 0;\n> for (i=1; i < limit; i++)\n> {\n> temp = retrieve(altstart + dataindex);\n> if (temp > mheight)\n> {\n> mheight3 = mheight2; //added to correct assignment\n> mheight2 = mheight; //added to correct assignment\n> mheight = temp;\n> }\n> \n> if ((temp < mheight) && (temp > mheight2))\n> {\n>   mheight3 = mheight2;  //added to correct assignment\n>   mheight2 = temp;\n> }\n> \n> if ((temp < mheight) && (temp < mheight2) && (temp > mheight3))\n>   mheight3 = temp;\n> dataindex += 2; //two bytes to make an integer\n> }\n> return(mheight3);\n> }\n> \n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub <https://github.com/Aclaiborne1/Delay_Deploy_Modular/issues/1>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJ2mG5o-ixNnH-r8QWvk8WDFYPOsN6Soks5qmiu5gaJpZM4J0cMW>.\n> \n> {\"api_version\":\"1.0\",\"publisher\":{\"api_key\":\"05dde50f1d1a384dd78767c55493e4bb\",\"name\":\"GitHub\"},\"entity\":{\"external_key\":\"github/Aclaiborne1/Delay_Deploy_Modular\",\"title\":\"Aclaiborne1/Delay_Deploy_Modular\",\"subtitle\":\"GitHub repository\",\"main_image_url\":\"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png\",\"avatar_image_url\":\"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png\",\"action\":{\"name\":\"Open in GitHub\",\"url\":\"https://github.com/Aclaiborne1/Delay_Deploy_Modular\"}},\"updates\":{\"snippets\":[{\"icon\":\"DESCRIPTION\",\"message\":\"Patch for improved max altitude and groundlevel assignment (#1)\"}],\"action\":{\"name\":\"View Issue\",\"url\":\"https://github.com/Aclaiborne1/Delay_Deploy_Modular/issues/1\"}}}\n\n"}}
{"actor":{"display_login":"Aclaiborne1"}}