To download NI software, including the products shown below, visit ni.com/downloads.
To execute this example:
Requirements
Software
LabVIEW 2012 or compatible
Hardware
-
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Wow, Thanks
nice job, but artificial horizon is broken. It works wrong when changing pitch.
sorry for replaying my own comment. but I can't found edit option.
This is what Wikipedia says about it:
"On the attitude indicator you will see two white or yellow horizontal lines with a dot between them. The horizontal lines represent the wings and the dot represents the aircraft's nose. If the symbolic airplane dot is above the horizon line (more blue background) - the aircraft is nose up. If the symbolic airplane dot is below the horizon line (more brown background) - the aircraft is nose down."
good job
Great work tjellden! Do you think you could add some documentation so people know what the subVIs do? It took me 20 minutes to read your code to figure out what you were doing and I think some well place comments could help shorten this time. Overall though, great work and very clean code!
Thanks for letting me know. I would gladly like tohelp you some day, but unfortunately I haven't time right now. If youor some body like to work on the project then I would be more thenhappy. For the moment I spent all my time with my little kid.
When it comes to the editor or other parts that Ihave talked about, is those made for paid customer so I can't releaseit on the net.
But some part of the background and explanation ismade available on the net.
http://decibel.ni.com/content/docs/DOC-5422
Here is an old example of drawing and rotation that imade.
good job! thank you!
Very impressive and very concise!
I do have one question. On your moving sphere ADI, how can I swap the location of the E and W cardinal heading letters. In actual aircraft with this type of ADI the visualization for the pilot is that he is inside the sphere and the horizon is moving past his nose thus, when he is in a 90° left bank the lines of heading are moving from the top of the display to the bottom and the heading is decreasing. In this example if you began on a heading of 360° (N) you would next see 270° (W). You have the rotation of the sphere correct in both pitch roll and yaw (heading) the only inconsistency is the W and the E are swapped. I've played with the E_W_N_S on shpere.vi but can't figure out how the swap those two letters.
Again very impressive and thanks,
Jim
Hello Jim and thanks for the comment
This program was actually made as validation of my 3D modulating script handler. I don't know haw mush you have looked into the program, but the main part is a script handler and the LabView was just a quick way to get it up and running. The airplane is just made for fun, when I had finished the script handler. So I haven't paid any attention regarding error like reality or correctness to this part of the project, so feel free to change and republic the change, keep just a reference to the original place.
If you like graphics you may have seen my other contribution: https://decibel.ni.com/content/docs/DOC-5422
Regarding your question:
As I told, I didn't spend so much time on this part, so many thing is made the quit and dirty way, and some is for portability, the script handler was made for C-code.
As for the letters E W S N, they are actually drawn line-by-line. In the file "E_W_S_N on sphere.vi" in the upper left corner, of the file, there you have the vertex for the letters. Each letter is then put together into an array. If you change the order in which those letters are put together into the array. Then you also replace the order of them as they are displayed.
The C-code is used in a other project: http://www.youtube.com/watch?v=uxuPeHbquWk
Where the hardware comes from: http://www.stm32circle.com/hom/index.php
Tobbe