Jump to content

[1.0.4] (2015-07-04) Telemachus – Telemetry and Flight Control in the Web Browser


Rich

Recommended Posts

Hello sir, I kindly request that you share your method of implementation of this exciting new feature for Telemachus; and with hope in my heart I do further request that perhaps you might share the file configuration in its entirety to experience this wonder for ourselves?

gimme gimme gimme

Link to comment
Share on other sites

my bad, i forgot the link... https://github.com/Deedo/RemoteView Enjoy ! But remember it is a proof of concept only...

Ah sweet, it is a web interface using web sockets - I was assuming it was a .NET application.

I see that you are in need of a mechanism for retrieving the radius of a body. I will see if I can add this to the API.

Edited by Rich
Link to comment
Share on other sites

Ah sweet, it is a web interface using web sockets - I was assuming it was a .NET application.

I see that you are in need of a mechanism for retrieving the radius of a body. I will see if I can add this to the API.

If i can have atmosphere radius too, that may help me too ;)

(and SOI switches, and node management)

I may have a look to your sources too.

Edited by Deedo
I forgot some words !
Link to comment
Share on other sites

Ah sweet, it is a web interface using web sockets - I was assuming it was a .NET application.

I see that you are in need of a mechanism for retrieving the radius of a body. I will see if I can add this to the API.

Could I make a request for landing gear and brake status as well? Currently there is only the command to toggle these on and off, but not their current state? Thanks!

Deedo, that is some nice work on integrating a map. You have inspired me to add a similar map module to my own UI which I will be releasing shortly!

Edited by Sli
Link to comment
Share on other sites

Could I make a request for landing gear and brake status as well? Currently there is only the command to toggle these on and off, but not their current state? Thanks!

Deedo, that is some nice work on integrating a map. You have inspired me to add a similar map module to my own UI which I will be releasing shortly!

I am glad, i inspired you. We may work together... I understood that your UI is meant to be modular. If you show me your framework, i may be able to do the 'map' module... I am fan of your work on the navball

Edited by Deedo
Link to comment
Share on other sites

Added some additional API calls: Telemachus 1.4.21.0


Change Log

* Added API calls to retrieve the state of the landing gear and brakes.
* Added API calls to retrieve the total number of bodies, the radius of a body and the max atmosphere height of a body.

I have been going for many small updates recently as this fits my free time pattern. Hopefully I will have a weekend to myself soon, so that I can knock some of the chunkier features/requests of the list.

Edited by Rich
Link to comment
Share on other sites

Added some additional API calls: Telemachus 1.4.21.0


Change Log

* Added API calls to retrieve the state of the landing gear and brakes.
* Added API calls to retrieve the total number of bodies, the radius of a body and the max atmosphere height of a body.

I have been going for many small updates recently as this fits my free time pattern. Hopefully I will have a weekend to myself soon, so that I can knock some of the chunkier features/requests of the list.

Thank you for the radius thing but, having to post an ID (instead of... body's name for example) as parameter is not really useful (to me).

Link to comment
Share on other sites

many thanks, and again ---- great work to Rich, you and all.....

finally, a way to get telemetry data to separate machine (yes, i know and used the old way, but using socket opens up the world)....

quick question.. for non active craft, what is available to get from them. some mods, life support and targetron for example, are able to fetch certain data from all craft. will it be possible to poll / request and get data from other non active craft at some point????

thanks.

Link to comment
Share on other sites

many thanks, and again ---- great work to Rich, you and all.....

finally, a way to get telemetry data to separate machine (yes, i know and used the old way, but using socket opens up the world)....

quick question.. for non active craft, what is available to get from them. some mods, life support and targetron for example, are able to fetch certain data from all craft. will it be possible to poll / request and get data from other non active craft at some point????

thanks.

It is not possible now (Rich may add some calls). The only things you may get from a non-active craft is by target it (and you may pull all the tar.* values)

Link to comment
Share on other sites

Version 2 of the API is in the design phase and will:

  • Automatically generate the API on entry to the flight scene so all KSP data will be available.
  • Still allow the definition of non-automatically generated calls. This is a must for creating derived values from the game data, which would otherwise be too expensive. For example, returning a list of all the bodies in game would require 10+ API calls, but with an appropriate derived API call would need only a single call.
  • Be served off /datalinkv2 so the old API will still work and can be mixed with the new API.

Link to comment
Share on other sites

Version 2 of the API is in the design phase and will:

  • Automatically generate the API on entry to the flight scene so all KSP data will be available.
  • Still allow the definition of non-automatically generated calls. This is a must for creating derived values from the game data, which would otherwise be too expensive. For example, returning a list of all the bodies in game would require 10+ API calls, but with an appropriate derived API call would need only a single call.
  • Be served off /datalinkv2 so the old API will still work and can be mixed with the new API.

this will be awesome !

Link to comment
Share on other sites

Version 2 of the API is in the design phase and will:

  • Automatically generate the API on entry to the flight scene so all KSP data will be available.

Does this mean some mod-related things will be automatically exposed? e.g. beamed power being received if one had the KSPI mod, part rotation if one had the Robotics mod?

Link to comment
Share on other sites

  • 2 weeks later...

I'm working on an Arduino-based hardware mod, and I'd like to use Telemachus to pull flight data from KSP, but I'm having trouble determining the resource levels for the current stage. If I try this query:

http://127.0.0.1:8001/telemachus/datalink?r=r.resourceCurrent[LiquidFuel]

I always get 0 in the response. Similar for Oxidizer. The all-stages and max resource queries return the right amounts though. Am I doing something wrong? I'm testing on stock KSP.

Link to comment
Share on other sites

Why is it when I get away from Kerbin (to say Mun) the mod stops transmitting data to the web?

--- Edit ---

So I downloaded the remoteview and love it. I have a few suggestions and will get to them in a moment. After setting a ship up I went out to Mun and ran some tests. As soon as I reached Munar entry, Telemachus stopped posting data. However, after installing the remoteview interface I receive all data just fine now.

Now for the wonderful person that created remoteview. When using the web interface on a tablet it gets all mucked up. As a web designer I would suggest using responsive design (using percentages on divs instead of px). This will allow much better flow for the users on smaller displays.

Edited by SimpleMajority
Link to comment
Share on other sites

So I downloaded the remoteview and love it. [...]

Now for the wonderful person that created remoteview. When using the web interface on a tablet it gets all mucked up. As a web designer I would suggest using responsive design (using percentages on divs instead of px). This will allow much better flow for the users on smaller displays.

Thanks you for the feedback, i will try to make it a little more responsive, but i need the map square to be a fixed size. BTW the files are on github, feel free to fork/pull or commit, as a carpenter, i am sure a web designer can make a a better web design ;)

Edited by Deedo
Link to comment
Share on other sites

Why is it when I get away from Kerbin (to say Mun) the mod stops transmitting data to the web?

So I downloaded the remoteview and love it. I have a few suggestions and will get to them in a moment. After setting a ship up I went out to Mun and ran some tests. As soon as I reached Munar entry, Telemachus stopped posting data. However, after installing the remoteview interface I receive all data just fine now.

This sounds like the port exhaustion issue. The stock Telemachus pages rely on the HTTP API, which has a tendency to exhaust the ports on system running KSP. In response to this issue I developed a web socket API which is what remoteview uses. I have yet to update the stock pages to use the web socket API, but it is next on my list.

Link to comment
Share on other sites

I'm working on an Arduino-based hardware mod, and I'd like to use Telemachus to pull flight data from KSP, but I'm having trouble determining the resource levels for the current stage. If I try this query:

http://127.0.0.1:8001/telemachus/datalink?r=r.resourceCurrent[LiquidFuel]

I always get 0 in the response. Similar for Oxidizer. The all-stages and max resource queries return the right amounts though. Am I doing something wrong? I'm testing on stock KSP.

Can I ask if anyone else has had this problem? I'd really like to use Telemachus for this project; I think it's a better solution for me than using something like KSPSerialIO, because I'd prefer the mod that liberates the data from KSP not be Arduino-specific. My prototype hardware mod has an LED bar-graph for total fuel, and a second that I'd like to use for the current stage fuel, but I haven't been able to get that second value from Telemachus; I'm not getting an HTTP 500 response, just always 0 for current resources.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...