tankstrr Posted January 7, 2014 Share Posted January 7, 2014 Been playing around with the html/css/js files (I too am an amateur when it comes to this stuff). Set font to Courier New for a more technical look, and I have been able to get the graphs to be green on black, but I am still having issues formatting the table screens (can't change the background color on the tables.One thing i did come up with was a way to display multiple graphs/tables on a single page using iframes. I know that its not the perfect solution, but it does work. To try it out, create a file (I called mine "combo.html") in the same directory as the rest of the html/css/js source. past the following code into that file<html><body bgcolor="#000000"><table width="100%" cellpadding="2" cellspacing="1" border="0"><tr> <td> <iframe width=33% height=375 src="orbital.html" scrolling="auto" align="middle" frameborder="0"></iframe> <iframe width=33% height=375 src="surface.html" scrolling="auto" align="middle" frameborder="0"></iframe> <iframe width=33% height=375 src="touchball-pyr.html" scrolling="auto" align="middle" frameborder="0"></iframe> </td></tr><tr> <td> <iframe width=33% height=375 src="altitude.html" scrolling="auto" align="middle" frameborder="0"></iframe> <iframe width=33% height=375 src="flight-control.html" scrolling="auto" align="middle" frameborder="0"></iframe> <iframe width=33% height=375 src="d-pad.html" scrolling="auto" align="middle" frameborder="0"></iframe> </td></tr></table></body></html>Best part about this is that by editing which files you include, you can display any 6 screens at once. Some thoughts I have for grouping are1. Science / Sensor data2. Ship / Location status data3. Command / Control dataI also am going to try and format the dpad and control pages to better fit these smaller windows.I will put together all of my edited files later tonight and post them here if there is any interest. Link to comment Share on other sites More sharing options...
Deadpangod3 Posted January 7, 2014 Share Posted January 7, 2014 This would be cool and is on my list of features to add. However it is not a priority as it does not give you any additional capability to play KSP using only Telemachus. Also my HTML and JavaScript skills are minimal so this is best left as an addition for someone else to write.Try while not running in full screen and send me the new log.http://www.filedropper.com/outputlog_1 Link to comment Share on other sites More sharing options...
Rich Posted January 7, 2014 Author Share Posted January 7, 2014 http://www.filedropper.com/outputlog_1That 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/ Link to comment Share on other sites More sharing options...
Raptor831 Posted January 8, 2014 Share Posted January 8, 2014 I will put together all of my edited files later tonight and post them here if there is any interest.I'd love to see the results. I'm a front-end web guy, so this interests me a lot! Link to comment Share on other sites More sharing options...
tankstrr Posted January 8, 2014 Share Posted January 8, 2014 Here is a screenshot of what i have so farhttps://www.dropbox.com/s/wgxhnipkt5gyd7s/combo.PNGAnd here are the modded fileshttps://www.dropbox.com/s/y1v597gm0ntp5t4/TelemachusMod.zip Link to comment Share on other sites More sharing options...
Raptor831 Posted January 8, 2014 Share Posted January 8, 2014 Here is a screenshot of what i have so farhttps://www.dropbox.com/s/wgxhnipkt5gyd7s/combo.PNGAnd here are the modded fileshttps://www.dropbox.com/s/y1v597gm0ntp5t4/TelemachusMod.zipLooks nice! I've been hacking around on another game (FlightGear, an open source free flight simulator) trying to add a web-based instrument panel. Think gauges and switches, etc. Might have a go at porting the HTML/JS over to this and see what happens. If you were to get a instrument panel, what would you want on it? Link to comment Share on other sites More sharing options...
tankstrr Posted January 8, 2014 Share Posted January 8, 2014 One thing that would be great (not sure if its possible with the current API) is to have a gauge with all of your resource amounts, preferably as a bar graph as the game gui shows, but configurable by the user. Link to comment Share on other sites More sharing options...
Deadpangod3 Posted January 8, 2014 Share Posted January 8, 2014 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/I tried when I ran ksp that time but it still didn't work,And why does not using full screen make a difference? Link to comment Share on other sites More sharing options...
Rich Posted January 8, 2014 Author Share Posted January 8, 2014 (edited) I tried when I ran ksp that time but it still didn't work,And why does not using full screen make a difference?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: Edited February 11, 2014 by Rich Link to comment Share on other sites More sharing options...
Deadpangod3 Posted January 9, 2014 Share Posted January 9, 2014 (edited) 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:http://i.imgur.com/JlUODpg.pngIt works when I use the link Will it work if I click it from a second computer?Edit: and will it continue to work if I switch on full screen? Edited January 9, 2014 by Deadpangod3 Link to comment Share on other sites More sharing options...
Raptor831 Posted January 9, 2014 Share Posted January 9, 2014 Will it work if I click it from a second computer?Edit: and will it continue to work if I switch on full screen?That's how I've been using it. Type the correct local IP in a browser on a separate computer. Full screen works here.Also, been working on some visual implementations of the data here. Got a resource meter working. Screens:Still looking at how to let the user add or remove items, so we'll see if I can swing something together. If anyone wants the files, let me know. Link to comment Share on other sites More sharing options...
tankstrr Posted January 9, 2014 Share Posted January 9, 2014 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:http://i.imgur.com/JlUODpg.pngThat's how I've been using it. Type the correct local IP in a browser on a separate computer. Full screen works here.Also, been working on some visual implementations of the data here. Got a resource meter working. Screens:http://f.cl.ly/items/3f212r0h2q2O1y3b1a1g/Screen%20Shot%202014-01-08%20at%208.11.10%20PM.pnghttp://f.cl.ly/items/3u2r0a2T0w2j1G2N2u2W/Screen%20Shot%202014-01-08%20at%208.07.30%20PM.pngStill looking at how to let the user add or remove items, so we'll see if I can swing something together. If anyone wants the files, let me know.wow, its obvious i am far outclassed in regards to coding and design, both of these look great!!!! I would be happy to test either one of these. Link to comment Share on other sites More sharing options...
GavinZac Posted January 9, 2014 Share Posted January 9, 2014 It works when I use the link Will it work if I click it from a second computer?Edit: and will it continue to work if I switch on full screen?You can also use something like Free DynDNS to expose your telemachus server on something like kerbals.dyndns.net and access it anywhere. Link to comment Share on other sites More sharing options...
Raptor831 Posted January 9, 2014 Share Posted January 9, 2014 wow, its obvious i am far outclassed in regards to coding and design, both of these look great!!!! I would be happy to test either one of these.Here's the files if you want them: http://cl.ly/2D1U3G2k2J44You'll have to type in the page directly after the server loads, as the page isn't linked in the listing page. Link to comment Share on other sites More sharing options...
mjukis Posted January 10, 2014 Share Posted January 10, 2014 I've done a whole bunch of integrating of Telemachus, RemoteTech 2 and some cameras in preparation for having a go at a mission where our pilot has only interior view + cameras and we only have Telemachus. Also our pilot is on a different continent. I've done some custom stuff where the data is being displayed on various terminal screens (text mode only, screenshots coming soon!) and for this mission I think we have everything we need. However, one thing I noticed in looking at bigger missions in the future is running out of action groups.When the pilot is in IVA mode, he can't access certain important vehicle functions.1) Activate / Deactivate a specific module2) Query the activation state of a specific module3) Query the resource state of a specific container4) Transfer resourcesOur first mission is pretty simple and none of these things should be necessary. Also, one could easily allow the pilot to leave IVA mode for a short period in order to perform these tasks. However, it would be far more awesome if flight control could read the status of a single tank and transfer fuel, or have the pilot perform the transfer. I think there is at least one fuel tank control panel mod, so that may be an option for not leaving the cockpit, but full integration into Telemachus would be much more immersive, imo. Link to comment Share on other sites More sharing options...
Sli Posted January 11, 2014 Share Posted January 11, 2014 (edited) I'm working on my own custom UI at the moment but i've hit a bit of a hiccup. I'm using @font-face to serve some custom web fonts, but i'm getting 404 errors in the console when the browser tries to serve them. I know that the code is solid as it works fine on my own apache build and a remote server - it's only when the web files are served by the Telemachus http server that they resolve like this. Is this some sort of routing issue or blocking behaviour that prevents files with custom extensions (.woff, .ttf, .svg) from being served properly?EDIT: I had a look on github and found, what I believe to be the culprit:Any chance of an update to permit .eot, .ttf, .otf, .woff, .svg and also .gif as these are pretty common. Cheers!EDIT2: I can confirm that it is definitely the way the http server handles file extensions that is causing this. Here's my temporary css 'hack' to force the fonts to be handled:@font-face { font-family:'BebasNeue'; src: url('../css/fonts/BebasNeue-webfont-eot[COLOR="#B22222"].css[/COLOR]') format('embedded-opentype'); src: url('../css/fonts/BebasNeue-webfont-eot[COLOR="#B22222"].css[/COLOR]#iefix') format('embedded-opentype'), url('../css/fonts/BebasNeue-webfont-woff[COLOR="#B22222"].css[/COLOR]') format('woff'), url('../css/fonts/BebasNeue-webfont-ttf[COLOR="#B22222"].css[/COLOR]') format('truetype'), url('../css/fonts/BebasNeue-webfont-svg[COLOR="#B22222"].css[/COLOR]#bebas_neueregular') format('svg');}Renaming all of the font files to '.css' means the files are served. On the browser end (at least in chrome) these files are still interpreted as 'fonts' once they are loaded and get handled appropriately. Edited January 11, 2014 by Sli Link to comment Share on other sites More sharing options...
Rich Posted January 11, 2014 Author Share Posted January 11, 2014 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. Link to comment Share on other sites More sharing options...
gnubel Posted January 11, 2014 Share Posted January 11, 2014 (edited) Thanks for this mod, it's great to have a bunch of graphs to go along with flights!There's one suggestion that I think should be pointed out again: apparently, in career mode the Telemachus antennae are not available at all. Not out of the box that is; a quick edit of the two part.cfg files allows it to be unlocked via the tech tree. As therealcrow999 wrote, this just requires an additional line specifying the tech category, e.g. "TechRequired = electronics".Could you include this in the next release, Rich? Edited January 11, 2014 by gnubel Link to comment Share on other sites More sharing options...
mjukis Posted January 11, 2014 Share Posted January 11, 2014 OK here's some pictures of a linux terminal screen running a first jab at providing flight data using the Telemachus API. There are two basic displays so far, one showing telemetry data about vehicle position, and the other showing some basic radar info. The radar info has about a 1% error, and rounds altitudes. The telemetry lat and long also have a built in error.First is a screen showing everything working as planned. The "-" next to telemetry altitude is no showing a negative altitude, it's showing that the number is trending downward.Second is a screen showing what the controller would see if telemetry was lost. It shows an error and displays the last data it got. I haven't figured out how to query whether or not the antenna is active (help!) so for now it just returns failures randomly about 10% of the time for testing. Radar data is unaffected.Last is a screen showing normal operation outside the range of the radar. The radar range is configurable but I have it set to only work around Kerbin between 500m ASL and 7Mm ASL. Link to comment Share on other sites More sharing options...
Rich Posted January 11, 2014 Author Share Posted January 11, 2014 I'm working on my own custom UI at the moment but i've hit a bit of a hiccup. I'm using @font-face to serve some custom web fonts, but i'm getting 404 errors in the console when the browser tries to serve them. I know that the code is solid as it works fine on my own apache build and a remote server - it's only when the web files are served by the Telemachus http server that they resolve like this. Is this some sort of routing issue or blocking behaviour that prevents files with custom extensions (.woff, .ttf, .svg) from being served properly?EDIT: I had a look on github and found, what I believe to be the culprit:http://i.imgur.com/st8SN8R.pngAny chance of an update to permit .eot, .ttf, .otf, .woff, .svg and also .gif as these are pretty common. Cheers!EDIT2: I can confirm that it is definitely the way the http server handles file extensions that is causing this. Here's my temporary css 'hack' to force the fonts to be handled:@font-face { font-family:'BebasNeue'; src: url('../css/fonts/BebasNeue-webfont-eot[COLOR="#B22222"].css[/COLOR]') format('embedded-opentype'); src: url('../css/fonts/BebasNeue-webfont-eot[COLOR="#B22222"].css[/COLOR]#iefix') format('embedded-opentype'), url('../css/fonts/BebasNeue-webfont-woff[COLOR="#B22222"].css[/COLOR]') format('woff'), url('../css/fonts/BebasNeue-webfont-ttf[COLOR="#B22222"].css[/COLOR]') format('truetype'), url('../css/fonts/BebasNeue-webfont-svg[COLOR="#B22222"].css[/COLOR]#bebas_neueregular') format('svg');}Renaming all of the font files to '.css' means the files are served. On the browser end (at least in chrome) these files are still interpreted as 'fonts' once they are loaded and get handled appropriately.Just released 1.4.16.0 which allows .gif and web fonts.OK here's some pictures of a linux terminal screen running a first jab at providing flight data using the Telemachus API. There are two basic displays so far, one showing telemetry data about vehicle position, and the other showing some basic radar info. The radar info has about a 1% error, and rounds altitudes. The telemetry lat and long also have a built in error.First is a screen showing everything working as planned. The "-" next to telemetry altitude is no showing a negative altitude, it's showing that the number is trending downward.http://i.imgur.com/2JbJXlA.jpgSecond is a screen showing what the controller would see if telemetry was lost. It shows an error and displays the last data it got. I haven't figured out how to query whether or not the antenna is active (help!) so for now it just returns failures randomly about 10% of the time for testing. Radar data is unaffected.http://i.imgur.com/pUP8SWj.jpgLast is a screen showing normal operation outside the range of the radar. The radar range is configurable but I have it set to only work around Kerbin between 500m ASL and 7Mm ASL.http://i.imgur.com/CUK1DRL.jpgSweet work - Telemachus is primarily an API so I am always pleased to see projects such as yours.Thanks for this mod, it's great to have a bunch of graphs to go along with flights!There's one suggestion that I think should be pointed out again: apparently, in career mode the Telemachus antennae are not available at all. Not out of the box that is; a quick edit of the two part.cfg files allows it to be unlocked via the tech tree. As therealcrow999 wrote, this just requires an additional line specifying the tech category, e.g. "TechRequired = electronics".Could you include this in the next release, Rich?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. Link to comment Share on other sites More sharing options...
mjukis Posted January 11, 2014 Share Posted January 11, 2014 Sweet work - Telemachus is primarily an API so I am always pleased to see projects such as yours.Well it's one hell of a game changer you've made. When I first saw it I thought "Neat." and then my mind exploded with possibilities. Any input on a method of reading the status of the Telemachus antenna via API? I am getting data even when it's turned off, which I like, but I'd like to be able to shut off most of it when the part isn't powered etc. Link to comment Share on other sites More sharing options...
Rich Posted January 11, 2014 Author Share Posted January 11, 2014 Try the following API call.p.pausedIt 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). Link to comment Share on other sites More sharing options...
mjukis Posted January 11, 2014 Share Posted January 11, 2014 (edited) Try the following API call.p.pausedIt 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).It seems to return 0 when normal, 1 when paused, 2 when out of power and 3 when the antenna is turned off. Perfect, exactly what I needed! Edited January 11, 2014 by mjukis Link to comment Share on other sites More sharing options...
Sli Posted January 12, 2014 Share Posted January 12, 2014 Just released 1.4.16.0 which allows .gif and web fonts.Excellent, working great! I'll post what i've been up to later today. Link to comment Share on other sites More sharing options...
Sli Posted January 12, 2014 Share Posted January 12, 2014 (edited) Ok, so here's my prototype UI that i've been working on the last few nights.- It's a lot more visually orientated and the modules are based off of the look and feel of the existing UI for KSP. - It's designed as more of a ksp 'remote' for mobile devices and display for second monitors rather than a raw telemetry readout. - It's completely modular - add as many modules or as little as you need via a drag and drop grid. - The layout is saved automatically between refreshes and can be exported/imported so you can share your own custom control screen. - You can add custom resource modules (i.e to track Food, Water, Kethane...) in addition to the stock ones.- There is a template structure for the individual modules that you can use to (in theory) code your own. I can confirm that it does run smoothly (albeit with a few bugs) on both an iPad and Android Tablet, but I won't be prioritizing optimization for phones due to screen size limitations and general clunkiness.The add module GUI has filters for different types. There are buttons, scales, dials, screens/displays and resources.You can drag and drop any element to where you want it and delete by hitting the cross at the top right.Pretty much all of the modules are functioning. Note the added 'Oxygen' resource which comes from TAC life support. Just to show the animation in action. Edited January 12, 2014 by Sli Link to comment Share on other sites More sharing options...
Recommended Posts