1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

how to steer a ship so that it points straight to gps

Discussion in 'Programming Questions and Suggestions' started by MarsAttacks, Mar 15, 2020.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. MarsAttacks

    MarsAttacks Trainee Engineer

    Messages:
    23
    i'm trying to make my ship to face an object far from it.
    i can get the ship orientation with a remote, but how to compare it over a gps and then rotate the ship?
    help plz
     
  2. Wicorel

    Wicorel Senior Engineer

    Messages:
    1,263
  3. Stardriver907

    Stardriver907 Master Engineer

    Messages:
    3,368
    Do you have the GPS of the object you wish to face? Autopilot.
     
  4. Wicorel

    Wicorel Senior Engineer

    Messages:
    1,263
    if you turn off all the thrusters, keen's autopilot will aim towards a set waypoint (because it does that to move 'towards' it).

    But there's no way from the remote to tell when it is aimed; you'll have to calculate that yourself.
     
  5. Stardriver907

    Stardriver907 Master Engineer

    Messages:
    3,368
    Translation error: >>detected<<



    You want your ship to turn and face an abject. I interpreted earlier (because of the title of the thread) that you had the waypoint of the object. Autopilot will only work if you have the gps coordinate of the object and you have already set a waypoint at that coordinate. If not, autopilot won't help you.

    You can use sensors to control the gyros. Modders with skill are using cameras in some way to do that. I'm guessing that "far away" means several kilometers at least. Most likely you will have to use cameras.

    I don't understand what "compare it over a gps" means. Does "ship orientation" mean you can get the position (coordinates) of the ship, and you want to compare that gps coordinate to the gps coordinate of the "far off object"?

    Or does it mean you can determine where your ship is and what direction it is pointing, and if you had the gps coordinate of the "object" you could calculate how far your ship needs to turn to face it?
     
  6. MarsAttacks

    MarsAttacks Trainee Engineer

    Messages:
    23
    i'm gonna try what wico posted be4..thx mate
     
    • Friendly Friendly x 1
Thread Status:
This last post in this thread was made more than 31 days old.