So I have been messing around with windows mobile development (in vb, don't hate me, i have grown accustomed to vb because of work). Anyways I come to a point where i would like to use the graphics object to draw an image and rotate it on occasion based on the state of the program. My instincts told me to use System.Drawing.Drawing2D.Matrix object to create that rotation but as it turns out it appears .net compact framework doesn't support that object.
So my question then is, is there any other method for rotating an image as i draw it. I can program in other languages as well if that is what is required, I was really only using vb because it was easy.
Any ideas?
Thanks
don't know about vb but
in c# i would look for an event to subscribe to
which would be fired when the orientation changed
or the resolution changed or some control resized
Sorry the question isn't related to orientation or resolution. I know when I want to rotate the image.
I will give more information, the image is a compass and I want to rotate the compass image based on GPS data received (Calculating the angles is not the problem either). Once I know that say I am 10 degrees off of north, i want to rotate the image of the compass so that north is still pointing north.
In my desktop development this would be done in vb or c# using the System.Drawing.Drawing2D.Matrix class, using Matrix.Rotate and them applying that matrix to the graphics object before i draw the image using graphics.drawImage().
Now the problem comes when I move to the mobile platform where System.Drawing.Drawing2D.Matrix does not exist and is appariently unimplemented. So then my question is, are there any other API's on the Windows Mobile Platform that support Rotation of an image by an arbitrary angle, and if not does any one have any good ideas where to start looking for implementing the rotation manually myself.
Thanks in advance
That's one of the annoyances with the .NET compact framework, not all of the PC .NET framework is implemented, and sometimes it's the bit you really want.
Time for a different angle on the problem. Create 36 compass images 10 degrees apart and store them all in an ImageList object. Pull the one you require out of it when the heading changes. Not quite as elegant as the Matrix class, but it may have to do.
The other approach would be to use DirectX drawing. The coding to do it, would probably involve a very steep learning curve, but not having dabbled in this arena yet, I can't offer much help.
The ImageList object in the .NET compact framework does not support ImageList.Draw(), (darn!, see previous post), so you would have to create a PictureBox object or similar and use :-
PictureBox1.Image = ImageList1.Images;
Where i is the index of the image you want to use. (0 to 35)
Thanks for the suggestions, I did end up predrawing the images of the compass. At the moment I went ahead and made 360 images but I am surely going to cut that down quite a bit. The question then becomes smoothness vs space. But either way you shake it it is working.
!! FUN APPLICATION, NOT INTENDED TO BE USED IN REAL WORLD AVIATION !!
For all those flight-sim enthusiasts out there: I have created this PFD (primary flight display) which shows the speed, the altitude the coards and the attitude similar to a real PFD display in an airplane cockpit.
Although the application has been created and tested on an HTC HD2, it might work on other devices as well. Internel or external GPS and the HTC G-Sensor are required. It is planned to add a serial communication channel to a PC server component which allows to use this little proggy with MS Flight Simulator displaying the flight parameters so you can get rid of the cockpit panel on your primary display.
Just keep in mind that this is the first version of the program, so there might be *some* improvement potential.
A screenshot of the program is also attached.
Pls let me know what you think about it.
Thanks.
As a pilot I cannot find any sense in this, sorry m8.
Useless for aviation.
Useful might be an HSI-App, an RAIM-availability-check-App, a NOTAM-APP and so on. An artificial horizon on a handheld device... No, not good...
Title correction...
It is just for fun, not intended for real world aviation.
I will change the title so that it becomes more clear.
As an airbus pilot I like it! Lots of scope for further development, keep up the good work !
when I read your discrip, I had something totaly dif pictured in my mind. guess Im falling back on my sail plane lesson days.
I had round face dial and a yaw bubble pictured.
While this is cool, I would prefer to see the old analog style with an altimeter that you can set your start altitude and a yaw bubble, rather than the HUD style. just IMO.
And yes this is just for fun.
Keep it up, I will follow your project with intrest.
cheers
Good Work mate
While some are critical in their opinion I'm pleased with your app.
Keep up the good work mate and for all others who are not so encouraging ...... what do you want for an app a full blown flight simulator, the guys making an effort to develop something and sharing it for a free with us so to help him out at least .... I mean at least encourage him and make some constructive criticisms.
It doesn't cost to be nice and help to motivate others...........
Customize it
Just as a hint for those of you, who would want to use other bitmaps. I have designed the application in a way which allows you to modify or extend it. If you look into the applications program folder, you will find an XML file describing the layout of the display. You may also change or add bitmaps. The bitmaps are all located in the
HTML:
resources
subfolder. If you change the size of the offset of bitmaps, you will have to adjust some values in the XML file as well.
As you can see there all items are drawn in 3d space.
However, I am working on a HSI as suggested before. I will post it later this week.
Known issue:
- After running the application 3 or 4 times, OpenGL is not working properly anymore (not able to create rendering context). This is an issue of OpenGL. You have to restart your device for OpenGL to work again. If anyone has a solution, please let me know.
leihen said:
It is planned to add a serial communication channel to a PC server component which allows to use this little proggy with MS Flight Simulator displaying the flight parameters so you can get rid of the cockpit panel on your primary display.
Thanks.
Click to expand...
Click to collapse
That would be awesome!
Cool app
Certainly would be better than no attitude information in the event of a vacuum and/or elec failure.Even if just to make flying the performance instruments a bit easier.
I would defintely like to see a HSI app possibly with an open (editable)waypoint database.Anyone interested!?
Keep up the good work!
I love it. Thanks so much...
I just wonder if settings could be made permanent until being changed again so as to start the application without my having to select REAL and AVERAGE everytime.
And as a proud HTC HD2 owner, the display could me made much
larger indeed...
Congratulations and thanks again.
This is a fine app with a lot of potential esp. for UL-pilots as an emergency backup if UL-airplane-pfd fails.
Would be nice if indicators are bigger and the layout equals to Flymap, Skymap or MGL-layout
There is enough place for a nice big yaw indicator. Maybe You can get some code from GPS-tracker V2.0 (MooNah) in this forum, it already has a full working PFD incorporated.
Good luck with further devs., when next version is online I will try it in my gyroplane.
I think it's fun!!!!!
next step: build a flightsim for wm where we could use this
You will be in real danger....if you do so.
troed said:
This is a fine app with a lot of potential esp. for UL-pilots as an emergency backup if UL-airplane-pfd fails.
Would be nice if indicators are bigger and the layout equals to Flymap, Skymap or MGL-layout
There is enough place for a nice big yaw indicator. Maybe You can get some code from GPS-tracker V2.0 (MooNah) in this forum, it already has a full working PFD incorporated.
Good luck with further devs., when next version is online I will try it in my gyroplane.
Click to expand...
Click to collapse
As you will easily see, this PFD horizon responds to gravity, that is, to the accelerometers installed in the phone.
It has no gyros, no way to provide PITCH ATTITUDE, WHATSOEVER.
If you keep the phone perfectly vertical and quickly move forward (accelerate) it will SURELY show a pitch up...pretty much the same effects that a stand-by compass shows when changing speed (remember that?...accelerate-north, decelerate-south).
You will have the very same pitch information as the one given by a bottle full
af water suspended from a string, or a can of Coke : and it will KILL YOU as well as your passengers (if any), not to mention people on the ground.
The only usable parts of this FUN APP (as named by the author himself ) in aviation are:
1. True track (not magnetic heading).
2. Altitude (neither QNH, nor QFE related, but of course; unless your flying field happens to be at sea level and actual atmosphere matches the ISA atmosphere parameters exactly). Remember that QNH variations as well as heat will make the GPS readings very different to that of your altimeter, as height of the air column will vary a +/-4% every +/-10 degrees Celsius.
Example. Airplane flying at Flight Level 300. QNH in the area 1023. Terrain at 2000 feet. Atmosphere is ISA+15.
Therefore if we move the 1013.25 setting to 1023 there will be a reading increase from 30.000 feet to 30300 (calibrated altitude, QNH related).
That is 28.300 feet above ground (we start with this as the air column height for the calculation). Since ISA is +15 we add 15/10 times 4% and we have 28300*15/10*4/100= 1698. True altitude is 30300+1698=31988
So we are cruising at FL300, 30.000 feet pressure altitude, 30.300 feet calibrated altitude (QNH related), 31988 above sea level, 29988 feet above ground level.
GPS WILL SHOW 31988 FEET.
3. Ground speed ( neither IAS nor CAS nor EAS nor TAS), as provided by GPS system. Remember that your airplane aerodynamics are related to calibrated speeds....you will stall if too slow ore destroy the airframe if to quick !!!! But you can navigate and make good your track, of course.
Hope I have made myself understood....and that you read this at the earlier !!!
Hi!
It quite very good if the second part under we have the route. I am using the Oziexplore program, it can creates the route, and apear on screen. if this soft applied to that once, could be perfected!
Thanks
great app mate..just for fun...
Nice work thank you. On future can you make like pilot cocpit with all dash boards like in Flith simulator game if this possible. Thank you
leihen said:
!! FUN APPLICATION, NOT INTENDED TO BE USED IN REAL WORLD AVIATION !!
For all those flight-sim enthusiasts out there: I have created this PFD (primary flight display) which shows the speed, the altitude the coards and the attitude similar to a real PFD display in an airplane cockpit.
Although the application has been created and tested on an HTC HD2, it might work on other devices as well. Internel or external GPS and the HTC G-Sensor are required. It is planned to add a serial communication channel to a PC server component which allows to use this little proggy with MS Flight Simulator displaying the flight parameters so you can get rid of the cockpit panel on your primary display.
Just keep in mind that this is the first version of the program, so there might be *some* improvement potential.
A screenshot of the program is also attached.
Pls let me know what you think about it.
Thanks.
Click to expand...
Click to collapse
Indeed as an Ultralight-Gyroplane-Pilot I like this app and since the Horizon-tab in GPS-Tracker by MooNah doesn´t work right now this could be alternative as a a last resort-backup if glass-cockpit instruments (MGL-Avionics) fail ...... (better to have this than nothing at all and I also have Flymap PPC on my HD2 if main Moving map Nav. fails)
This app has great potential since it reads the infos from G-sensor and GPS.
For the future dev. if I might add my wishlist:
1. Add to screen: slide-indicator and compass, Altitude
2. slightly more refined graphics
As a start: BRAVO, hope You have the patience to go on developing this nice app ( like Dunc001, that made in 100s of hours of work a professional weather app - Duncans Weather Panel - see there - that is more reliable than many professional aviation weather briefings).
I bookmarked this thread and hope for further developments by U
Congratulations
like the Android solution ixGyro:
http://www.ixellence.com/index.php?option=com_content&view=article&id=227&Itemid=274&lang=de
JHimmelbauer said:
like the Android solution ixGyro:
http://www.ixellence.com/index.php?option=com_content&view=article&id=227&Itemid=274&lang=de
Click to expand...
Click to collapse
Jepp, EXACTLY THIS would be cool on the HD2 on WinMo (Android not running on mine) !!!!!!!!!!!!!!!!!!!!!!!!!
troed said:
Jepp, EXACTLY THIS would be cool on the HD2 on WinMo (Android not running on mine) !!!!!!!!!!!!!!!!!!!!!!!!!
Click to expand...
Click to collapse
a other solution for Windows Mobile is "Inclinometer77" -
visit http://forum.xda-developers.com/showthread.php?p=6677074
This App goes in the right direction, but unfortunately not to use without Gyro in a Plane, but a nice game for pilots ;-)
Happy Landings
My first Android app, initially created out of a real need, but has grown a bit since.
My app allows loading or pasting of text csv or other column formatted text files to display the data either as y-t plots or arbitrary x-y plots.
Surprisingly, I couldn't find such an app. I could only find function plotters, which this app is not.
At first, I needed this app to show experiment results to a professor, but I now use it at work on my tablet instead of printing graphs, allowing me to interactively demonstrate points of interest in my analyzes.
It is written with large data in mind, using C++ and OpenGL for speed and tight memory usage.
It is available on google play under "PlotimFree" but I also attached it here.
Created graphs can be either exported to PNGs or saved as binary files for later fast re-loading with all configurations and parameters.
I use it mainly on my 10" tablet, but I tested it on a few phones and tried my best to make it useful on small screens.
Hi!
I've been proposed to implement an application that renders KML files (google earth and affiliates) overlaid with the camera's image, based on the current position (GPS) and orientation (accelerometer?).
I couldn't find a framework to overlay the models in the camera.
So I address the wiser XDA community in hope you can't point me in the right direction.
Are there any frameworks to achieve something like this?
My client produces .KML files for the structures, that can be downloaded from the app to offline storage, after that they want the user to point at a given direction and render objects in a given range from the user's position.
Thanks in advance,
LL
I used BeyondAR framework for augmented reality and overlaying camera image based on GPS and orientation. Don't know, if it supports KML files.
One of the primary reasons I purchased this phone was for its TriCam System which has the ability to create point clouds of data which in turn can be made into a 3D mesh. There are a few apps out that take advantage of this system:
Matterport Scenes (point clouds)
Constructor (creates object mesh with texture file)
Open Constructor (needs some work)
Scandy Pro (creates object mesh)
Of these 4 apps I prefer Constructor. It seems to do a good job of accurately mapping areas and objects. Scans are best taken on non shiny objects that are in areas not brightly lit. This is true for almost all 3D scanners. The scanner in this phone is no where near as accurate as some of the commercial options available today, but can do some impressive things.
Below are some links to scans I took while on vacation in Chicago. I did not clean them up at all and these are the raw files from Constructor. Some of the exhibits in Art Institute of Chicago were most ideal for the phones depth sensing technology. I was able to get some decent detail out of clay and marble sculptures.
Boar Incarnation of God Vishnu:
https://skfb.ly/6tDGp
Statue of the Aphrodite of Knidos(Sorry about the artifacts... I may clean this one up in MeshLab):
https://skfb.ly/6tDGU
That is way cool!
Thanks for a great post dantegl36.
You write that the Asus AR is not as accurate as other devices. Have you been doing some test? What other proffesional devices are you thinking of? DOTDPI?
//Niels