+ Reply to Thread
Results 1 to 3 of 3

Thread: Help! I need someone to help me with a complex math problem

  1. #1
    Wire Amateur Meatloaftwo's Avatar
    Join Date
    Jul 2007
    Location
    Yodas Hut
    Posts
    32

    Default

    So I am trying to make a ship that can warp using the hover drive controller but I am also trying to have a asgard transporter send people along with the ship without having to make them get in chairs. But what I need help with is I am trying to Send them to where they were standing in the ship so I need to calculate the distance from were they are with a target finder that would be left behind exactly were the gps was and were the gps was and then send them to the point were they were in the ship. Problem is i have no idea how to do this I attempted a expression code but it ended up sending be a great distance below the planet i was on. So if any one is interested in helping then please post here.

    O ya and here is the expression code That I tried mabey someone can point out were I messed up.
    N@matter converters
    I@GX GY GZ TX TY TZ LX LY LZ
    O@X Y Z
    X = (GX - TX) + LX
    Y = GY - TY + LY
    Z = GZ - TZ + LZ


    the G = were the Gps was, The T represented the location on the target finder and the L represented were the ship telaported to

  2. #2
    Wire Amateur Norseman's Avatar
    Join Date
    Jun 2007
    Posts
    90

    Default

    I don't have the asgard teleporter, so I can't test whether or not I have the right answer, but I've had some experience with teleporters. I think you're on the right track. As a basic math example, let's say we have point A, which is at 0,0 and point B which is at 1,2. Point B is 1 unit farther along the X axis, and 2 points farther along on the Y axis. The way to get their difference is to subtract A from B. So, if we have our on-ship GPS device at point A, and our person at point B, we first want to calculate where the person is in relation to the GPS device. So, we get the X, Y, Z coordinates by subtracting the GPS device's coordinates from the person's coordinates. (You appear to have subtracted the person's coordinates from the GPS device's coordinates, which would be backwards.)

    Now, let's say we want point B to be 2 units farther along the X axis, and 3 units farther along the Y axis, relative to point A. We would add 2 to A's X coordinate, and 3 to A's Y coordinate. So, once you get the new GPS device coordinates (or if you know them already), you add that original difference in location to the new location. In other words, if the person was 5 units away from the GPS device on the X axis, you now position them 5 units away from the new GPS device location on the X axis.

    If I were to write an expression to do this, it would look like this:

    N@matter converters
    I@GX GY GZ TX TY TZ LX LY LZ Save
    O@X Y Z
    Save == 0 -> X = TX - GX + LX
    Save == 0 -> Y = TY - GY + LY
    Save == 0 -> Z = TZ - GZ + LZ

    Assuming LX is how much you're changing your ship's X coordinate, assuming you calculate this before the ship teleports and save it (by setting Save to equal anything other than 0 immediately before you teleport), and assuming the GPS device is on the ship. My suspicion, since you say the person ended up beneath a planet or something, is that you teleported and then made this calculation. If it was only a problem of mixing up the order in which you should subtract, the person would have ended up on the exact opposite side of the GPS device, but no further away from it. If you mess up both of these, first the ship teleports, and then you end up on the opposite side of the GPS device on the ship but at the same distance, which would send you far away.

  3. #3
    Wire Amateur Meatloaftwo's Avatar
    Join Date
    Jul 2007
    Location
    Yodas Hut
    Posts
    32

    Default

    K i tried it and it works Thanks

+ Reply to Thread

Similar Threads

  1. Simple things made complex
    By itsbth in forum Finished contraptions
    Replies: 3
    Last Post: 01-21-2009, 01:21 AM
  2. Replies: 13
    Last Post: 11-29-2008, 05:38 PM
  3. In need of high math skills to solve my expression problem...
    By Gunnanmon in forum Installation and Malfunctions Support
    Replies: 6
    Last Post: 10-07-2008, 02:15 PM
  4. Making a exprssion math into cpu math
    By Ronin in forum CPU, GPU, and Hi-speed Discussion & Help
    Replies: 5
    Last Post: 06-03-2008, 07:09 PM
  5. The most complex way to make a sphere...
    By Dimencia in forum CPU, GPU, and Hi-speed Discussion & Help
    Replies: 7
    Last Post: 04-07-2007, 08:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots