Jump to content

Hacking about with Telemachus


technicalfool

Recommended Posts

After Rich suggested that people could use his Telemachus plugin to make a multi-window display of things like a 3D Navball, I decided to have a little try. Well, the existing Javascript API didn't work very well for me and kept throwing errors. It also seems to depend on having an Internet connection for its copy of JQuery-ui, and it seems to use Google's graphing API rather than having its own. So, I've rewritten it (or have at least started to).

Problem is, I'm running into difficulties turning the heading, pitch and roll values into something that makes a navball rotate the way it should. I figured it'd be a gimbal issue, so tried rotating the remaining rotation axes along with the navball. Still no joy. I'm aware the texture is probably 90 degrees out longitude-wise, but that doesn't explain the wierdness.

Anybody here know the math to translate a heading, pitch and roll into X, Y and Z rotation values? Solved. Thanks for the raw values Rich, and to anybody else who's curious: The values from the API need to be plugged into Three.js in ZXY Euler order.

Latest version: https://mega.co.nz/#!BQgADYjD!dhfirEqXMg7UedxS7qILkzPTyXgCqDWQ2EhG0sUAB3Y

Be aware, it only has a resource meter in a working state, and a navball in a completely buggy state. The navball is now working to a "placeholder" level of niceness. A screenshot of what it looks like so far:

navball_screenie_zps33118124.png~original

(no, the SAS/RCS lights don't work, yet)

To use, download and install the Telemachus plugin first, then copy all of the files in the archive to the Plugins/PluginData/Telemachus directory. Use by navigating to http://127.0.0.1:8085/telemachus/APITranslatorTest.html - this way it works alongside the official Telemachus stuff.

Once I've got the navball working, I'll see if I can make a graphing engine to completely remove Telemachus' dependance on the Internet.

Edited by technicalfool
Updates.
Link to comment
Share on other sites

Okay that's an oops. I ended up not including a couple of support files in with the archive. Now fixed, and I've changed the archive format to zip on Rich's advice. This also means the zip file has ballooned to a couple of hundred kilobytes, but it should now "work", for varying definitions of the word.

New link here: (link moved to first post, latest link will be found there)

And a screenshot here. As you can see, the navball is pointing in somewhat the wrong direction right now. I'm pretty happy with the colour-changing resource meters though, and only need to add a little chrome around the edges and to make non-existant resources (the "-1" counts) disappear. Maybe a flash effect for when a meter drops below some low percentage of maximum.

main_screenshot_1_zps193fdaeb.png~original

Edit: Now with added gradients!

telemachus_mainwndow_zps2e3bac1f.png~original

Word of advice: The main window with the checkboxes MUST at all times stay non-minimized. If it is minimized, or if it is behind the front tab in a multitabbed browser, it will most likely be given a far lower amount of CPU time. As this main window relays information from the Telemachus API, this means that anything relying on it starts slowing down to maybe one update per second, rather than the 10fps I currently have it set to. The main window can be behind another window, but not behind another tab, or minimized.

Edited by technicalfool
Removed links, moving them to first post.
Link to comment
Share on other sites

OK, I managed to get this working (I wasn't launching the pages from the index you provide), and I have to say ... the navigation ball is 100% awesome (unfortunately, due to forum policy, I cannot use expletives to express how much I love this).

Please keep up the good work :D, as this project has me grinning like an idiot.

Link to comment
Share on other sites

hacking doesnt mean what you think it does.

hacking is (amongst other things) changing the way things works, getting under the bonnet, examining whats inside and changing bits for betterment.

Link to comment
Share on other sites

Telemachus looks great and this looks like a nice set of tools and lib wrapping the Telemachus API. Do you have this code anywhere (e.g. github)? I'd love to start integrating it into things I'm doing and/or collaborate on it.

Some ideas I've got are:

more of a mission control style view of lots of charts and metrics (e.g. have the Kerbal Maps view plus other charts of fuel, altitude, velocity, dynamic pressure, etc.)

logging of data back at "mission control" for download at the end of a mission/session

logging of notes with mission time-stamps

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 3 months later...

Hi!

Rich is still working on Telemachus as far as I know. I've not done much on my own hackery. It seems others have already done quite a bit though.

I really should try restarting my work on a graphing engine, unless anybody knows an already-existing Javascript/html5-friendly grapher that doesn't link out to the Google APIs.

Link to comment
Share on other sites

  • 1 year later...
Hi!

Rich is still working on Telemachus as far as I know. I've not done much on my own hackery. It seems others have already done quite a bit though.

I really should try restarting my work on a graphing engine, unless anybody knows an already-existing Javascript/html5-friendly grapher that doesn't link out to the Google APIs.

Would you be willing to post your code to GitHub? The download link no longer works.

Link to comment
Share on other sites

  • 2 months later...
Would you be willing to post your code to GitHub? The download link no longer works.

http://greenoctagon.co.uk/TelemachusMg.zip

I've no idea if it still works, I've not done anything with it since 2013 or so. I only found out about your post today by chance after doing a search for old threads I've made.

I might continue this project at some point in the future. Until then though, if you're interested in the code for how I made the WebGL navball using THREE.js or the resource bars, it's right there. If I do continue this project, it's likely to involve a complete rewrite. I've thrown an MIT LICENSE.txt in there for compliance with forum rules that didn't even exist when I started hacking on this thing.

Obviously you need a copy of Telemachus to add this to.

HTH

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...