Visual C++ :: Real Time Plotting Of Latitude And Longitude
Dec 17, 2012
Any application or open source software (vc++ or vb.net or c#.net) that can display a high resolution map and i can input real time latitude and longitude of points through an external file and those points can be displayed on map in real time..... I am all new to this plotting on map stuff....
View 2 Replies
ADVERTISEMENT
Mar 9, 2015
I have code for conversion of longitude and latitude and I need to reverse the function so it will work in opposite direction:
Code:
float LongitudeDeg = argv[1]; // some longitude
float LatitudeDeg = argv[2]; // some latitude
uint32_t u,v,l,n;
l=15; // l range is 2-29
[Code] .....
On start of the code we know longitude,latitude and l. And the result is u and v. And I need function when I will know the u and v, possibly l too, to calculate longitude, latitude.
View 2 Replies
View Related
Jul 4, 2012
I have a list of latitude and longitude coordinates which are supposed to trace the outline of a city. Somehow they got scrambled so that they are now out of order. I'd like to write a program to arrange them such that one could follow from one coordinate to the next and trace the perimeter. However, I've run out of ideas for algorithms. What I did so far was a simple search for the nearest coordinate, starting from the first coordinate pair in the array. This produced local regions which worked rather well, but globally there were large jumps as the algorithm ran out of nearby coordinates and was forced to jump across the map.
Is there already a developed algorithm to perform this function?
View 1 Replies
View Related
Mar 6, 2015
In my project i need to calculate the distance between two lattitude and longitude points. After compiling the code I am getting an error that "conflicting types for deg2rad". How to solve this? Seems the code looks ok. but...
Code:
#include <math.h>
#define pi 3.14159265358979323846
double distance(double lat1, double lon1, double lat2, double lon2, char unit) {
double theta, dist;
[Code] .....
View 4 Replies
View Related
Nov 15, 2013
I was assigned a project to implement a real time graph to an application which continuously outputs data numerically through the GUI. The application that was created to do this is written in C.
I have to turn those numerical numbers into a graphical display that is periodically updated to appear as real time.
My adviser suggested using NTgraph [URL] ...... I had no clue how to implement this to my code and was finally able to understand that the .OCX needs to be registered as a COM and then imported to the application using visual studios. However, I get an error when I try importing it since it is in C (Visual Studios 8) and not an MFC application.
So my question is if it would be possible to implement the ActiveX control to my application even though it is not an MFC application and how to go about it.
View 6 Replies
View Related
Apr 17, 2015
How i can take data from internet n real time i want make program wich alarm when a specific site(from my university) have a announcement...
View 6 Replies
View Related
Apr 25, 2015
I want to develop a interactive and animated real-time offline map application. For example if user puts mouse on the map, it should the latitude, longitude and name of the location.
There should be animation for example blinking of a location. And it should work offline without internet. I want to use google maps data but I don't know how.
I know following languages:
C/C++ (Advanced level)
PHP (intermediate level)
Java ( beginner level)
View 1 Replies
View Related
Oct 31, 2014
I am working on a computer program where I need to generate points on a circle. I am familiar with this kind of algorithm:
for(d=0; d<=2*pi; d+=0.01)
{
x = cos(d)*radius;
y = sin(d)*radius;
}
However, due to the specifics of the program I am writing, I need to iterate through a fixed number of points one at a time, like so:
for ( int x = 0; x < blockSize; x++ )
{
y = ???
}
This essentially "fixes" one axis of the circle, since I can't do: x=rx+sin(d)*r.
I have tried simply: "y = sin(d)*radius;" and I get a curved shape, but it's not a circle.
My question then is, how do I get the value of y in this situation, where the x axis is incrementing by 1 through a range of values? Is it mathematically possible?
View 6 Replies
View Related
Feb 10, 2014
So I am trying to create a program that reads a series of files and creates a graph plotting points from the file. So far my code looks a little something like this -
include <iostream>
include "ccc_x11.h"
include "ccc_shap.h"
include "ccc_win.h"
include <fstream>
using namespace std ;
int ccc_win_main() {
cwin.coord(-10, -10, 10, 10);
[Code] ....
However when I run the program nothing happens. I think it has to do with the way I set up my files, which looks a little something like this-
-9 -9 -9 -9 -9 -9 -7 -7 -6 -6 -5 -5 -4 6 3 1 -1 -3 -6 5 -5 4 -4 2 -2 0
The first thirteen numbers are the x values of the points, and the last thirteen are the y values of the points. Is there any other way to have my program read the file and display the given points?? I would use getline() however that would make my point into a string, and I dont really know how to convert a string to a double before putting the variable into a point.
View 2 Replies
View Related
Mar 1, 2015
I am a very very beginner at programming with C. Well, basically i have to generate a real number between 0 and 1 (which as the same as from 0 to 100 k and than dividing everything with 100 k).
Why I am constantly talking about 100 k? Because I would need approx 50 000 random numbers between 0 and 1. My code currently looks something like this:
Code:
int main(int argc, char** argv) { int min,max;
double number;
srand((unsigned)time(NULL));
number = 1 + rand()%100;
printf("The number is: %lf",number);
sleep(2);
return (EXIT_SUCCESS);
}
And If I am not mistaken, should generate numbers between 0 and 100. But I can't figure it out how to change to code in order to get enough numbers.
View 4 Replies
View Related
Oct 28, 2014
All I want is to let the user enter a value such as .55 or say, .34 and use that in a calculation.
I cannot get passed the errors.
double theRate;
double totalMileage;
double amountOwed;
private void btnCalculate_Click(object sender, EventArgs e)
[Code] ....
So how do you get numeric input from a user?
View 3 Replies
View Related
Feb 7, 2015
I have been writing code to find the roots of a quartic (with coefficients input by the user) by the Newton Rapson method. The method fails if no real roots exist so I have been trying to implement an initial check to see whether the equation has real roots. I've been trying to use the intermediate value theorem but it only works for functions with a positive and negative tail. extend the bounds (fa and fb) to check over many ranges or any other mathematical method of better effect?
Atm I define fa<0<fb where fa=F(-10) and fb=F(10).
#include <stdio.h>
#include <math.h>
#include <conio.h>
#include <stdlib.h>
int a0, a1, a2, a3, a4;
double F(double x) //Sets main function {
return (a0+a1*x+a2*pow(x, 2)+a3*pow(x, 3)+a4*pow(x, 4));
[code].....
View 1 Replies
View Related
Apr 26, 2013
I am trying to automatically extract all time stamps in a pdf file. These are typically in a line like:
when="2010-07-30T15:20:30+04:00"
For this I was thinking of using CStdioFile and the ReadString function. Somehow this doesn't work. My example code is below. Is this because pdf is not a true text file, because strings read can be longer than some max,...? Any quick way of reading the file and extracting the desired text between the brackets?
Code:
CStdioFile InputFile;
if (InputFile.Open(FileName,CFile::modeRead)) {
[Code]....
View 14 Replies
View Related
Oct 6, 2014
I need using CSemaphore class in MFC C++ application. I have an edit1 box with multil ine and each line has a string. I'm trying to loop through edit1 box and for each string to start a thread that is using the string for specific function. I'm trying to limit the run of only one thread at the same time with semaphores but all treads start at the same time.
So when i click button1 i loop through edit1 box and start threads:
Code:
void CMFCApplication1Dlg::onButton1Click() {
int i, nLineCount = edit1.GetLineCount();
CString strText, strLine, mesaj;
for (i = 0; i < nLineCount; i++) {
[Code] ....
While looping through edit1 box multi line and starting the threads:
Code:
UINT CMFCApplication1Dlg::StartThread(LPVOID param) {
WaitForSingleObject(semafor, INFINITE); // wait for semafor to signal
THREADSTRUCT* ts = (THREADSTRUCT*)param;
// here i'm doing some operations with the string from edit1 box
ReleaseSemaphore(semafor, 1, NULL); //release the semaphore for next thread to begin
}
Instead of running only one thread at a time all threads start. What am i doing wrong ?
View 14 Replies
View Related
Oct 10, 2013
I need codes for a program in C or C++ that will show the real factor (the smallest one, without the number 1) when an integer is given as input.
When the program is started, it will ask to enter a number and press enter. After entering a number, it will first check if it is a prime number or not. If prime, it will notice that it is a prime number, otherwise, it will print the smallest real factor of the given integer.
For example, if 12 is entered, it will print, the smallest real factor for this number is: 2
If 27 is entered, it will print, the smallest real factor for this number is: 3
...and so on
View 12 Replies
View Related
Feb 6, 2013
How can I generate a pseudo-random real number from interval [0,1] ?
Can it be generalized to any interval? Like [0,a], where 'a' is a parameter?
I tried searching for it, I only found rand(), srand(), random(1), and randomize. None of it actually seems to work for me..
Later I actually succeeded with something like
srand( (unsigned)time( NULL ) );
printf( " %6d
", rand() );
but it only produces up to five digits integers and I cannot divide by 99999 to get it into [0,1].
View 11 Replies
View Related
Jun 26, 2013
I want to generate random numbers of normal distribution and use scentence like
std::default_random_engine generator;
std::normal_distribution<double> distribution(0,1);
arrayX[i][j]=distribution(generator);
But I find that each time the array I got are the same. So how should I generate random numbers with different seedings with normal distribution?
View 2 Replies
View Related
Dec 21, 2012
I have been given a task to debug a C++ project. I have not written a single line of code in this project!!
This project executes for about 5 minutes without problem. Then it ends with an exception "Unhandled exception at (some .dll name) in EITos.exe: 0xC0000005: Access violation reading location "
Now every time I execute the program. The error is from a different dll. Sometimes it is a dll created by other programmers, sometimes it is related to QT. So I don't think this is a code problem. Is there any project setting that would affect this?
View 6 Replies
View Related
Mar 3, 2015
This program is suppose to store input from a user (example 14 15 27) and output it three times. Once to confirm the input using the get function to recall the data, once to look like military time (14:15:27), and once to look like slandered time (2:15:27 p.m.).
The program runs, but this is what I'm getting:
I'm thinking its because I'm using the same integers to store two sets of data. I tried to create different integers for every set of data it didn't seem to fix the problem. The fact that the program is running makes trying to figure out where the problem quite confusing to say the least.
Code:
#include <iostream>
using namespace std;
class time {
private:
int hr, min, sec;
[Code] ....
View 6 Replies
View Related
Jun 13, 2013
I have total time in seconds (say 2500 seconds). I want to store this time in CTime or CTimeSpan format.?
How to do this.?
View 2 Replies
View Related
Feb 1, 2013
How to show only current date not time in webforms in visual studio as for date and time code is
Label1.Text = DateTime.Now.ToString();
What for only date not time
View 3 Replies
View Related
Feb 4, 2014
I am trying to build a VC++ project in Visual Studio 2010. [URL] ....
This project has a dependency on openssl libraries. How can I successfully build this project? How to add third party libs/dlls in a project.
View 1 Replies
View Related
Feb 2, 2015
I Like to Open a Dialog When the Button Was Pressed for 5 seconds Continuously.
I'm using Windows 8 HP Tablet, Is MouseUp & MouseDown events suitable for this requirement.
View 12 Replies
View Related
Dec 26, 2014
Im working on my project for college and i want to know how to add sth similar to a chronometer for user to see how much time have passed while entering some characters using cin.getline function.
View 2 Replies
View Related
Mar 19, 2013
I am starting to learn C++.Designing class CPolynom to work with polynomials. The polynomial coefficients are memorialized in the field of real double precision numbers. Implement the following functions:
-Constructor, which defines the order of the polynomial CPolynom(int order)
-method to add the appropriate grade Coef(int exp, duble coef)
-method of addition, subtraction, multiplication and division two polynomials
-method to add a field coefficient
-method for nala
View 1 Replies
View Related
Mar 12, 2013
In my project I'm using PVOID pointer to store real time data. After getting this data I will convert the data into byte array, like below
Code:
byte *bPoint = NULL;
PVOID pvData;
byte TempArr[1024];
bPoint = (byte*) pvData;
for(int i=0;i<1024;i++)
TempArr[i] = (byte) (*bPoint + i);
Processing time for the above code takes 9500 to 9900 microseconds (Used QueryPerformanceCounter).
Code:
TempArr[0] = ((BYTE*) pvData) [0];
This code takes 1100 to 1200 microseconds. My doubt is, The processing time of PVOID data into byte array conversion takes time like above? Or any other easy way(PVOID data into byte array conversion) to reduce the processing time?
View 14 Replies
View Related