GPS Coordinates and Direction - c#

I have a set of places of interest (addresses with their GPS coordinates) and would love to know which ones are in the direction I am facing.
That is, I would like to know (in real-time) which places from the list one could "see" if they looked in that direction. It will be based on a compass direction on a mobile device and the GPS coordinates of that device.
The solution will be a Xamarin mobile application in C#, but I would first like to know what the concept is called and how one would tackle such a challenge if they can get the current GPS coordinates and the direction.

Related

same coordinate system between two objects c#

Hi i am writing a code at C#.I use a Kinect SDK V2 and a robot, for example my robot model is an IRB 1600.From the Kinect sensor i take a human point cloud when a human is detecting from the camera and from the robot i take one position(X-Y-Z position) that tells me where the robot is every time i ask it.So my problem is that the camera and robot have got different coordinate systems the sensor have the sender of the camera and the robot has his bases.I want to create a same coordinate system between them for distance calculation between human and robot.Are any methods to do that?tutorials?
Thank you
I think you just need to make a calibration...
Somewhere you need to say that your 3D coordinate system starts at (0,0,0) and then re-convert all the positions based on this coordinate system. Shouldn't be hard to implement.
Nevertheless, if you have both 3D positions of the two sensors, a simple calculation in 3D gives you the distance.
Distance=sqrt(X2-X1)^2+(Y2-Y1)^2+(Z2-Z1)^2)

Relationship between angle (Stepper motor) and distance (Kinect)?

Hi I am doing a project consisting of a stepper motor and Kinect. I want the stepper motor to rotate according to the distance of a body joint recognised by Kinect. I wan to cast a laser pointer on the left hand of a person all the time. If the person goes further away from the camera, the stepper motor moves in a way that the laser dot is at the hand.
First you need a copy of Visual Studio to develop in, Express should work:
http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx
Then you need to get the Kinect development libraries:
http://www.microsoft.com/en-us/kinectforwindows/develop/
Install both of those and run the test projects to get a feel for it. The learning curve will be pretty substantial if you've never developed before. Google is your friend, no one is going to be able to guide you step by step in this. You basic goal here is to find the distance the hand is at, and save it in a variable that can be used for other things(drive a motor).
Next, you'll need an easy way to drive your stepper motor. An arduino could work for this, but I don't know what voltage your motor is, so you may need external circuits to get the correct voltage to drive it.
You can interface with the arduino via the Serial port pretty easily:
http://www.codeproject.com/Articles/473828/Arduino-Csharp-and-Serial-Interface
So a basic program flow would be:
Kinect > Save hand distance > Send X value to Arudino to make it move motor
For a seasoned programmer with extensive low voltage experience(ie me) this is a pretty easy task. If you've never done anything like this before, get ready to crack some books(Google)! There's a lot of things you'll need to learn to approach this properly, but it could be a fun project. Your combining quite a few disciplines here, so you'll need to know each one at least a little bit.

Converting GPS coordinates into 3D model

As the question says, I am looking to use GPS coordinates (say from Google maps) to build a 3D model (a road).
So it should work as follows:
You go to Google maps and select a route (this can be between 2 points or a circuit). You then get the lat long coordinates for this route.
Using this data, you then feed it into a program that generates a height map of the coordinates as obtained from Google maps.
I am trying to make a demo in C# (XNA) that you can quickly generate a course of your neighbourhood for a driving sim (as long as I get the main road sections right its ok, wont be able to add detailed characteristics of the road e.g. a ditch next to the road or small bumps in the actual road surface).
Does anyone have any ideas on where I would even start with a problem like this (tried Google already but the best I could find was here)
GPS coordinates (latitude, longitude, altitude) uses a speherical 3D modell. What you want is a transformation to a cartesian 3D Model.
For this case you can convert them into ECEF coordinates, this then are a x,y,z coordinates
For ECEF overview see ECEF
A starting point could be to look at the Dotspatial libraries for .NET: http://dotspatial.codeplex.com/
I have used these libraries, but mainly to gather GPS coordinates from an external device. I haven't used these coordinates on a map for instance. The documentation is limited, but if you pry around you might be able to find some info.

I want help and idea about how to draw The path of GPS in C#

as you can see i want to do senior project about soccer player tracking with gps to show the path that player was using or tracking in real time
i already study about basic gps function in c# but I Really Have problems on how to draw paths on the map or picture that i want to use after we got the data from gps.
the hardware part are already finish but i get stuck in and idea for how to get the data from gps to draw path of player
I appreciate with any help on me ( sorry for bad english) Thank you very much
Link of my designed project picture :
http://image.ohozaa.com/view2/weK9gVKBzGZqRxKC
Just think about what you're doing.
GPS data (from each player) is received as a sequence of points (Latitude/Longitude?).
Convert those points to X/Y coordinates for your football field image
Use a graphics API (such as GDI / System.Drawing ) to draw lines between subsequent points
If you're using C# you might save time and trouble by using WinForms and subclassing Control and painting directly to the control's surface. You'll need to store a list of all the recent points for each player (because you'll need to constantly repaint the control).
Note that the geolocation features in .NET won't help you here unless all of your football players are going to be carrying laptops strapped to their backs. You'd want small GPS trackers attached to each player along with a small radiotransmitter that sends the data. An easy way to do this is with a commodity Bluetooth GPS unit, but I don't know if Bluetooth can support that many transceivers in such a small space, or even if the signal will reach from one end of the field to another. The most expensive way is to write a phone app and have each player carry a smartphone that sends geolocation data via a 3G or Wifi connection.
Note that GPS units tend to have a usable accuracy of about 5m (maybe 2.5m on a good day), and are useless indoors. Then consider the 5 minutes it takes for them to secure a good lock in the first place (mobile phones have quick geolocation because they use assistance from mobile phone masts). Football fields aren't very big, and even with 2.5m accuracy the data isn't going to be very useful.
In real sports they don't use GPS for this reason. Instead they use higher-precision radio units and specialist transmitter/receiver units placed around the pitch. An alternative is visual tracking, but that's an immature science (Turing help you if two players or more wearing the same team colour collapse into each other).
Looking at the picture you provided I'd say something like this is feasible with a WPF application using the Canvas control and the Line class. You'd have to convert your GPS data to (x,y)-coordinates where the origin is located at the upper left corner of the soccer field. Then you could connect subsequent points using line segments.

C# wiimote library - computing distance from sensor bar to wiimote

I'm working with the C# managed wiimote library for a little fun project I'm working on, But I'm having trouble finding a good tutorial on how to calculate how far the wiimote is from the monitor (i.e sensor bar). I want to create a zoom effect where an object will grow or shrink based on how far back you move the wiimote from the screen.
Can anyone help me with this?
The system is not calibrated, so it isn't able to tell you the actual distance. However it can tell you the relative distance. The IR sensor on the remote works by telling you the size and location of up the IR light sources on the sensor bar. When the remote moves farther away, the lights get smaller and closer together; when the remote gets closer, the lights get larger and farther away from each other. I would use the distance between the lights, as the size of the dots only goes from 0-15.
I recommend Brian Peek's Wii library: http://wiimotelib.codeplex.com

Categories