[6D] GPS / experimental module (update: 6D.116 support)

Started by Maqs, March 27, 2014, 02:19:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Maqs

Hello,

I did a bit of GPS reverse engineering, resulting in the following experimental module that makes GPS accessible:



Module: gpsinfo.mo
Source: gpsinfo.zip

The compiled version only works for 6D.113 and 6D.116, but may work with any camera that supports built-in or external GPS. See source code (gpsinfo.c) for more information. I had to redefine both _prop_request_change and _prop_cleanup, as they are not exported and the ML core wrappers available do not work for that purpose. Therefore, the module refuses to run on other cameras/firmware versions.

The more adventurous among you with other cameras may try to point the two functions to the respective functions in your firmware, add is_camera("<your camera>", "<your firmware version>"), rebuild the module and run it at your own risk. Remember: your camera may blow up, come to life or other strange things.

You need to press set on one of the informational entries to update stuff, although the data will only be updated every "GPS refresh interval" internally in the hardware responsible. The GPS related properties I found are in gpsinfo.h.

Best,
Marcus

PS: I just wanted to share what I've done so far. Feel free to improve stuff, ask questions etc.
PSS: The module is now called "gpsinfo.mo", as objects with the same name as core objects will result in modules without any symbols being built.

a1ex

Nice findings!

This actually gave me an idea for how to register module-only properties (so you will not have to redefine the property stubs). Current implementation of re-registering all core properties had the side effect of re-triggering the handlers without the values being changes (which resulted in subtle bugs like microphone notifications popping when loading the modules), but registering a second set of module-only properties should be fine.

Audionut

Bumping this into the module section for increased exposure.

Marsu42

Quote from: Maqs on March 27, 2014, 02:19:26 PM
PS: I just wanted to share what I've done so far. Feel free to improve stuff, ask questions etc.

Great you're on it :-) ... I hope we can get some basic gps tracking with that, i.e. save the current position and then be guided back ("car finder mode")!

Fyi, here are some other gps-releated ideas if you didn't see them: http://www.magiclantern.fm/forum/index.php?topic=10663.0 (basically 1. complete geocaching mode and 2. gps power save = lengthen interval on camera idle)

Maqs

Quote from: Marsu42 on March 28, 2014, 07:23:29 AM
Great you're on it :-) ... I hope we can get some basic gps tracking with that, i.e. save the current position and then be guided back ("car finder mode")!

Fyi, here are some other gps-releated ideas if you didn't see them: http://www.magiclantern.fm/forum/index.php?topic=10663.0 (basically 1. complete geocaching mode and 2. gps power save = lengthen interval on camera idle)

To 2.: I've included a 10 min./30 min. option in the menu. The Canon menu still works (aka does not crash), but does not highlight a value.

As far as I can see, we do not get any directional data, although there are props for something called GPS_COMPAS (sic!), too:

There is
#define PROP_GPS_COMPAS 0x80030053
#define PROP_GPS_COMPAS_REQUEST 0x8003005A
#define PROP_GPS_COMPAS_SELECT 0x80040043


PROP_GPS_COMPAS should contain the data (in case it's available on the 6D and once we know how to trigger it), PROP_GPS_COMPAS_REQUEST should be used to request it and PROP_GPS_COMPAS_SELECT is used from some GUI function "SetGPSCompassToStorage". There is no "SetGPSCompassToWinSystem" however, like it is for most other things ("SetSateliteStatusToWinSystem", "SetGPSSelectToWinsystem", ...).

It should be possible to compute directional data for moving cameras though...  ;)

Marsu42

Concerning the power save: My idea was a smoother transition from the fastest logging interval when the camera is in active use to the slowest one over time. I didn't know how much power this really saves though and if this option is "worth it".

Quote from: Maqs on March 28, 2014, 08:17:16 AM
As far as I can see, we do not get any directional data, although there are props for something called GPS_COMPAS (sic!), too

This is for the external gps unit that has a compass to log in which direction you're pointing the camera - good ol' Canon chose to cut that feature from the 6d...

... what I was talking about with "direction" is the difference between two sets of gps coordinates, i.e. the said "car finder mode". I don't have a clue about geo calculations, but alex wrote it would be easy to get some result like "1500m NW".

With the 6d lacking a compass you of course need to know where NW is yourself or as you wrote (and like my dedicated gps tracker does) let the 6D calculate the direction you're moving from the diff of the last two coordinate sets.

Michael Zöller

Any chance we can read out GPS time? :)
QuoteGPS time is theoretically accurate to about 14 nanoseconds. However, most receivers lose accuracy in the interpretation of the signals and are only accurate to 100 nanoseconds.
neoluxx.de
EOS 5D Mark II | EOS 600D | EF 24-70mm f/2.8 | Tascam DR-40

Pelican

Quote from: Michael Zöller on March 28, 2014, 02:14:32 PM
Any chance we can read out GPS time? :)

I see a date/time on the first pic and I guess that is from the GPS. Also there is Set time from GPS probably means the same.
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

Maqs

We can read out the time, but it's not that accurate. The hardware interfacing the GPS unit is updating the data every x seconds (as set in the respective property), but does not tell us anything unless we ask for it every time. The original firmware uses a timer to query the property every x seconds. But there is a feature to automatically update the system time from GPS already in the Canon firmware. This may use other props, but I still don't know if it would me more accurate.

There are still some other/unknown fields in the 128-byte long PROP_GPS_INFORMATION property.

walterono

hi
I'm a newbie, pls forgive my ignorance ...
1. Does the GPS module have a provision for turning the GPS off when the camera is turned off and will it work with the latest firmware (114)? Because I didn't see it in the screenshot.
2. On the home page the 6D is listed as one of the supported cameras, but on the download page for stable version 2.3 it isn't. What gives?
3. Assuming there is a build I can download for my 6D, would I download that and the GPS module as well?

Frankman

How can I get the "GPS.mo" work on my Canon EOS 1100d ?
When I load the Module in the latest Nightly Build, I get the error message " only for 6D".

Did somebody compile it for 1100D ?

(I want to try it with Solmeta Geotagger Pro2 EOS.)

Regards
Frank