Jump to content

Rich

Members
  • Posts

    1,056
  • Joined

  • Last visited

Everything posted by Rich

  1. I have observed this strange behaviour also and I will see what I can do about If you can show me how to calculate the time to ascending node then I will be able to add it easily. If not, to the internet I go! Brief Development Note I have completed the KSP web socket service; that is, it works but I still need to test it thoroughly and convert the existing pages to use this new feature.
  2. The only reason for a post to be removed is if it is in violation of the forum rules, and in which case you can use the report post button to bring it to a moderators attention.
  3. Well the Telemachus pages work on both my stock Android devices (Nexus 7 and 5), but I think the Kindle uses a slightly custom version of Android? So I am unsure as to how Telemachus performs. Hence my need to find Kindle owners.
  4. ...:::EDIT:::... WTF I was not running the latest version?!?!?! WTF?!?! ok STILL claiming im running 1.4.12.0 even after deleting the folder and then reinstalling from github I have no idea what could be causing this . Releasing this would be cool, as I would love to see what this looks like on a bank of monitors. If your buddy is willing to see if the Telemachus' pages work on a Kindle, that would be most useful. I have added your throttle observation to my list of issues to check out. Quick Development Note - (for anyone who is interested) I have reached the point where I have finished two key implementation details for the web socket server. The first is socket stealing. This is where the HTTP server operates as normal, and the web socket server listens in on the requests being made. If the web socket server notices a socket upgrade request, then it will steal the socket from the HTTP server and proceed with the appropriate protocol. This stealing mechanism is handy as it means the web socket server can seemingly run on the same port as the HTTP server, while existing as a separate entity. The second implementation detail is that of the web socket service abstraction. The web socket server is constructed with services which are associated with a particular prefix, such as "/datalink". A basic echo web socket service is shown below. class WebSocketEchoService : IWebSocketService { public void OpCodePing(object sender, FrameEventArgs e) { } public void OpCodePong(object sender, FrameEventArgs e) { } public void OpCodeText(object sender, FrameEventArgs e) { WebSocketFrame frame = new WebSocketFrame(ASCIIEncoding.UTF8.GetBytes("Echo: " + e.frame.PayloadAsUTF8())); e.clientConnection.Send(frame.AsBytes()); } public void OpCodeBinary(object sender, FrameEventArgs frameEventArgs) { } public void OpCodeClose(object sender, FrameEventArgs frameEventArgs) { } public IWebSocketService buildService() { return new WebSocketEchoService(); } } This abstraction will make it easy to build a KSP web socket service; this will simply accept JSON formatted protocol commands (discussed in an earlier post) through the OpCodeText(...) method, and stream data back using a method linked to a timer. The only addition I have made to the protocol specification is the ability to adjust the rate at which data is streamed back. Such a command is shown below. { "rate": 1000 } The above command would instruct the service to send updates once a second.
  5. It has always been the plan to eventually provide a page which allows you to script you craft. Though whether that is kOS or something I cook up myself remains to be seen. It is possible, and is something I want to do as part of the API overhaul I have planned. Lame. Unfortunately it is difficult to debug on a device I don't have. I wish I could be of more assistance, as one of this projects mandates is to make it work on as many devices as possible. I am aware. Fetching the tiles locally is something I have been experimenting with, and is easy enough to do for anyone inclined to try it out. This is planned but I am neck deep in what I am about to give a progress update on. Development update Well. The web socket server is working, so I just need to write the KSP data transfer protocol on top. This will simply involve some JSON parsing and a timer. Once that is done I can update the pages to use the web socket if the technology is available. What does this mean? It means more and faster data from KSP.
  6. Try posting an image in this thread and maybe we will be able to see what the issue is.
  7. Quick update on development progress: The web socket server is "working", in that a command can be sent from a browser to request a subscription to a data stream. The subscription request doesn't do anything when it gets there, but to fix that is just a matter of hooking it up to the same code the HTTP server uses to grab KSP data. With advice from alexmun the following protocol has been put together: { "subscribe": [ "v.altitude", "v.name" ], "command": ["v.stage"], "unsubscribe": [ "v.surfaceSpeed" ] } The above command when sent will: activate the next stage; subscribe to the altitude and vessel name streams; unsubscribe from the surface speed stream. All dictionary keys are optional; that is, "{}" is a valid command but does nothing, and the following will just activate the next stage. { "command": ["v.stage"] } Next: Pack KSP data up and stream it back to the browser.
  8. I will check it out, but it might be a limitation of the KSP API. It sounds like I just need to place the same safe guards on the table output as I have on the map view. 1. The arduino will need to be connected to the same network as the computer running KSP. 2. Use libcurl to make HTTP requests to the Telemachus server. HTTP requests take the following form. http://127.0.0.1:8080/telemachus/datalink?alt=[B]v.altitude[/B] The text in bold is the API string and a full list of these can be found on the landing page served by Telemachus.
  9. The issue is known but the root cause is not, and I am hoping that the addition of web sockets will either solve the problem or point towards it. I believe KSP is to blame in that it sometimes provides longitude values which are correct to some modulus of 180/360. Are you using the latest version of Telemachus (1.4.16.0)? As I am pretty sure I fixed the map view at least. If you are using the latest version then I will take another look at it. I will ask Nathan about his real fuels and maybe one day I will get round to writing a logger.
  10. The music is perfectly timed with the lag. I like it.
  11. I believe VOID allows you to log to a .csv file.
  12. The loss of colour is worth it to see the excellent sync between the actual nav ball and the web representation.
  13. Telemachus is open source - https://github.com/richardbunt/Telemachus
  14. Sweet mother of <deity>. I suspect something as intense as this would benefit from websockets.
  15. Try the following API call. p.paused It returns false if the game is paused, the antenna is off, not on the ship or out of power (It might return true - I forget which).
  16. Just released 1.4.16.0 which allows .gif and web fonts. Sweet work - Telemachus is primarily an API so I am always pleased to see projects such as yours. I have added this to the list of changes to make for the next version, which I hope to release tomorrow depending on how well my optimisation session goes tonight.
  17. I am hoping to push out another update of tweaks today so I will see if I can put in those file types (.eot, .ttf, .otf, .woff, .svg and also .gif) in for you. I suspect it will only take 5 minutes if they are compatible with the two file readers already in the server (your file extension hack seems to indicate that at least the font files are). On another note I believe I have found the cause of Telemachus' sudden spouts of not sending any data - port exhaustion. Now that I have found this, I can move ahead with adding Web Socket support to Telemachus, which should alleviate this issue since Telemachus can maintain a fixed number of connections to the server.
  18. A recompile is a much stronger solution for several reasons: 1) There is a technical barrier on the recompile; 2) Redistribution of "fixes" can easily be limited to personal use by an appropriate licence and 3) If the licence allows redistribution, then the person who did the recompile and release will clearly be responsible for any resultant explosions.
  19. I was toying with this idea last week but rejected it on the basis that my plugin probably will not be broken by version updates. However, the discussion in this thread had changed my mind, specifically the mention of accountability. While that might be true, it is a mod developer's decision to decide whether to give the user the decision or not.
  20. It upsets the graphics device when the full screen window loses focus - seems to be an issue with KSP. What page do you get when you try either of the IP address? alexmun has kindly shared their custom window implementation which I will hopefully be releasing in the next couple of days:
  21. That seems to have worked as I can see this in your log: [Telemachus] Telemachus data link listening for requests on the following addresses: ([B]127.0.0.1:8085[/B] and [B]192.168.1.132:8085[/B]). Try putting them into your web browser, some of them might not work. Try the open link button now. Either that or put the following address in your browser: http://127.0.0.1:8085/
×
×
  • Create New...