Google Sheets/Microsoft Excel - google-sheets

Is there a live function that updates with time? For example, could you have a real-world time clock in as a function in sheets/excel that operates at a clock?

Related

does rosbag play guarantee data during its playback?

I am currently working on developing ROS nodes. One node is for parsing raw lidar data which is gained from .bag file and publish to a topic, and the other node subscribes the parsed data from the first node and publish a bunch of the parsed point cloud data by gathering for a specific time duration.
However, the point cloud data seems not to be published to nodes with its correct amount of data.
When I play the .bag file with 0.1 rate, the point cloud data seems not to have much loss data, but when it plays with its normal speed, then it much data gets lost.
For example,
rosbag play data.bag
: (result) point cloud # 60000~80000
(normal speed)
rosbag play data.bag --rate=0.1
: (result) point cloud # 1000~1100
(10times slower speed)
according to the result above, when the data is played with the normal speed it loses almost 50% of its data.
Do you have any idea to get the full data with its normal play speed?

Live Travel Time Between Locations in Google Spreadsheets

I want to calculated Travel Time between two locations based on start time based on current weather/traffic conditions in my google spreadsheet. The format is something like this:
Start Location End Location Start Time Estimated Travel Time
i am using Mapquest Api
=importXML("http://mapquestapi.com/directions/v1/route?key=APIKEY&outFormat=xml&from=" & A2 & "&to=" & B2,"//response/route/formattedTime")
but it is giving me an incorrect travel time and that travel time isn't live (based on my start time). Is there another way to achieve this?
Edit:
Distance Matrix API is something that I have come across, but don't know how to integrate in Google Spreadsheet. Is there a way I can use it there via Google Scripts?
Can you post an example with the locations that is not producing the expected travel time?
There are two types of time returned by the directions request: time and realTime. Time is purely mathematical given the distance, speed limit, and some penalties for maneuvers. The realTime is the time with traffic where available.

What is the time resolution for the callback on YouTube HTML5 API?

We have built an application using the old YouTube flash API which polls the player for it's current time using: player.getCurrentTime(). We currently poll the player at 40ms intervals in order to update screen components at 25 fps. This API isn't supported on iOS so we tested the HTML5 API. It seems that we can not poll the player as frequently as 40ms using the HTML5 API. It appears to max out at about 100ms polling intervals forcing our screen updates to be very jerky. Is this a known limitation of the HTML5 API or is there a way to poll the player at finer intervals?
What function are you using for your polling? If you're using setInterval or setTimeout, you could see if you get less jerky performance with requestAnimationFrame.
Regardless, though, it may not matter; the iframe API (which is the only one that offers HTML5 playback) doesn't have that granular of access to the player's current time. In fact, the player inside the iframe only does a postMessage to update the time accessible via getCurrentTime about 5-6 times a second, so polling any more frequently than that is just wasting CPU cycles. (I'm not sure why they do it this way, as HTML5 video by default updates its current time about 50 times a second).

How do I prevent fast forward time cheat in a game without an Internet connection?

I'm developing a mini game that has an Energy System. The maximum energy a player can have at one time is 5. Whenever you execute an action, 1 energy gets deducted. The energy will be replenished by 1 after every 10 minutes.
I can see the easiest way out of this is by querying an external server which will return me a proper time. The problem is that this game is designed for offline play, and it's not meant to query a server every time I launch.
I'm not sure how to go about from here. How should I prevent a fast forward time cheat so that players will not get energy easily?

Is it possible to make an HTML5 Trip Meter that tracks distance traveled?

I'm trying to develop a webapp that users can run on their mobile phone to track the distance they've traveled. Think of it as something like RunKeeper, but in webapp form.
The following article describes an easy way to create a Trip Meter with HTML5 and and the Geolocation API.
http://www.html5rocks.com/en/tutorials/geolocation/trip_meter/
However, this just seems to calculate the distance between point A and point B. I suppose I could use something like JavaScript's setTimeout to track the distance traveled every 5 seconds, then calculate the total at the end. However, when the webapp is running in the background (or the phone is locked), this JS won't be executed. Is there any sort of solution to this problem?
You don't need to use setTimeout, the watchPosition will fire the callback function every time the location is updated. However, you are correct that the JavaScript will only run when the web app is not in the background and the phone is not locked. You may be able to write an HTML5 app then convert it to native with something like PhoneGap.

Resources