Rich Posted July 14, 2015 Author Share Posted July 14, 2015 There no method by default to export data to a CSV file in Telemachus, as the focus of this project is the API itself. However, there are several options: 1. I believe you can use Kerminal to log the data provided by Telemachus to a CSV file. 2. The VOID plugin does allow you to log a limited subset of data from KSP.3. A logger could be thrown together fairly quickly in any programming language which supports web sockets and file I/O. Link to comment Share on other sites More sharing options...
viktor19 Posted July 16, 2015 Share Posted July 16, 2015 Hi there!I've downloaded and installed this great mod. However, my phone can't connect to the Telemachus "server". Both devices are on the same Wi-Fi network. Also, there is no IP addresses written by Telemachus in debug. I have tried to connect to various IP addresses (like my pc's IP), but Chrome returns "connection refused" message.Do I need to mess with port forwarding? Is there something trivial tht I've overlooked?Thanks in advance! Link to comment Share on other sites More sharing options...
Makarismos Posted July 16, 2015 Share Posted July 16, 2015 Brilliant, I will check it out.Thanks again for such a brilliant plugin!Maka Link to comment Share on other sites More sharing options...
peachoftree Posted August 6, 2015 Share Posted August 6, 2015 When I try to get a websocket response, nothing is happening. At first I thought it was my code, but then I tried using this chrome extension called simple websockets (https://chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo/related?hl=en) and found that it also did not give any response, although it was showing a connection to the server. I sent the message {"+":["v.altitude", "v.name"], "rate": 500}any ideas? Link to comment Share on other sites More sharing options...
Rich Posted August 6, 2015 Author Share Posted August 6, 2015 The JSON parser is as disaster (sorry!), so try it with no new lines or spaces. Link to comment Share on other sites More sharing options...
peachoftree Posted August 6, 2015 Share Posted August 6, 2015 Also, what are the upper and lower bounds for setPitch? Link to comment Share on other sites More sharing options...
Rich Posted August 6, 2015 Author Share Posted August 6, 2015 Also, what are the upper and lower bounds for setPitch?IIRC, it's float between -1.0 and 1.0 Link to comment Share on other sites More sharing options...
peachoftree Posted August 6, 2015 Share Posted August 6, 2015 (edited) Ok. Last question, I promise. do you have any idea why this code isn't working? controller.connected returns true, but controller.recv() does not print anything, not even the {} response or any errors.from websocket import create_connectioncontroller = create_connection("ws://localhost:8085/datalink")print controller.connectedcontroller.send('{"rate":500}')while 1: print controller.recv() Edited August 6, 2015 by peachoftree Link to comment Share on other sites More sharing options...
Rich Posted August 7, 2015 Author Share Posted August 7, 2015 You haven't subscribed to anything, so no data will be sent. Link to comment Share on other sites More sharing options...
Xgkkp Posted August 8, 2015 Share Posted August 8, 2015 Ok. Last question, I promise. do you have any idea why this code isn't working? controller.connected returns true, but controller.recv() does not print anything, not even the {} response or any errors.For what it is worth, I find connecting via websocket pretty hit-and-miss - sometimes it will just connect, and refuse to respond, sometimes it will all go through perfectly, and sometimes it will just sit there and hang before connecting. I haven't yet tracked the cause down, but restarting the program connecting several times usually works.I have had some errors popping up in the log to do with connections, possibly when disconnected just by shutting the client down, but am still experimenting. Link to comment Share on other sites More sharing options...
Rich Posted August 9, 2015 Author Share Posted August 9, 2015 I have had some errors popping up in the log to do with connections, possibly when disconnected just by shutting the client down, but am still experimenting.We share the same suspicion, as I am pretty sure the socket is only shutdown correctly when a close message is sent. I've been meaning to debug this and put in a timeout of sorts to nuke the connection. Link to comment Share on other sites More sharing options...
Xgkkp Posted August 10, 2015 Share Posted August 10, 2015 We share the same suspicion, as I am pretty sure the socket is only shutdown correctly when a close message is sent. I've been meaning to debug this and put in a timeout of sorts to nuke the connection.This is the error that seems to spam the log files after a disconnect: System.Net.Sockets.Socket.BeginSend (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags socket_flags, System.AsyncCallback callback, System.Object state) Servers.AsynchronousServer.ClientConnection.Send (System.Byte[] byteData)[EXC 23:26:56.311] SocketException: A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied. Link to comment Share on other sites More sharing options...
Xgkkp Posted August 11, 2015 Share Posted August 11, 2015 So, I wanted to get access to more variables that do not exist/a pain to calculate from the existing ones (mainly stuff like the FAR-related variables, and my inability to understand the Telemachus rotation), so I whipped together a quick bridge to RasterPropMonitor - https://github.com/ndevenish/Telemachus/commit/a4b0dc0f9629dbcc9c635182465540ff1a11ce8eFeatures:- Doesn't add a dependency, still works without RPM- Query access to RPM with "rpm.available"- Query RPM variables with "rpm.VARIABLE"Caveats:- It probably breaks in ways that I have not tested with the slightest breeze- It will break when they update RPM next, as they have changed where they calculate variables in the current github master- I haven't studied Telemachus enough to understand the caching system, so it's probably really inefficient in querying for the existence of RPM Link to comment Share on other sites More sharing options...
buder2 Posted August 12, 2015 Share Posted August 12, 2015 do we need internet for this mod ? like if i disconnect the cable it will work? Link to comment Share on other sites More sharing options...
Rich Posted August 12, 2015 Author Share Posted August 12, 2015 This is the error that seems to spam the log files after a disconnect:Thanks, this is really helpful! Looks like I need to do something useful when that error is thrown - I'm sure I did sort this out but the evidence would suggest that I didn't- It probably breaks in ways that I have not tested with the slightest breezeGood, it will fit in nicely with the rest of Telemachus then do we need internet for this mod ? like if i disconnect the cable it will work?The stock Telemachus graphs should work without an internet connection, but I can't say anything about the other interfaces. Link to comment Share on other sites More sharing options...
Drew Kerman Posted August 13, 2015 Share Posted August 13, 2015 Hey Rich have you seen my PMs? Link to comment Share on other sites More sharing options...
Rich Posted August 13, 2015 Author Share Posted August 13, 2015 Hey Rich have you seen my PMs?Some of my PMs will not load, so please post it here . Link to comment Share on other sites More sharing options...
Drew Kerman Posted August 13, 2015 Share Posted August 13, 2015 okay, apologies for being slightly off-topic but I'm wondering if you can spot anything wrong with this code:<!DOCTYPE html><!-- code/comments not formatted for word wrap --><html><head> <!-- Display the KSA favicon --> <link rel="shortcut icon" href="/images/KSA/favicon.ico" type="image/x-icon" /> <title>KSA Flight Tracker</title> <!-- use this image link to force reddit to use a certain image for its thumbnail --> <meta property="og:image" content="http://i.imgur.com/2IH1UpQ.png" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <!-- ensure proper scale of page --> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- CSS stylesheets --> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900" /> <link rel="stylesheet" type="text/css" href="http://static.kerbalmaps.com/leaflet.css" /> <!-- JS libraries --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script type="text/javascript" src="leaflet.js"></script> <script type="text/javascript" src="leafletembed.js"></script></head><body style="padding: 0; margin: 0;"><div id='map' class='map' style='padding: 0; margin: 0; height: 548px; width: 1044px;'></div><script> // create the map with some custom options // details on Leaflet API can be found here - http://leafletjs.com/reference.html var map = new L.KSP.Map('map', { layers: [L.KSP.CelestialBody.KERBIN], center: [0,0], bodyControl: false, layersControl: false, scaleControl: true, });</script></body></html>I basically took the code from my Flight Tracker page and whittled it down to what I thought was the bare-bones needed to display a Leaflet map, but all I get is a grey map. Not sure what I'm missing Link to comment Share on other sites More sharing options...
Kowgan Posted August 13, 2015 Share Posted August 13, 2015 Yo Rich, do you still intend to provide the "vessel Phase Angle to target" page? Last time I saw you talking about it was in december 2013, and that info would be pretty useful for mission control without map mode. Thanks! Link to comment Share on other sites More sharing options...
allencarson Posted August 14, 2015 Share Posted August 14, 2015 Rich The Doomed Moderator - First of all - thanks for the work on telemachus - great plugin.For my own amusement, I am in the process of extending it's functionality by adding onto some of the MechJeb2 capabilities. Specifically I wanted to add the Ascent, Rendezvous, and Docking autopilots along with some of the maneuver planner commands. I have most of it working, except I haven't done any of the web interface part yet. I wrote a small c# app that tests out the interface. (I'm more of a desktop coder). Is this something that you might be interested in including? If so, I could send you the code. If not, I won't be offended, and I'll continue to play around with it. Let me know what you think.Again thanks for the work.Allen Carson Link to comment Share on other sites More sharing options...
edemlama Posted August 14, 2015 Share Posted August 14, 2015 How do I view the data from my iPad? Link to comment Share on other sites More sharing options...
Kowgan Posted August 14, 2015 Share Posted August 14, 2015 How do I view the data from my iPad?You've gotta access your PC's local IP address, with :8085 at the end.To check your local IP if you're on windows, open your command prompt (Press the "windows" key, type CMD and hit enter) and run: ipconfig Link to comment Share on other sites More sharing options...
Xgkkp Posted August 18, 2015 Share Posted August 18, 2015 So, this is what I've been working on, with my RPM access extension; an iOS-based (so, runs on iPad) remote HUD, based (obviously, if you know it) on the RasterPropMonitor airplane HUD. It's suprisingly responsive, and I just perch my iPad right in front of the monitor.It's only the plane HUD at the moment, and the start of an implementation of NavUtilities HSI, because I don't really use the other RPM pages enough, and don't know what other people tend to use. Perhaps the orbital display might be useful; I can envision using several phones/ipads layed out around the monitor with various data screens, but it's probably best to think of things that wouldn't work so well on a web browser.Source is at https://github.com/ndevenish/KerbalHUD. Link to comment Share on other sites More sharing options...
Orkeren Posted August 21, 2015 Share Posted August 21, 2015 @Rich - you may have heard about the KSPtoMars project (www.ksptomars.org). We would like to use Telemachus, but we are kind-off dependent on being able to stream telemetry from multiple vehicles. Is that something, that is realistic in the near future (< 4 weeks). Oh and having RemoteTech signal delay on Telemachus data when both are installed would be so delicious! Link to comment Share on other sites More sharing options...
Xgkkp Posted August 21, 2015 Share Posted August 21, 2015 Oh and having RemoteTech signal delay on Telemachus data when both are installed would be so delicious!I can see this being partially implemented e.g. when sending commands via telemachus, but the other way around would probably involve too much storage requirement to be able to run in the game proper. I can easily see though, some external proxy server that pulls the data out (and a variable for signal delay) and buffers it until the time has elapsed (in-game, it could read the game time also).I wonder what multiple vehicle telemetry would look like? At least in stock kerbal, other vehicles are unloaded so only orbital positioning information would be deriveable. This might be enough.... Link to comment Share on other sites More sharing options...
Recommended Posts