Sunday, June 23, 2019

Navigation system for Blind using Passive RFID

It is always troublesome to find our way in a big shopping center. This applies to Visual Handicapped as well as sighted. Currently, the best way is to use beacons system to provide navigation and information around the beacon.

To maintain the beacon system is not that cheap. Beacons are life beacons that needs power source. In a big building, the number of beacons used is staggering. There are ways and means of using other technologies to provide navigational needs for the Visual Handicapped. Below is one which I think is viable.

RFID has been in the market for decades already. Passive RFID is just a piece of paper attached with a tiny chip and an antenna. It is very cheap and can be bough in bulk. Each RFID is unique. Therefore, if you are near enough with a reader, you could know which RFID is near you.

Firstly, you need to lay breadcrumb (RFID) trails on every path in the building. A mapping of each RFID and nearby POI (point of interest) is necessary for navigation. The breadcrumbs should be spaced at a fixed distance apart. Ideally, at every junction, a breadcrumb should be right in the center of it.

User using RFID reader could then able to read the breadcrumbs as he/she walks along the path. By limiting the range to just able to read at least 2 breadcrumbs, The system will be able to know which direction the user is moving since the last one will drop off and new ones will appear. With the mapping, you can then tell the direction of movement.

At junctions, user should be informed that there are branches and alert user on the possible direction and POI. User can then make a decision to move to the specific direction.

The app can be in a form of a map of the building with blinking dots to show current user position and with voice assistance for Visual Handicapped to use. It will have a list of POI to assist users. It will be good to have a search function that finds the nearest point matching the search string like "exit". A highlighted path to the search string, like map navigation, will be helpful.

Since passive RFID is cheap and need no power, it is just a install and forget type. Any missing RFID can be replaced with the same ID. It is, therefore, simple and cheap to maintain such a system.

Now the expensive part is the RFID reader. It needs to be Wi-Fi enabled so that it can be integrated with hand phone app. The app has to be custom designed to use it as navigation system. All these costs eats into user's budget. However, it reduces the cost of building owners so that they will be more willing to invest in the infrastructure. With many building owners willing to install the system, the cost of the application can then be reduced thus lessens the financial burden of users.

Since this navigation can be used for sighted, it becomes universal navigational system thus further reduces the costs. It is a win-win situation.

This system need not to be indoors only. Outdoor place like parks can install such system using weather proof containers for the RFID. It can even be used for temporary venues like a carnival. The uses are multiple.





GSX Questions

It was something that was started quite sometime ago but wasn't made compulsory. Questions are a set of data that was posted as questions and user is supposed to answer it accordingly. Its as simple as that.

However, the Questions are nested questions and no fixed pattern. Previously, a pointer is used if there are nested questions. It could not work that well. Recently GSX changed the data format to JSON and the Questions were set in nested JSON format. This makes it much easier to follow as we just need to traverse the nesting structure typical of JSON.

Fortunately, Questions uses fixed format in the form of Questions and Answers. The nesting is always at the Answers array or as a array in the Questions level.

This blog talks about how to traverse through the list and nested questions using FileMaker. As it is, GSX returns a JSON. Since FileMaker has JSON functions that can read nodes from JSON stored in fields or variables and the format (path) of reading the nodes is like "XX.YY.ZZ". If it is an array, just add the array number after the node name like "XX[0]".

The method of traversing the nodes is simple. The path is stored in a variable.  We start off with $trees="questionDetails[0].trees[0].questions[0].answers[0]". Using JSONListKeys($json;$trees) we can get a list of keys. If there is no answers, we remove the last node and add 1 to the previous level array then repeats to find the answer keys.

Upon finding the answer, we post the question and gets an answer from user. Depends on answer type, user have to respond accordingly. Once finished answering then we look for nested questions in the answer. If there are nested questions, we add one new level after answers and go to the first question in the nested questions.

In the nesting, if there are more items in the array, we go into the next item in the array and look for questions or answers. If there is no more or no questions/answers. we back up one level and see if there are more items in that level.

In this way, we could go into the nesting systematically and back up to the higher level if there are no more array item.

GSX requires you provide the question ID when you answers. So you must create an answer JSON that corresponds to the Questions. Every time you add a question/answer level you need to add the array first so that when you answer, you can write the answers using the same $trees array.

I won't be diving into showing examples of traversing. Do figure out how to do it yourself.




Thursday, June 20, 2019

Communicating with Apple Web Services (GSX) via Filemaker 2

My previous blog on the same subject is 3 years ago. Since then Apple has changed from using XML to JSON as a means of transferring data. Therefore there is a need to show how to do it with JSON.

JSON (Javascript Object Notion) by its name, is a Javascript feature but it has extended its use to many other applications. It is a format of storing data just like XML except it is more human readable when you format it nicely.

Fortunately, FileMaker has caught up with the latest trend by including a few JSON related functions. It is not that easy to use those functions to compose JSON but it is very much easy to get data from JSON.

To create simple JSON you just need to use $example =JSONSetElement("";"elementkey";"elementvalue";1) and it will create a nice JSON '{"elementkey":"elementvalue"}'. However, if you want to insert nested JSON then it is a bit tedious.

For example, you want to create a key that contains an array with one key and  value. First you must create the key and value as a JSON like last paragraph. Then you have to create an array to contain that JSON like $array= JSONSetElement("[]";0;$example;3).

Finally you then create the root element like $root=JSONSetElement("";"root";$array;4). You have created a JSON '{"root":[{"elementkey":"elementvalue"}]}'. This format is generally used by Apple in GSX in both request and response.

If it is a simple JSON that need to store a small set of data with fixed keys, it is better to create the JSON with unique values for each element that needs to be changed like "~!1", "~!2" etc. After that use substitute function to replace the "~!x" sequence. Two lines instead of 3. In actual fact, one line encompassing both action can be done by just using the JSON as source of substitute directly. In this way you could reuse the same code repeatedly or even store it as custom function.

The parameters used in JSONSetElement can be found at. JSONSetElement.

Getting values from "elementkey" in the above JSON is easy. $value=JSONGetElement($root;"root[0].elementkey")

If you looking at this blog first then I suggest you go to the previous blog on the same subject first to get an understanding.


Saturday, June 15, 2019

Exercising by Heart Beat

Normally one would want to exercise with some repeatable routine. Some go for fixed time. Others go for distance. More health conscious people will want to stick to an exercise/training routine depends on the type of exercise done.

I usually go for speed based exercise as I do walking and cycling. Recently, I am obsessed with heart beat based exercise. It is not scientifically proven but based on the ample talks about lowering heart beat, a controlled heart beat during exercise moves one towards lowering it. It will be good for controlling hyper tension, high blood pressure.

Before launching on the methods used to keep heart beat within a range during exercise, it will be good to about the basis of heart beat measure. According to scientific figures, the maximum heart beat a human can have is 220 beats per minute (BPM). Individual person's maximum heart beat is 220 - number of years of your age. People who exercise constantly will have their maximum heart beat considerably higher than normal people's heart beat.

Minimum heart beat depends on individual. Some athletes have resting heart beat around 40 BPM. Most people's heart beat is between 60 - 100 BPM. Children aged 6 -15 is around 70 - 100 BPM.

My range of heart beat I want to control while walking is 99 - 108. It is at the lower end of medium exercise range. The reason is to avoid excessive sweating. It is not easy to control the heart beat at this range as any lower than 98 BPM means I am out of medium exercise range. This is especially true if I don't do warm up before walking. It tends to fluctuate very much till the body is warm up.

Monitoring heart beat while cycling is a bit dangerous. However, all vehicle drivers including motor-cyclist have to keep monitoring their speed while driving. Their speed is very much higher. Just ensure that the coast is clear before you take a peek at the heart beat monitor. I only do it while cycling on long stretch of PCN or cycling path.

Depending on the type of cycling done, the heart beat range can be different. Usually, if I want to go for speed, I abandoned heart beat monitoring. Just go fast till your limit. On the other hand, for standard exercising, I go for 155 plus minus 10. It is at a comfortable heart rate without stress. Coincidentally, 155 is my maximum heart beat (theoretically).  Individuals must try and error to find a comfortable cycling speed for themselves.

At 155 BPM the speed of travel is basically below the 25 KPH limit of PCN. It is therefore safe and within the regulation.

GARMIN Connect has a stress measurement statistic page. It is to show how often you get stressed. My stress region is generally non existing except at the beginning  and end of exercise. It could be a result of my method used but there is no proof and I don't bother to prove it.

Below is a typical walking speed and heart beat chart.






Friday, May 24, 2019

Windows 10 grinds to a halt

First it was an extra application called Chromium get installed. Unable to install thus use IObit uninstaller to remove the program.

After that the computer suddenly goes unresponsive. It takes over a minute to respond to clicks.  Task manager indicated that CPU usage is low and Disk activity is low. It just puzzles me.

Nothing I do could solve the problem. Manage to get Win 10 to boot to safe mode by forcing it to close then start again 3 times.

Even at safe mode, it also responses not that well. On searching from internet, it was suggested to check page faults. Starts Performance Monitor and adds page fault. The percentage is 100. Netizens suggest using Sysinternals, Process Explorer. Downloaded it and run. There is an item that has more than one million page fault. It is Mcafee.

Uninstalled it and the system works as normal. One problem still persists. Windows Defender antivirus shows that "the virus protection is managed by other manager". No facility to set it back. Well, that is not part of this issue.



Tuesday, April 30, 2019

Profiling Tan Kin Lian

A person is gauged by his/her acts and speech. There seems to be quite a lot of news from Tan Kin Lian. The following is extracted from internet. I don't draw conclusion. It is up to you.

He portrayed NUS voyeur Nicholas Lim and mother as victims of the case just because the actual victim post his picture and name on Instagram.  The voyeuristic act is ignored. A "controversial statement" according to Tan Kin Lian himself.

"Paying Johor 15 million a year saves 15 million on defense". He thinks Singapore is going to make war with Malaysia for water. Also the idea of "paying Johor 15 million" is giving Malaysia what they wanted. There is no other way?

He said he will stand for election of enough like minded people come forward to support him. "I will change my mind if I do not see enough of them coming forward". He expects to be ushered into parliament? First he ask for 300 likes on FaceBook then he ask for 1000 after it is achieved.

He posted "Changi Airport custom officer - Are you Mr Tan? Any Tongkat Ali to declare? A traitor tipped him off". After that he claimed he was joking on Twitter. In his earlier post he described how to make Tongkat Ali tea.

He cancelled Grab booking 3 times in a row. Maybe he don't know how Grab works.

He ran in the 2011 Presidential election and forfeited $48,000 because he cannot get enough votes.

 He said on Facebook "I boarded SMRT 857 and found that I was in Mumbai." A statement unbecoming of a presidential candidate. He apologized and deleted the post.

According to some his departure from insurance cooperative is not entirely voluntary.

Some accused him of being a detractor of the presidential election. He instead accused Tan Jee Say of being "the last candidate" thus should consider withdrawal. It is noted that he only got 4.9% vote whereas Tan Jee Say has 25%.

http://tankinlian.blogspot.com/2011/07/sia-website.html is yet another blog of his showing how much he knows about internet of things.

He posted his personal data online and dares people to hack his SingPass. Well, his SingPass got locked out within hours.

The above are just gathered from internet. There is no checks on whether those are false news. At least I don't see any report that they are false news.




Friday, April 26, 2019

NUS Peeping Tom Case

In olden days when internet was not that popular. Any such offence simply gets unnoticed even if the accused gets persecuted. The victim does not have any further say as to whether the punishment is just.

With the IoT, at least the victim can voice out the feeling of injustice. Although the victim's post on social media could be viewed as 'doxxing', it is still a victim's voice. Where else could the victim voice out the frustration.

Netizens have various views and comments even politicians chipped in. The following are comments on some of it.

1. The police. The police have decided not to prosecute the accused based on their reasoning that the offender is just a first offender with no traits of such offensive behavior. They therefore give the accused a 12 month conditional warning. If they prosecute the offender then there will be a permanent record which will ruing a person's life even before he get started in life.

2. NUS. NUS is like any educational institution, which is supposed to uphold individual's privacy and integrity. The initial punishment is suspense from a semester, banned from entering campus residence and write a letter of apology to victim.  I am not here to judge the punishment but it does looks like a slap on the hand. Of course I can't say how much punishment is enough but it is not even near the police's punishment level. There are already 20 NUS previous cases in last 3 years and there is no review on how to stop it. They finally apologize and get to hold a review on this.

3. The accused. Beside being given punishment by Police, NUS, Great Eastern, he only express "no excuse" in a ST interview. No public apology was given  as far as I can see.

4. The victim. As said before, her post could be viewed as 'doxxing'. There are better ways to express frustration than to identify the person with pictures in social media.

5. 'Trial by social media'. Those against voicing out saying it is TBSM. However, if this wasn't brought up, nobody knows about it and the vicious cycle continues unabated and unknown. At least now we know that Police have their reason and NUS no longer wants to keep it quiet.

6. Great Eastern. As a company, it cannot be seen to be doing nothing. Firing the accused is the only way out.

7. Agrarian. The company cuts ties with NUS on condition that NUS expel the accused. I don't think this is the right way. It becomes issuing a threat to NUS. Others simply says that the company join in to the media rush to be heard and seen, a typical business tactic.

8. A blogger seems to be biased against the victim in her lengthy blog on the issue. She question about the rights of the accused future. One other post that talks about the blog question how she feels if she or her family member is the victim.

9. Tan Kin Lian is giving support to the accused. He portrayed them as victims. If he is referring to 'doxxing' then it may be true. It depends on who is viewing the incident at what instance? I will be grossly unjust if the focus is only on the consequence of the victim's action than the voyeur's action. It reminds me of the "Singapore Kindness movement" which sides with the perpetrator rather than the wronged.

9. Right to be forgotten. Singapore has this Personal Data Protection Act in place. This should give the accused back his life.