yaw, pitch and roll to direction and elevation
-
- Newbie
- Posts: 5
- Joined: Mon May 19, 2008 12:00 am
yaw, pitch and roll to direction and elevation
Hi,
I have a sensor in a borehole probe that outputs yaw (azimuth), pitch and roll. I would like to convert the output to Direction and Elevation (for example the probe has a direction of 37.5 degrees from north and is tilted down at an angle of 82.4 degrees from the horizontal). Then I want to make a 3D plot showing the probe's direction and tilt. The conversion from yaw, pitch and roll to direction and elevation is not as easy as it seems because it requires a 3D translation. I have searched Google looking for some good example code for the translation but not found the solution yet.
Any help on converting yaw (azimuth), pitch and roll to Direction and Elevation and then plotted an image of the probe in TeeChart would be very much appreciated!
Lost at the moment.
Thanks,
Robert Yeatman
I have a sensor in a borehole probe that outputs yaw (azimuth), pitch and roll. I would like to convert the output to Direction and Elevation (for example the probe has a direction of 37.5 degrees from north and is tilted down at an angle of 82.4 degrees from the horizontal). Then I want to make a 3D plot showing the probe's direction and tilt. The conversion from yaw, pitch and roll to direction and elevation is not as easy as it seems because it requires a 3D translation. I have searched Google looking for some good example code for the translation but not found the solution yet.
Any help on converting yaw (azimuth), pitch and roll to Direction and Elevation and then plotted an image of the probe in TeeChart would be very much appreciated!
Lost at the moment.
Thanks,
Robert Yeatman
Re: yaw, pitch and roll to direction and elevation
Hello Robert,
I understand you need to find how to do this conversion in order to represent it in a chart, but this doesn't look as a problem directly related with the charting tool supported by Steema Software.
I can tell you that wikipedia seems to explain what these angles mean in quite detail, but I haven't found delphi code to transform yaw, pitch and roll values to direction and elevation.
Actually, I'm not sure if the conversion you ask for is possible. Aren't you just trying to eliminate the roll?
I understand you need to find how to do this conversion in order to represent it in a chart, but this doesn't look as a problem directly related with the charting tool supported by Steema Software.
I can tell you that wikipedia seems to explain what these angles mean in quite detail, but I haven't found delphi code to transform yaw, pitch and roll values to direction and elevation.
Actually, I'm not sure if the conversion you ask for is possible. Aren't you just trying to eliminate the roll?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 5
- Joined: Mon May 19, 2008 12:00 am
Re: yaw, pitch and roll to direction and elevation
Hi Yeray,
Thanks for responding. I would like to display in real-time a probe in 3D space showing its direction and tilt using TeeChart. You are right that the calculations are the problem - not TeeChart at the moment . I was hoping that someone else may have also plotted a Yaw, Pitch and Roll sensor in TeeChart and could provide some more insight into converting the Yaw, Pitch and Roll values into a direction (something like NE at 47 degree) and dip (downwards at 82 degrees).
I have seen the info on wikipedia but I am still at a loss of how exactly to convert the 3 sensor values into something useful for TeeChart. The matrix math and/or the use of a quaternion makes me confused. There is also the possible problem of Gimbal lock (loss of 2 degrees of freedom) when the probe is near vertical and the loss of 1 degree of freedom when the probe is near horizontal. Ugh!
I would greatly appreciate it if someone could explain how this is done (or can suggest where else I can look).
Best regards,
Robert
Thanks for responding. I would like to display in real-time a probe in 3D space showing its direction and tilt using TeeChart. You are right that the calculations are the problem - not TeeChart at the moment . I was hoping that someone else may have also plotted a Yaw, Pitch and Roll sensor in TeeChart and could provide some more insight into converting the Yaw, Pitch and Roll values into a direction (something like NE at 47 degree) and dip (downwards at 82 degrees).
I have seen the info on wikipedia but I am still at a loss of how exactly to convert the 3 sensor values into something useful for TeeChart. The matrix math and/or the use of a quaternion makes me confused. There is also the possible problem of Gimbal lock (loss of 2 degrees of freedom) when the probe is near vertical and the loss of 1 degree of freedom when the probe is near horizontal. Ugh!
I would greatly appreciate it if someone could explain how this is done (or can suggest where else I can look).
Best regards,
Robert
-
- Newbie
- Posts: 5
- Joined: Mon May 19, 2008 12:00 am
Re: yaw, pitch and roll to direction and elevation
HI,
I have my probe working fairly well and would like to plot it. What would be the best way to plot the probe's direction (yaw, pitch, roll) using teechart?
The probe is in a borehole so its basically point downwards. I would like to hold (fix) the back of the probe at the top and center of a 3d space and then have the probe body point with the given yaw, pitch and roll.
I think this might be possible using the arrow series. It would be better if I could show the probe as a cylinder (perhaps an image) in a 3D coord system. Maybe it would be better to use something like the Teehouse???
Any suggestions of how to make this plot would be appreciated.
Thanks
Robert
I have my probe working fairly well and would like to plot it. What would be the best way to plot the probe's direction (yaw, pitch, roll) using teechart?
The probe is in a borehole so its basically point downwards. I would like to hold (fix) the back of the probe at the top and center of a 3d space and then have the probe body point with the given yaw, pitch and roll.
I think this might be possible using the arrow series. It would be better if I could show the probe as a cylinder (perhaps an image) in a 3D coord system. Maybe it would be better to use something like the Teehouse???
Any suggestions of how to make this plot would be appreciated.
Thanks
Robert
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: yaw, pitch and roll to direction and elevation
Hi Robert,
Can you point us to an example image, similar to what you need?
Thanks in advance.
Can you point us to an example image, similar to what you need?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 5
- Joined: Mon May 19, 2008 12:00 am
Re: yaw, pitch and roll to direction and elevation
HI,
I now have a start to what I need. I setup a 3D TeeChart with each axis set to 0 to 10. I added an image of a compass rose on the bottom axis. I plot a vector from the center of the top (5,10,5) to the positions given to me by the sensor (see the image below). The vector the represents the direction and dip of the probe. This works but I have a few problems still. 1) I would like to increase the line thickness of the probe vector (red) but I don't find anyway to do this. 2) I would like to draw to lines across the two top axes - to define the starting point of the vector. In the image I made the top front -to-back center line using a grid line for the axis (is there a way to show the grid lines without the axis values?). I cannot find a way to setup an axis grid line to make the top right-to-left line. For now I used a second vector line to make the top right-to-left line. It looks a bit funny because it has an associated arrow head (I cannot find a way to hide the arrow head either).
Any suggestion on how to make the vector line thicker (or thicker and wider); how to draw the top center lines or how to remove the vector arrow head would be appreciated.
Best regards,
Robert
I now have a start to what I need. I setup a 3D TeeChart with each axis set to 0 to 10. I added an image of a compass rose on the bottom axis. I plot a vector from the center of the top (5,10,5) to the positions given to me by the sensor (see the image below). The vector the represents the direction and dip of the probe. This works but I have a few problems still. 1) I would like to increase the line thickness of the probe vector (red) but I don't find anyway to do this. 2) I would like to draw to lines across the two top axes - to define the starting point of the vector. In the image I made the top front -to-back center line using a grid line for the axis (is there a way to show the grid lines without the axis values?). I cannot find a way to setup an axis grid line to make the top right-to-left line. For now I used a second vector line to make the top right-to-left line. It looks a bit funny because it has an associated arrow head (I cannot find a way to hide the arrow head either).
Any suggestion on how to make the vector line thicker (or thicker and wider); how to draw the top center lines or how to remove the vector arrow head would be appreciated.
Best regards,
Robert
- Attachments
-
- 3D chart using a vector to show probe orientation on compass rose.
- 3D plot1.jpg (25.21 KiB) Viewed 12282 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: yaw, pitch and roll to direction and elevation
Hi Robert,
How are you drawing it? Custom drawing on the chart canvas or using a built-in series? Most likely you need to change the Pen.Width of the object you use, for example:1) I would like to increase the line thickness of the probe vector (red) but I don't find anyway to do this.
Code: Select all
Chart1.Canvas.Pen.Width:=3;
I'm afraid not. There's a trick you can do though, you can make blank spaced labels so that grid lines are drawn and labels are not visible and also modify Ticks and MinorTicks, for example:2) I would like to draw to lines across the two top axes - to define the starting point of the vector. In the image I made the top front -to-back center line using a grid line for the axis (is there a way to show the grid lines without the axis values?).
Code: Select all
procedure TForm2.Chart1GetAxisLabel(Sender: TChartAxis; Series: TChartSeries;
ValueIndex: Integer; var LabelText: string);
begin
if Sender = Chart1.Axes.Left then
begin
LabelText:=' ';
end;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
Chart1.Axes.Left.TickLength:=0;
Chart1.Axes.Left.MinorTicks.Visible:=False;
end;
You may need to make the DepthTop axis visible:I cannot find a way to setup an axis grid line to make the top right-to-left line. For now I used a second vector line to make the top right-to-left line.
Code: Select all
Chart1.Axes.DepthTop.Visible:=True;
It looks a bit funny because it has an associated arrow head (I cannot find a way to hide the arrow head either).
Changing Pen.Width as I suggested earlier. If this doesn't help please attach a simple example project we can run "as-is" to reproduce the problem here.Any suggestion on how to make the vector line thicker (or thicker and wider);
Using DepthTop axis.how to draw the top center lines or how to remove the vector arrow head would be appreciated.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 5
- Joined: Mon May 19, 2008 12:00 am
Re: yaw, pitch and roll to direction and elevation
Hi Narcís,
Thanks for the impressively fast response! I originally used the Vector 3D series to draw the “probe position” and I did not find a line thickness for this series. Changing the pen width for the series did make the probe’s vector arrow thicker. Thanks for the idea.
I eventually changed to use the TPoint3DSeries. When the line is thick it makes a nice looking cylinder (a good representation of the probe).
I tried to use the DepthTop axis and grid to make the Left-right top center line (to define the start of the vector) but I cannot make it work. The DepthTop grid is shown on the yellow wall and the bottom compass image. The DepthTop grid seems to grid the same walls as the DepthRight grid. I cannot find a way to show a grid that covers the top of the chart “cube”. I ending up using MoveTo3D and MoveTo3D to draw the “grid” line. Works great!
Thanks much for the help.
Robert
Thanks for the impressively fast response! I originally used the Vector 3D series to draw the “probe position” and I did not find a line thickness for this series. Changing the pen width for the series did make the probe’s vector arrow thicker. Thanks for the idea.
I eventually changed to use the TPoint3DSeries. When the line is thick it makes a nice looking cylinder (a good representation of the probe).
I tried to use the DepthTop axis and grid to make the Left-right top center line (to define the start of the vector) but I cannot make it work. The DepthTop grid is shown on the yellow wall and the bottom compass image. The DepthTop grid seems to grid the same walls as the DepthRight grid. I cannot find a way to show a grid that covers the top of the chart “cube”. I ending up using MoveTo3D and MoveTo3D to draw the “grid” line. Works great!
Thanks much for the help.
Robert
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: yaw, pitch and roll to direction and elevation
Hi Robert,
You're very welcome.
You're very welcome.
I see, grid lines for the DepthTop axis are painted on the left wall. Glad to see you found a workaround.Robert Yeatman wrote: I tried to use the DepthTop axis and grid to make the Left-right top center line (to define the start of the vector) but I cannot make it work. The DepthTop grid is shown on the yellow wall and the bottom compass image. The DepthTop grid seems to grid the same walls as the DepthRight grid. I cannot find a way to show a grid that covers the top of the chart “cube”. I ending up using MoveTo3D and MoveTo3D to draw the “grid” line. Works great!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |