Jump to content

togfox

Members
  • Posts

    1,726
  • Joined

  • Last visited

Posts posted by togfox

  1. Struggling to work out if this works 'out-of-the-box'. I have KSP v1.9.1 and MM and this (and MechJeb). Does this mod work as-is or does it need config files? It's not really clear.

    It seems to work in v1.9.1 (i get icons etc) but it doesn't do any tracking/testing on any vessel. Cheers.

    Edit: worked it out. The original author has been absent for 3 years so I guess there is zero chance of having the OP updated.

    Thanks Strider for your efforts - trying your config now ...  :)

    Edit2: is it easy to include more parts that are not already covered? Can I do landing legs and moving antenna etc? Either for myself or to contribute to another project? I'm a whiz with notepad ++.  :cool:

  2. I wanted to mark this occasion with a "Thank You Squad" and to congratulate you for staying true to your vision, working harmoniously with modders, including the gaming community and supporting a well accepted business/purchase model.

    And thanks to the OP as well - who nailed it back in 2012 and has had no regrets since. :)

  3. Does this work for you?


    // Assumes that at this point of your script,
    // lat1, long1, and lat2, long2 are the latitude and longitude of the 2 points you're interested in.
    //
    SET geoPos1 to LATLNG(lat1,long1).
    SET geoPos2 to LATLNG(lat2,long2).
    print "Position vector of geoPos1 is " + geoPos1:POSITION.
    print "Position vector of geoPos2 is " + geoPos2:POSITION.
    print " --- ".
    set vector1To2 to (geoPos2:POSITION - geoPos1:POSITION).
    print "Straight line vector distance from pos1 to pos2, "
    print "(ignoring terrain and surface curvature)"
    print "is this: " + vector1To2:MAG.

    Sorry for the late reply - vacation. Yes - this does work fantastically well thank you. :)

  4. There is a quickfix link on the opening post of this thread but when I click on it, nothing happens. Could someone be kind enough to repost a working link here please?

    It's a link to a drop box that has 7 zip files. Not sure if this helps, maybe try a different browser?

    https://www.dropbox.com/sh/3emtoeyky6c3w8v/AAAj-5dHf8POF8QI6bEOSSAla?dl=0

    https://www.dropbox.com/sh/3emtoeyky6c3w8v/AAAj-5dHf8POF8QI6bEOSSAla?dl=0

  5. I'm trying to work out the distance between two gps points (lat/long). I can capture lat/long for two ponts well enough. That's the easy bit. The trig bit with kOS has me scratching my head. I googled this and this is java (which I don't know, but it's pretty self-evident):


    function getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) {
    var R = 6371; // Radius of the earth in km
    var dLat = deg2rad(lat2-lat1); // deg2rad below
    var dLon = deg2rad(lon2-lon1);
    var a =
    Math.sin(dLat/2) * Math.sin(dLat/2) +
    Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
    Math.sin(dLon/2) * Math.sin(dLon/2)
    ;
    var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
    var d = R * c; // Distance in km
    return d;
    }

    function deg2rad(deg) {
    return deg * (Math.PI/180)
    }

    Do I need to convert to radians like this function does and is all that trig possible?

    I'm measuring small distance - in the hundreds of meters. Does that remove the need for some of that trig? Like, trig on really small numbers will return really small numbers type of thing?

  6. Just saying after a 12 month break from KSP in general (just downloaded 0.90) I'm going to ressurect this project and see if kOS can do this a little bit smarter than before.

    I'm not aiming for a perfect solution - that would be nice - but something that is better than what we have now is the goal. Success through tiny steps. Look forward to your technical and mathematical expertise!

    For those needing a refresher, this article I wrote 12 months ago:

    http://forum.kerbalspaceprogram.com/entries/1210-The-Fox-Terrain-Avoidance-System-%28FTAS%29

    Thinking about the greatest weakness of the FTAS is the one-dimension view it takes. It can only measure one axis at a time. A craft travelling left to right may detect no slope, or a zero gradient and land, not knowing that it's on the side of an enormous mountain but because it was travelling perpendicular to the direction of the side slope the gradient appeared to be minimal.

    I think the answer is in a more sophisticated database where multiple points form a network of gradiants and the whole network together provides a clearer picture of the terrain around it. For example, measuring the altitude at point A and then point B gives the slope between A and B (obviously). Another measure at Point C can not only be compared with the previous point B, but alos the first point A. Greater degrees of movement across the z and x axis (left/right, forward/back) between measurements will provide a view of a wider space, but with less granularity. For this reason, a craft on descent should maximise movement across the z and x whilst at a high altitude to assist with pinpointing the general location of a suitable plateau. As the craft decends towards a general flat, movements should be smaller and more refined. Movements should be smaller and deliberate and closer together as the craft approaches a radar altitude of 0.

    I'm not sure how sophisticated kOS can be with storing a lot of data points. What are the options? Arrays, variables, stored in files? I'll have to see.

  7. I haven't played KSP for many many months. Never played 0.25 and never downloaded 0.90 but a fellow Kerballear (is that a thing?) inspired me to visit Vall. So I did. I'll let IMGUR do the talking:

    ** spoilers inside - if you know nothing of Vall I suggest you don't read! **

    Mission profile: To land a rover near Vallhenge

    Craft parameters: Just build it and go. No testing - just do it.

    Mods: Sandbox, v0.25, MechJeb and Darn It!

    Imgur (mobile devices beware!) : http://imgur.com/gallery/fAKaY

×
×
  • Create New...