Incident Light Meter possible for Blackstone? - Touch HD General

Hi since the Blackstone has a light sensor, just wondering if it is possible to use it for film to control aperture and color temp such as the Minolta Light Meter?
http://www.comparestoreprices.co.uk/camera-accessories/minolta-lightmeter-flashmeter-vi.asp
i know it might now work the same way but i think i could work.
I'm using PCINE and PCAM and they are brilliant but would love to have something like this rather than shelling 2000 grand on a light meter.

i'm guessing no?

Can't remember where I saw it but pretty sure you can atleast get the HD to give you a readout in lux or lumens. Could have been an additional program.
But I'd recomend the Flashmeter IV or V can usually get it for a half decent price on ebay - sometimes cheaper to get it from abroad. . .

rather than lux values, would there be one to give out aperture values like most incident light meters?

Luxmeter for HTC
Take a look at pocket-kai's Luxmeter for Touch HD (http://www.pocketkai.net/asp/en/details.aspx?488). Works on my Touch HD.

thanks so much vargamic, however, do would you know if one would exist to tell aperture readings?

If you can get it to read lux value then you can convert it to EV steps and work from there. There's a program here http://www.intl-lighttech.com/library/calculators/evluxconvert that works on PC, shouldnt be that difficult converting it over - I think - or more longwinded use the following formula in a scientific calculator app (copied from a forum at Convert-Me.com)
The definition of EV=0 is an exposure of 1 second at f/1 using ISO 100 film, or any equivalent thereof (2 seconds f/1.4, 4 seconds f/2.0 etc)
The technical definition of Ev is 2Ev = LS/C.
Where:
• Ev = the exposure value
• L = field luminance
• C = Exposure Constant - If you use candelas/ft2, it is 1.3. If you are using LUX (candelas/m2), it is 12.5.
• S = film speed following the ISO standard
Now, as far as where I think you're trying to go with this... Consider that 2ev = A2/T
where:
• A = the f-stop number of the aperture
• T = shutter time in seconds
Combining these two; EV = log2(A2/T) = log2(LS/C) - This is perhaps the most vital formula there is for understandiing the basics of the mathematics behind photography. (From poster called Knight)

Related

Windows Mobile RGB565 format problem

Hello there, to all developers.
I have this very weird problem for which i couldn't find any answer.It goes like this:
I'm developing a graphical app for pocket pc devices using DirectDraw Api with vs8(.net 2005) and windows mobile 6 SDK. Since i don't have double buffer native support, i simply use 2 LPDIRECTDRAWSURFACE objects, one as a primebuffer and one as a backbuffer.
As a test, i fill the backbuffer surface with a color and display it.This works fine.
Then i create a compatible bitmap using CreateDIBSection and read the color bytes from (void**)lpByte i receive into a new bitmap and blit it to the background. Basically i am copying the background and then bliting it back.
The problem: i get wrong data. When I initially fill the background, i use a WORD value (since color is displayed using RGB16 16 bits format) for example 65 535 which means 16 bits with value 1 each. So i get a white background.So far, so good.
When i read the values from that lpByte pointer of type LPBYTE, i get bytes with values of 255 and 127 which means every second byte looses it's most important bit, so when i create the WORD value by reading every 2 bytes, i get a value of 32 767 so, when i display the bitmap, i get a yellowish color.
It actually gets worse if i do this with textures.

[APP] Co-Ordinates Application - Final [updated now for droid too]

Hi All Site Engineers out there,
I had searched for ages to find an app for windows mobile devices that quite simply calculated either new grid co-ordinates from a know point given its bearing and distance or to calculate a bearing and distance given two known points.
I had written a program for a personal computer using (BASIC) but why carry a phone and a computer with you on a building site!
I couldnt find one that was simple, meaning less mistakes when "in the field", so Gino wrote me one. Feel free to download, use and change. Many thanks to GinoAMalone for this simple app, so please donate to either him or XDA of course
The app has a simple home screen giving you 3 choices:
1. New Co-ords Calculator
2. Distance & Bearing Calulator
3. Pythag Calculator
The app is tested on Touch Cruise 6.0 & 6.1, Prophet 6.1. & Blackstone 6.1 & 6.5, Touch Pro & HD2.
Other devices not tested so please give feed back & Screen shots to come.
UPDATE: December 2010: This App has now been written for Android also, please head over to this for info and give thanks to Captainkrtek & Scary Alien
How's this...
Here's a first pass at the app. This sounded like an interesting challenge and something to get me started learning more of WinMo programming. This is my second or third app for .Net. This is written in C# and should only need CF .Net 2.0.
I still need to clean up some rough edges. Right now it doesn't do anything about formatting the output how you requested and most input errors will cause it to crash.
I'm not sure if it's using the same distance algorithms you used. I got my code from http://www.movable-type.co.uk/scripts/latlong.html and http://bryan.reynoldslive.com/post/...2c-Cardinal-Direction2c-Distance2c-and-C.aspx. The algorithm I used is called the spherical law of cosines on the first link.
But, let me know if it looks like the sort of thing you need. I'll PM you with my email address.
Thanks,
Gino A...
Update [20 mins later]: I had a boneheaded mistake in the CAB. Fixed now.
GinoAMelone said:
Here's a first pass at the app. This sounded like an interesting challenge and something to get me started learning more of WinMo programming. This is my second or third app for .Net. This is written in C# and should only need CF .Net 2.0.
I still need to clean up some rough edges. Right now it doesn't do anything about formatting the output how you requested and most input errors will cause it to crash.
I'm not sure if it's using the same distance algorithms you used. I got my code from http://www.movable-type.co.uk/scripts/latlong.html and http://bryan.reynoldslive.com/post/...2c-Cardinal-Direction2c-Distance2c-and-C.aspx. The algorithm I used is called the spherical law of cosines on the first link.
But, let me know if it looks like the sort of thing you need. I'll PM you with my email address.
Thanks,
Gino A...
Update [20 mins later]: I had a boneheaded mistake in the CAB. Fixed now.
Click to expand...
Click to collapse
Hey Gino,
THanks for the app. have given it a test and come up with error on coords and vector parts:
"latitude value cannot be greater than 90"
ALso suggestion, can you also have metres and millimetres as units too? sounds daft maybe, but if working out bearings and new co-ords for setting out a building units would be in metres or mm. This woud prob explain the latitude error.
Also when im inputting in the bearing how should it be inputted? like this: 95'32'25' ?? or have you done in decimal.
Ok, after thought. I know the reason why the latitude error occurs, its beacuse the co-ords input is in degrees, minutes, seconds. I would need an option for co-ords based in meters for example, easting=500.735 northing=345.321 This is important when calculating results for buildings setting out. Can you please put an option in for this, or even purely base the program in metres/mm rather then degress. Obviously the bearing would still need to be in degree, minutes & seconds.
Thanks Gino, the app looks great and im sure with minor tweaks you will have it running in no time!
What about a simple GPS related program which allows you to put in waypoints? It'll give you the distance, heading, etc.. Most of them you can also do offsets of X distance and Y heading, etc..
They do not imply having or using the GPS. Generally you turn the GPS on if needed, but you could use the coordinate related stuff without it.
khaytsus said:
What about a simple GPS related program which allows you to put in waypoints? It'll give you the distance, heading, etc.. Most of them you can also do offsets of X distance and Y heading, etc..
They do not imply having or using the GPS. Generally you turn the GPS on if needed, but you could use the coordinate related stuff without it.
Click to expand...
Click to collapse
Khaytsus thanks for your thoughts. I dont think the GPS is the way to go with this. Yes it would calculate distance and bearing, but i need to input grid line references (co-ords) like 500 metres east, 200 metres north. the calculations in my basic code are based on a 2d grid line system. the app would not need to to use gps. Sometimes when working out co-ors or bearing and distance for setting out a building, the distance from 2 given points could be 100 metres but anything as little as 3 metres. GPS may not provide 1mm accuracy.
If my code was used in the app, it would work, i know it does as i have used it many times before. dont think about curvature of the earth or lon & lat think more grid lines like a flat map. see next post for example.
BASIC - code
Ok my BASIC code below, also attached is a simple (apols) jpeg of what the app should be doing. You will see a red house situated in a grid line system, with its grid co-ords above the relevant point. Hope this is of some help to Gino and anyone else
Code:
To Calc New Co-ords
10 print "New Co-ords"
20 input "Easting=",A, "Northing=",B
22 input "Bearing=",C, "Distance=",D
30 F=sinC*D+A
40 G=cosC*D+B
50 set F4
60 print "Easting 1=";F; "Northing 1=";G
65 goto 22
70 End
To Calc Distance & Bearing
10 print "Bearing & Distance"
20 input "E0=",P,"N0=",Q
30 input "E1=",A,"N1=",B
40 C=A-P
50 V=ABS(C)
60 D=B-Q
70 W=ABS(D)
80 if C=0 then 210
90 if D=0 then 260
100 if C>0 then 160
110 if D>0 then 140
120 E=(ATN(V/W))+180
130 goto 300
140 E=(ATN(W/V))+270
150 goto 300
160 if D>0 then 190
170 E=(ATN(W/V))+90
180 goto 300
190 E=ATN(V/W)
200 goto 300
210 ifD>0 then 240
220 E=180
230 goto 300
240 E=0
250 goto 300
260 ifC>0 then 290
270 E=270
280 goto 300
290 E=90
300 H=(C~2+D~2)~0.5
310 print "Bearing=";DMS$(E)
320 print "Distance=" H
330 End
please note symbol "~" means to the power of (could not find the proper symbol on my keyboard)
also DMS$ = degrees minutes seconds (the new bearing should be displayed in this format, not in decimal)
ATN = (shift tan on sci calculator)
ABS = (shirt LOG on sci calculator)
Pythag Calculation
10 print"Pythag"
20 input "side A=",A,"side B= ",B
30 C=(A~2+B~2)~0.5
40 print "Hyp= ";C
50 goto 10
60 end
timmymarsh said:
Khaytsus thanks for your thoughts. I dont think the GPS is the way to go with this. Yes it would calculate distance and bearing, but i need to input grid line references (co-ords) like 500 metres east, 200 metres north. the calculations in my basic code are based on a 2d grid line system. the app would not need to to use gps. Sometimes when working out co-ors or bearing and distance for setting out a building, the distance from 2 given points could be 100 metres but anything as little as 3 metres. GPS may not provide 1mm accuracy.
If my code was used in the app, it would work, i know it does as i have used it many times before. dont think about curvature of the earth or lon & lat think more grid lines like a flat map. see next post for example.
Click to expand...
Click to collapse
Aha, okay. I was thinking larger scale, less precision, etc. I have to 'deal' with northings and eastings every time I look up benchmark documentation and I always have to figure out how to convert it.. Grid, datum, etc..
Hi Guys,
Any updates? Please dont think im impatient, im certainly not, just willing to help in anyway i can
Regards.
timmymarsh said:
Hi Guys,
Any updates? Please dont think im impatient, im certainly not, just willing to help in anyway i can
Regards.
Click to expand...
Click to collapse
I didn't get as much time last weekend to make progress as I hoped. I did do some cleanup of the UI and add several more units. I believe there are no more circumstances where poorly formatted input causes crashes. I also eliminated the "calculate" button and have it calculate whenever enough info is available. The biggest motivator for this was so the UI works fine with a SIP open.
I still need to look at formatting the output and spend some time with your algorithm.
Thanks for the challenge. this is working as an excellent vehicle for me to learn about .Net CF programming.
try G7toCE
http://www.gpsinformation.org/ronh/
this javascript page will run offline in PIE
http://williams.best.vwh.net/gccalc.htm
GinoAMelone said:
I didn't get as much time last weekend to make progress as I hoped. I did do some cleanup of the UI and add several more units. I believe there are no more circumstances where poorly formatted input causes crashes. I also eliminated the "calculate" button and have it calculate whenever enough info is available. The biggest motivator for this was so the UI works fine with a SIP open.
I still need to look at formatting the output and spend some time with your algorithm.
Thanks for the challenge. this is working as an excellent vehicle for me to learn about .Net CF programming.
Click to expand...
Click to collapse
Gino,
Thanks for the heads up, the app is comin on great. Did you understand my rarther poor explanation of what i meant about inputting the grid line co-ords and did my crude diagram help? I am very thankful and glad i am able to help stimulate you grey cells Get back if i can be of any help please.
Hi All,
Does anyone else want to have a go at this, seems to have fallen by the wayside
As stated in the first post, i will help in any way i can, test and donate of course!
Good luck!
Take a look at this try.
GinoAMelone said:
Take a look at this try.
Click to expand...
Click to collapse
Gino,
Well done my friend, i think you have cracked it. I will test it for accuracy when at work monday with results i know are correct (simple tests like 500.000E & 200.00 N with bearing 90 and distance of 100) work fine.
I see the bearing is entered in decimal, which is not a problem, but it is favourable to enter it in DMS (saves having to calculate this before hand) for example 45o30'00'' (which is 45.500 in decimal)
Really brilliant and im very pleased, let me know if the DMS thing is possible? Cheers Gino.
The labeling of the bearing fields isn't entirely clear. But, it's looking for Degrees, Minutes and Seconds.
I'm pretty sure I'm doing the DMS conversion correctly, but don't trust it till you've tested it. Let me know if it's right.
Thanks.
Gino,
Many thanks my friend, the app with the bearings works very well (dms works). One final thing, could you set the eastings and northings to be rounded up to 3 decimal places for example 500.216 and not 500.21578767.
That would make the app perfect
Well done, you know there is market for this app if you are interested?
I rounded all outputs to three digits.
I've also put a BSD license on this. So, you're free to share it with others if you want. Also, they'd be free to make changes.
If anyone wants to tip me for it, I won't object.
I can't figure out how to do the cute little PayPal button in an XDA post. https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3275014
Congrats to a sucessful app Gino, get that button working and i will happily donate!! I will have a look and see if i can get it working for you!
I too am a site engineer and produced an excel spreadsheet to calculate bearing and distance about 10 years ago. I have just tested and it works on the touch pro so I have attached it here in case it is of use to you.
dougalls said:
I too am a site engineer and produced an excel spreadsheet to calculate bearing and distance about 10 years ago. I have just tested and it works on the touch pro so I have attached it here in case it is of use to you.
Click to expand...
Click to collapse
Kool, nice one Dougalls!! the more the merrier!! Have you tested Gino's app? I did some brief testing and it appeared to give accurate results, but test it and let me know on here please!

[REF] *Leo camera Hints & Tips*. Updated 19th December.

I started this hints and tips thread for the HD2 (LEO) as i like most others wasn't to happy with the default camera app that the HD2(LEO) had to offer, to be honest the camera quality was lacking in most areas. The purpose of this thread is to collate all tips and have them available within the first few posts as opposed to having to search for tips among the many pages and threads. Please submit additional tips and hints you have and I will update the first few posts.
you will need a registry editor to do most of these tweaks and their may also be .cabs attached to the bottom of the corresponding post to save the effort need when editing the registry. u can use apps like resco, memmaid, sktool to edit the registry or an app of ur liking
for best possible picture from the HD2(LEO) - you may want to use these setting, use with all mods i post here and you will be very happy with the outcome and possibly feel overwhelmed by the quality of your HD2(LEO) cameras like most ive share these with
WB - either auto or indoor light dependent on ambient light
iso auto - if in a very bright sunny outdoor type weather set this to 100 for best result
5M resolution
wide-screen OFF
touch focus OFF
super fine quality
contrast +4
saturation +3
sharpness +4
metering mode average
1). extrasuperfine quality
Go to HKLM\software\htc\camera\image\jpegquaity\superfine and replace the 5Msize value with 746028 (default value = 643628)
or install the extrasuperfine.cab or install BsB Tweaks 1.5
before and after photos
http://forum.xda-developers.com/showpost.php?p=5157324&postcount=107
http://forum.xda-developers.com/showpost.php?p=5135805&postcount=55
http://forum.xda-developers.com/showpost.php?p=5135911&postcount=56
http://forum.xda-developers.com/showpost.php?p=5130666&postcount=3
2). unlock additional video modes
Go to [HKLM\Software\HTC\Camera\P2 and replace the EncodeFormat value with 2147483647
or install the additionalvideomodes.cab
this will unlock all modes/resolutions listed below
H263(3gp)
CIF 352x288 \ M 176x144
mpeg4
L 320x240 \ CIF 352x288 \ VGA 640x480
3gpp2
S 128x96 \ M 176x144 \ L 320x240 \ CIF 352x288 \ VGA 640x480
motion jpeg
S 128x96 \ M 176x144 \ L 320x240 \ CIF 352x288 \ VGA 640x480
H264
L 320x240 \ CIF 352x288
3). enable .BMP mode in camera
Go to [HKLM\Software\HTC\Camera\P1 and replace the EncodeFormat value with 3
(not quiet working cant get it to stick auto goes back to jpeg in camera app, im hoping people can help me out alittle with this one)
4). improve camera recording quality of mpeg4-vga (boost bit-rate = less fussiness and pixels)
Go to [HKLM\Software\HTC\Camera\recparam\MP4VGA and replace the BitRate value with 4194304 (default value = 2097152)
this will increase your video quality from 2100avg bit-rate to 4500avg bit-rate, leave fps set to 30 as when detail is high in video it causes major fps loss, so with this ur camera will run better than ever and also have improved image quality while recording in MPEG4 vga mode, going any higher in bit-rate will cause slower fps and offer no additional improvement over my posted tweak
please keep in mind that video size increases approx 2times of the default settings, so a 10sec vid normally cost 2700kb while the tweak costs 5500kb
im working on 720p, micro-modes, bmp files and also increased video quality so keep looking for updates daily
ADDED:
19/12/09 = new cab for improve camera recording quality of mpeg4-vga
DAMIEN123_666 said:
2). unlock additional video modes
Go to [HKLM\Software\HTC\Camera\P2 and replave the EncodeFormat value with 2147483647
this will unlock all modes/resolutions listed below
Click to expand...
Click to collapse
Thanks Damien, but I'm not able to enter a 10 Digit Number in EncodeFormat. Only 8 digits are possible. Did you change the key type?
cyclingfan74 said:
Thanks Damien, but I'm not able to enter a 10 Digit Number in EncodeFormat. Only 8 digits are possible. Did you change the key type?
Click to expand...
Click to collapse
hi no its the same, should be a value : double word (decimal). u can use both sktools and memmaid to edit the value, what app are u using ?
I'm using Taskmanager v3.1 by FdcSoft
cyclingfan74 said:
I'm using Taskmanager v3.1 by FdcSoft
Click to expand...
Click to collapse
hi ive made a cab please use it for ease
Thanks, but I installed SKTools now. It worked. I mean, I could enter a 10-digit number at least. Let's see, if the tweak is working, too.
Yes it did!
I have tried all the new video modes but mpeg4 still gives best results?, does for me.
Wow, thanks for this great thread and useful hints! I'm really looking forward to 720p video recording! This would be awesome!!
jrvenge said:
I have tried all the new video modes but mpeg4 still gives best results?, does for me.
Click to expand...
Click to collapse
Normally mp4 will always give the best results.
menus are active, still don't understand the quality ... good for me anyway ;-)
Hey, great work. This thread is something I would like to see sticky or linked in the wiki.
I am unable to select anything other than JPEG and BMP format. It then greys out. The registry entry mentioned above was changed with the cab. Anyone tell me the default value for this so I can change it back? I cannot uninstall the cab as it is not listed in programs.
DAMIEN123_666 said:
hi ive made a cab please use it for ease
Click to expand...
Click to collapse
Hi,
Could you please detail what this cab changes? I installed it and now cannot select anything other than JPEG and BMP. It allows one change then greys out.
Thanks.
derta said:
Hey, great work. This thread is something I would like to see sticky or linked in the wiki.
Click to expand...
Click to collapse
i hope to so, i assume i have to earn this though
why
why will disabling touch focus improve quality?
why will disabling touch focus improve quality?
Click to expand...
Click to collapse
the focus on this camera for light is controlled by this option basically
touch focus = spot = the overall light of the picture is dictated by the spot u select to focus on
center focus = center picture = the overall light of the picture is dictated by the center light in the picture
average focus = the picture takes all light form around the image and averages it out for one even picture,
so basically if u take a picture of a object that gives off light like a tv or light or sumat like this the touch focus, focuses on that object and the rest of the picture will be over dark and maybe even black, when average focus is selected it evens it out so u get to see all the objects in the light and dark evenly
DAMIEN123_666 said:
the focus on this camera for light is controlled by this option basically
touch focus = spot = the overall light of the picture is dictated by the spot u select to focus on
center focus = center picture = the overall light of the picture is dictated by the center light in the picture
average focus = the picture takes all light form around the image and averages it out for one even picture,
so basically if u take a picture of a object that gives off light like a tv or light or sumat like this the touch focus, focuses on that object and the rest of the picture will be over dark and maybe even black, when average focus is selected it evens it out so u get to see all the objects in the light and dark evenly
Click to expand...
Click to collapse
The 3 modes all have their uses though, you need to work out when to use them. For example when taking a picture of a large plasma or LCD TV in the dark the touch focus is excellent. You end up with a very clear screen image and nothing else. If you try bto do the same with a 'better' camera phone, like a symbian you just cant get the same effect.
rovex said:
The 3 modes all have their uses though, you need to work out when to use them. For example when taking a picture of a large plasma or LCD TV in the dark the touch focus is excellent. You end up with a very clear screen image and nothing else. If you try bto do the same with a 'better' camera phone, like a symbian you just cant get the same effect.
Click to expand...
Click to collapse
very true matey, for general images of say out doors or portraits the setup on post one i made is by far the best option but if you do intend to take images of brighter objects touch focus will give better results if you only wanna focus on that object
play with the settings is all i can recommend
thx for the video cab, awesome!
SD Card Storage Capacity official update
@ DAMIEN : Hey mate, I better ask first than ask too late... Do you think these (Yours, also future) tweaks won't have problem with the official ones? I ask because there's another one out - SD Card Storage Capacity - from HTC. I guess it has nothing to do with the tweaks, but you know... Thx devilman
4). improve camera recording quality of mpeg4-vga (boost bit-rate = less fussiness and pixels)
Go to [HKLM\Software\HTC\Camera\recparam\MP4VGA and replace the BitRate value with 4194304
Go to [HKLM\Software\HTC\Camera\recparam\MP4VGA and replace the FrameRate value with 60
Click to expand...
Click to collapse
I accidentally set VSbitrate value to 4194304. could someone please provide me the original setting?...

EXIF info in pictures; nothing there!

Does any one know if the HD2 can save information into the EXIF data? And if so, how to enable it?
I had thought that EXIF was the standard that ALL cameras now used, even cr***y ones in mobile phones now that they are into megapixels.
I have found a registry entry HKEY_LOCAL_MACHINE\Software\HTC\Camera\Captparam\ExifInfo which shows merely the make, model and the next file name. BUT those are not even put into the EXIF which appears only to be used for GPS if you have the tweak installed that lets you take a photo as a GPS photo.
There is also HKEY_LOCAL_MACHINE\Software\HTC\FootCam\Captparam\ExifInfo which has only the make in it. THis looks like a future option, maybe for a second camera?
Finally HKEY_LOCAL_MACHINE\Software\HTC\HTCAlbum:gizmo_no_exif_thumb which only applies to Album.
There seems to be no way to do this and for me it is a very important thing, as I save and sort my pictures using the EXIF date taken. File dates are too risky as they sometimes get changed by copying or editing the file. I can stamp the photo with the date and time, so it is on the actual photo but that is pretty ugly.
When I took a file using GPS this is all there is in the EXIF
ExifOffset - 38
ExifVersion - 0210
InteroperabilityOffset - 68
GPS information: -
GPSLatitudeRef - N
GPSLatitude - 54 36 3.60
GPSLongitudeRef - W
GPSLongitude - 1 13 27.98
My LEO adds this information automaticaly - I did no changes in settings. Just in BsB Tweaks switched on "Hidden Camera Modes" and "Camera Superfine" - but I don't this that it is related with EXIF...
File: - \\\WinCE Device\Storage Card\My Documents\My POI\100MEDIA\GPS_IMAG0001.jpg
Make - HTC
Model - HTC_HD2
Orientation -
XResolution - 72
YResolution - 72
ResolutionUnit - Inch
Software - 6_26_19203026_00
DateTime - 2009:12:30 16:03:52
YCbCrPositioning - Centered
ExifOffset - 208
ExposureTime - 1/8.6 seconds
FNumber - 3.20
ExifVersion - 0220
DateTimeOriginal - 2009:12:30 16:03:52
DateTimeDigitized - 2009:12:30 16:03:52
ComponentsConfiguration - YCbCr
MaxApertureValue - F 3.03
LightSource - Other
Flash - Not fired, auto mode
FlashPixVersion - 0100
ColorSpace - sRGB
ExifImageWidth - 1552
ExifImageHeight - 2592
InteroperabilityOffset - 530
ExposureMode - Auto
White Balance - Auto
SceneCaptureType - Standard
Contrast - Normal
Saturation - Normal
Sharpness - Normal
SubjectDistanceRange - Macro
GPS information: -
GPSVersionID - 2.2.0.0
GPSLatitudeRef - N
GPSLatitude - "xxx" 2 17.20
GPSLongitudeRef - E
GPSLongitude - "xxx" 28 37.11
GPSAltitudeRef - Sea level
GPSAltitude - 382 m
GPSTimeStamp - 15 3 52
Thumbnail: -
Compression - 6 (JPG)
XResolution - 72
YResolution - 72
ResolutionUnit - Inch
JpegIFOffset - 898
JpegIFByteCount - 15554

[Q] Accelerometer question / algorithm

I want to detect different levels of acceleration in a vehicle. A requirement is a fixed mount in the vehicle. The mount can be mounted under any angle that is preferrable to the user. Also the mount doesn't have to face forward in alignment with the vehicle.
Now, what I've done so far is, calibrate the "stand still" situation, by reading the x, y, z g-forces of the accelerometer, during a certain amount of time, and then getting the averages of it. I will call these variables gBaseX, -Y & -Z
Once that is done, I want to calibrate the "straight line forward" situation, what I do there is show a screen with a button "start acceleration" and "end of acceleration". This now works by reading the accelerometer, directly subtracting the gBaseXY&Z. During the acceleration, I will search for the highest total G-force. When that's done I save the result in variables gAccelerationDirectionX, -Y & -Z.
Now comes the hard part: (And maybe I should ask this on a math forum or something anyone have suggestions?).
In the main logic of the app I want to use the gAccelerationDirectionX,Y&Z to
'rotate' the axis of my read actual values.
E.g. I have determined in my app that:
gBaseX = 0.15
gBaseY = -0.27
gBaseZ = -9.57
After that I accelerate over a straight line (having the phone mounted a weird angle) and I would get for instance:
gAccelerationDirectionX = -0.55
gAccelerationDirectionY = -0.70
gAccelerationDirectionZ = -0.03
When I move the phone in a straight line forward in the same position, I get those readings:
gReadX = -0.38 (After it's corrected with gBaseX)
gReadY = -0.94 (After it's corrected with gBaseY)
gReadZ = -0.27 (After it's corrected with gBaseZ)
How can I correct the "axis" of this? It must be a formula which use the gAccelerationDirectionX,Y&Z variables. I don't want to use anything like the phone orientation.
What the result must be is something like this:
gCorrectedX = 0 (meaning no left or right movement)
gCorrectedY = -? (meaning acceleration)
gCorrectedZ = 0 (meaning no up or downward movement)
I hope I've made myself clear
Please help on this algorithm.
The easiest way I can think of to do this would be to convert to a spherical coordinate system. Your reference acceleration vector will then be a magnitude and direction relative to the orientation of the reference frame by two angles. You can then convert any other acceleration vector back to a relative Cartesian system by normalizing your new vector with these reference angles.
See:
http://en.wikipedia.org/wiki/Spherical_coordinate_system
Why would you not use LBS (Location Based Services)? Very powerful stuff in there
There is really no such thing as "straight-line" movement...as infinitesimal as it seems, we are always moving in some type of arc. It's the result of living on a spherical object.
Some good reading here: http://en.wikipedia.org/wiki/Great-circle_distance
Calculating instantaneous speed is Calculus I reading. Calc I is why Jeff Gordon lost the Bristol race and Brad K. won it
Rootstonian said:
Why would you not use LBS (Location Based Services)? Very powerful stuff in there
Click to expand...
Click to collapse
Since the OP is using the accelerometers, I would assume that he or she needs a lot finer resolution than you can get with a GPS.
Rootstonian said:
Why would you not use LBS (Location Based Services)? Very powerful stuff in there
There is really no such thing as "straight-line" movement...as infinitesimal as it seems, we are always moving in some type of arc. It's the result of living on a spherical object.
Some good reading here: http://en.wikipedia.org/wiki/Great-circle_distance
Calculating instantaneous speed is Calculus I reading. Calc I is why Jeff Gordon lost the Bristol race and Brad K. won it
Click to expand...
Click to collapse
Oops. You added stuff. I imagine that the OP could safely ignore the earth's curvature in the sort of calculations I think he or she is trying to measure. I remember back in the 1980's when I used to drag race, there was a very expensive device that some racers used when the track was closed that could very accurately measure quarter mile times (as accurately as the traps at the track) all based on accelerometers.

Categories

Resources