My Windows Phone app uses location tracking, and I am stamping the positions I use, with the system date and time.
This has worked well, but now there was a situation with a user, who had his date/time setup horribly wrong on his phone, meaning that the timestamps on his positions were all wrong.
So, I was looking into the Timestamp property on the Geocoordinate instead, but my question is: Is that timestamp really from the GPS unit, or is it just the system (device) date/time of when the position was obtained?
The documentation on MSDN says it is:
The system time at which the location was determined.
If that is the case I really don't see much use for it, but has anyone tested or have experience with this?
I have always interpreted this as the Systemtime but your question made me curios. So I tested this by experiment, switching off the set-time automatically and changing the the time somewhat will indeed change the timestamp of the Geocoordinate. While I have not found a good source to collaborate this my experiment makes me believe that your assessment is correct.
A way to go around this problem for your app could be to get the time from an online time service such as timezonedb api ?
Related
I try to detect some audio signals(pure sine) in near real time. I know that I will get some latency.
In the start I try to detect some tones of 10Khz in a duration of 75ms. That is achieved by a Goertzel filter. What is the prefered technique for that issue? I thought of making a little buffer that will always be detected by the Goertzel, but this sounds bad because I don't know when the the signal starts. Can you give me some help or idea ? Thanks
You'll have to do something like I am trying to do here (please do contact me if you fix my inaccuracy issues though) NAudio WaspiLoopback Goertzel
You can also take a look at: Decoding DTMF from a WAV file which have helped me a lot in getting something that can barely work, but it's a pretty good start.
I am using dotSpatial labrary in c#, I only can read realtime data.
but my problem is this.. how could I extract gps data storaged in my usb-gps device (it is passive gps)?
device information
brand : landairsea
Model: Gps Tracking Key
webPage: http://www.landairsea.com/gps-tracker/gps-tracking-key
From looking at their user guide:
http://www.landairsea.com/downloads/past-track-10.pdf
You could use the past-track software to save the stored data as .las format.
I believe that DotSpatial has a LIDAR plug-in that can read .las files:
Dotspatial.Plugins.LiDAR
If you are asking how to write a C# replacement for the Past-Track program that connects directly to the USB however, I don't know exactly.
DotSpatial has a positioning library that is DotSpatial.Positioning that was originally ported from http://geoframework.codeplex.com/. It is possible that this utility will have the capability to connect to your device, but I think it would probably only support a limited subset of GPS devices, and I never used it myself at all.
Hopefully that information is a little helpful though and will point you in the right direction.
Edit:
I have downloaded the Past-Track 10 software that is designed to retrieve data from the unit. This in turn installed Antaris4 and u-blox5 USB drivers. I think this is half of what you will need to write a C# app that can talk to your GPS and do things in code. You can find the drivers on the web. I think I found it here:
http://www.driverguide.com/driver/detail.php?driverid=1869444
But make sure you find a version of the driver that matches your PC configuration (32/64 and correct operating system). Incidentally, that will probably mean you will need to make x86 and x64 builds for your C# app.
The next step is to find some documentation for it and then attempt to use the drivers from C#. So far I haven't found a good document showing how to work with the drivers, but I'm sure it exits. I will update with a link when I find it.
I have searched how to use SILVERLIGHT to record video for days but got no luck.
Most articles related to SL only talk about how to record audio or snap a picture rather than recording a video file and save it somewhere.
And I found there is no resources about it on Internet(I am surprised!!!)!
So could you provide me an example code with proper explanation?
I am waiting for it.
PS: I do not want to use Flesh as none iPhone nor iPAD supports it.
Thanks
Fortunately, Mike Taulty's source code can easily be updated to work with Silverlight 5. You can download the fixed source code and try it out (Disclaimer: all code courtesy to Mike Taulty, I merely fixed SL5 compatability and ran a cleanup). Use your favorite diff tool to see the changes I made.
I have tested it, and it generates video files that can be viewed in VLC media player (after selecting build index to fix the corrupted index). As the file format is not 100% correct, the files can not be opened in Windows Media Player etc... but I'm sure that can be fixed.
You should, however, be aware of the fact that Silverlight is not supported on iPhone, iPad, Android, and Windows Phone (Windows Phone apps are made on a special version of Silverlight, but can not run Silverlight applications in the browser).
Unfortunately, after undergoing hundreds of hours researching on the possible solution, I finally found the answer in a book called: Pro Silverlight 4 in C# (Matthew MacDonale, APress).
According what is said on the page 436, although you can do it with Silverlight 4 (you have to write your own file header helper, store the row data as byte arrays and later on you have to convert them into a raw video data and what is worse is the audio and video are separated.), it is just not practical and worthy to do it. Because it requires reams of complex, handwritten code to convert it, and the conversion process is computationally expensive, which makes it extremely difficult to do in real time.
So I guess this would be the conclusion of my question. Now what seems still make sense for me is to find out why Microsoft doesn't support it and what is the new technology which is going to be used/ has been used to replace the SL.
Is it HTML5? But as far as I know, there is only a video tag in HTML which can only be used as a video player, but no tag to support to get the access of a web camera and save the captured video+audio at the same time as one file onto somewhere which could be a local hard drive or a network storage.
I hope all dear you could come up with some thoughtful advice.
I am going to leave this question un-answered for a few days to see whether there could be someone who can come up with some fantastic solution.
Thanks again.
I am going to migrating a system to Windows Azure. And it will used UTC time for all existing function. Is there any way to set the time zone globally? Or I need to change all the code which display the time? My application will mainly serve in a specified timezone.
I have try apply the culture and uiculture on web.config. And it does not work.
Thanks.
As per the Windows Azure Team Blog - all the timing calculations/display etc have been moved to UTC.. https://azure.microsoft.com/en-us/blog/moving-to-coordinated-universal-time-utc/
I feel you would need to change the code which display the time as well which saves the time as well..
I have a website that displays the current date using the code Datetime.Now. From what I understand, Datetime.Now is supposed to display the current time as it would appear in the viewer's current locale.
At the moment, when I test on localhost, the website is correctly determining my location (en-nz) and displaying the right date. However, when I run the site live, I'm getting a different date all together.
So how does a system determine a viewer's locale and why is there a difference between how my site is displaying Datetime.Now locally and live?
DateTime.Now has the time of the server, but not the time of the client. If you want to detect the time of the client you need to use Javascript, either by detecting the time with it or calculating it using the time zones.
In your localhost works fine, since the server and the client are in the same PC/Time Zone
Hope it helps!
No, DateTime.Now will retrieve the current time in the local time zone of the machine it's running on. In other words, the web server in your case, assuming you're writing a web app (you haven't made it clear).
If you want to display it in the local time zone of a browser, you may well be best to send down DateTime.UtcNow and write some JavaScript to convert that to the local time... or just let JavaScript work out the current time on the user's system.
As far as I know, there's no way of getting the time zone from JavaScript accurately. You can get the current offset from UTC, but that's not the same as the time zone itself. (Offsets change due to things like DST; knowing the current offset doesn't tell you when DST will kick in.)
Maybe machines have different time settings? If development and live servers are in different locations, that's quite possible. As other answers say, DateTime.Now gets server time, not client time.