Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted

03-31-2009 10:18 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi,

I am currently working on a project which involves using a set of coordinates to control a car. At the moment, these waypoints are input into an array of x and y and the car is commanded to traverse the line between them.

The problem i have is I cannot work out how, given 3 points, A (being the previous waypoint), B (being the waypoint the car is approaching) and C (being the next waypoint the car will be travelling towards after it has turned) I can calculate whether the car is turning right or left at B.

Thanks, Luc

03-31-2009 10:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

03-31-2009 10:45 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

It might be easier to do all that using complex numbers (RE,IM) instead of number pairs (X,Y). You can get the difference in vector angle, which you then need to fold into a unique range (e.g. 0..360 or -180..180). Half of the range is "right", and the other half is "left".

See how far you get. 😉

03-31-2009 10:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

03-31-2009 10:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

03-31-2009 11:30 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

03-31-2009 12:53 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi Luc,

yes

Or you calc the difference of theta...

Best regards,

GerdW

CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO

Kudos are welcome

GerdW

CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO

Kudos are welcome

03-31-2009 01:04 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator