{"action":"created","issue":{"url":"https://api.github.com/repos/MOARdV/AvionicsSystems/issues/11","repository_url":"https://api.github.com/repos/MOARdV/AvionicsSystems","labels_url":"https://api.github.com/repos/MOARdV/AvionicsSystems/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/MOARdV/AvionicsSystems/issues/11/comments","events_url":"https://api.github.com/repos/MOARdV/AvionicsSystems/issues/11/events","html_url":"https://github.com/MOARdV/AvionicsSystems/issues/11","id":172817984,"number":11,"title":"Navigation as a first-class component","user":{"login":"MOARdV","id":6089493,"avatar_url":"https://avatars0.githubusercontent.com/u/6089493?v=4","gravatar_id":"","url":"https://api.github.com/users/MOARdV","html_url":"https://github.com/MOARdV","followers_url":"https://api.github.com/users/MOARdV/followers","following_url":"https://api.github.com/users/MOARdV/following{/other_user}","gists_url":"https://api.github.com/users/MOARdV/gists{/gist_id}","starred_url":"https://api.github.com/users/MOARdV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MOARdV/subscriptions","organizations_url":"https://api.github.com/users/MOARdV/orgs","repos_url":"https://api.github.com/users/MOARdV/repos","events_url":"https://api.github.com/users/MOARdV/events{/privacy}","received_events_url":"https://api.github.com/users/MOARdV/received_events","type":"User","site_admin":false},"labels":[{"id":401952386,"url":"https://api.github.com/repos/MOARdV/AvionicsSystems/labels/enhancement","name":"enhancement","color":"bada55","default":true}],"state":"open","locked":false,"assignee":{"login":"MOARdV","id":6089493,"avatar_url":"https://avatars0.githubusercontent.com/u/6089493?v=4","gravatar_id":"","url":"https://api.github.com/users/MOARdV","html_url":"https://github.com/MOARdV","followers_url":"https://api.github.com/users/MOARdV/followers","following_url":"https://api.github.com/users/MOARdV/following{/other_user}","gists_url":"https://api.github.com/users/MOARdV/gists{/gist_id}","starred_url":"https://api.github.com/users/MOARdV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MOARdV/subscriptions","organizations_url":"https://api.github.com/users/MOARdV/orgs","repos_url":"https://api.github.com/users/MOARdV/repos","events_url":"https://api.github.com/users/MOARdV/events{/privacy}","received_events_url":"https://api.github.com/users/MOARdV/received_events","type":"User","site_admin":false},"assignees":[{"login":"MOARdV","id":6089493,"avatar_url":"https://avatars0.githubusercontent.com/u/6089493?v=4","gravatar_id":"","url":"https://api.github.com/users/MOARdV","html_url":"https://github.com/MOARdV","followers_url":"https://api.github.com/users/MOARdV/followers","following_url":"https://api.github.com/users/MOARdV/following{/other_user}","gists_url":"https://api.github.com/users/MOARdV/gists{/gist_id}","starred_url":"https://api.github.com/users/MOARdV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MOARdV/subscriptions","organizations_url":"https://api.github.com/users/MOARdV/orgs","repos_url":"https://api.github.com/users/MOARdV/repos","events_url":"https://api.github.com/users/MOARdV/events{/privacy}","received_events_url":"https://api.github.com/users/MOARdV/received_events","type":"User","site_admin":false}],"milestone":null,"comments":73,"created_at":"2016-08-23T21:59:47Z","updated_at":"2017-11-21T19:14:45Z","closed_at":null,"author_association":"OWNER","body":"Those airplane people like having radio navigation beacons and stuff like that on Kerbin. :)\r\n\r\nSince KSP 1.2 purportedly will allow manual placement of waypoints, and support naming them, I expect to be able to grab on to that system to help manage the waypoints.  Since there are multiple types of nav beacon, and they have frequencies, I'll need to encode that data in the name - such as `VOR:AAA1@118.1` encoding a VOR-type beacon named AAA1 at the frequency 118.1.\r\n\r\nI guess I should take some time to learn what sort of information will need to be represented as variables in-game.  Most likely I'll need a proxy object to wrap around the waypoints so the Lua script can have things like\r\n\r\n```\r\nlocal nav1 = nil\r\n\r\nfunction SetWaypointFromFrequency(frequency)\r\n  nav1 = nav.GetWaypointFromFrequency(frequency)\r\n  if nav1 ~= nil then\r\n    -- Do whatever\r\n  end\r\nend\r\n```\r\n\r\nAnd so on.\r\n\r\nList of functions:\r\n- [x] Bearing(lat1, lon1, lat2, lon2): Bearing from position 1 to position 2.\r\n- [x] BearingFromVessel(lat, lon): Bearing from vessel position to lat/lon parameters.\r\n- [x] DestinationLatitude(lat, lon, range, bearing): Latitude that will be reached starting at lat/lon and going along `bearing` to `range`.\r\n- [x] DestinationLatitudeFromVessel(range, bearing): Latitude that is `range` meters along `bearing`.\r\n- [x] DestinationLongitude(lat, lon, range, bearing): Same as above, but longitude.\r\n- [x] DestinationLongitudeFromVessel(range, bearing): Save as above, but longitude.\r\n- [x] GroundDistance(lat1, lon2, lat2, lon2): Ground distance between coordinates, assuming sea level.\r\n- [x] GroundDistanceFromVessel(lat, lon): Ground distance to coordinate from vessel, assuming sea level.\r\n- [x] LineOfSight(altitude): Distance to horizon from `altitude`, assuming sea level horizon and no mountains.\r\n- [ ] IntersectionOfTwoPaths(...)\r\n- [ ] CrossTrackDistance(...)\r\n- [ ] SlantDistance(lat1, lon1, alt1, lat2, lon2, alt2): Slant distance between two points.\r\n- [ ] SlantDistanceFromVessel(lat, lon, alt): Slant distance to a point from the vessel.\r\n\r\nStock Waypoint Functions:\r\n- [x] GetNumberWaypoints(): Number of waypoints in the stock Custom Waypoints list.\r\n- [ ] SetWaypoint(number): Set stock Waypoint to the listed waypoint.\r\n- [ ] GetWaypointBearing(): Bearing to the current waypoint.\r\n- [ ] GetWaypointDistance(): Slant distance to the waypoint.\r\n- [ ] GetWaypointLatitude():\r\n- [ ] GetWaypointLongitude():\r\n- [ ] GetWaypointAltitude():\r\n\r\nNavigation Beacon Functions:\r\n- [x] SetRadioFrequency(radioId, frequency): Set radio number `radioId` to frequency.\r\n- [x] GetRadioFrequency(radioId): Get the frequency for radio `radioId`.\r\n- [x] GetDMESlantDistance(radioId): Get the slant distance to the beacon selected by radio `radioId`.\r\n- [x] GetILSLocalizerError(radioId): Get the horizontal error from the localizer signal.\r\n- [x] GetILSLocalizerErrorValid(radioId): Is the localizer error valid?\r\n- [x] GetILSGlideSlopeError(radioId, glideSlope): Get the vertical error from the specified glide slope.\r\n- [x] GetILSGlideSlopeErrorValid(radioId, glideSlope): Is the glide slope error valid?\r\n- [x] GetNavAidDME(radioId): Is the beacon a DME, and is it in range?\r\n- [x] GetNavAidIdentifier(radioId): Get the three-letter code for the beacon.\r\n- [x] GetNavAidName(radioId): Get the name for the beacon.\r\n- [x] GetNavAidType(radioId): What type of beacon is this radio detecting?\r\n- [x] GetNDBBearing(radioId): Returns the vessel heading-relative bearing, if the beacon is NDB.\r\n- [x] GetVORDeviation(radioId, bearing): Returns the deviation from the desired bearing to/from, [-90, +90].\r\n- [x] GetVORApproach(radioId, bearing): Returns 1 (TO), 0 (NO SIGNAL), -1 (FROM).\r\n- [ ] PlayNavAidIdentifier(radioId): Play the morse code audio corresponding to the identifier for the beacon."},"comment":{"url":"https://api.github.com/repos/MOARdV/AvionicsSystems/issues/comments/346131229","html_url":"https://github.com/MOARdV/AvionicsSystems/issues/11#issuecomment-346131229","issue_url":"https://api.github.com/repos/MOARdV/AvionicsSystems/issues/11","id":346131229,"user":{"login":"Alexustas","id":6713671,"avatar_url":"https://avatars3.githubusercontent.com/u/6713671?v=4","gravatar_id":"","url":"https://api.github.com/users/Alexustas","html_url":"https://github.com/Alexustas","followers_url":"https://api.github.com/users/Alexustas/followers","following_url":"https://api.github.com/users/Alexustas/following{/other_user}","gists_url":"https://api.github.com/users/Alexustas/gists{/gist_id}","starred_url":"https://api.github.com/users/Alexustas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alexustas/subscriptions","organizations_url":"https://api.github.com/users/Alexustas/orgs","repos_url":"https://api.github.com/users/Alexustas/repos","events_url":"https://api.github.com/users/Alexustas/events{/privacy}","received_events_url":"https://api.github.com/users/Alexustas/received_events","type":"User","site_admin":false},"created_at":"2017-11-21T19:14:45Z","updated_at":"2017-11-21T19:14:45Z","author_association":"NONE","body":"if your altitude is 10000 m, then the communication range with the station, whose height of 1500 m should be longer than the communication distance from the station at a height of 75 m"}}
{"actor":{"display_login":"Alexustas"}}