Tuesday, June 19, 2018

Geotagging Nikon DSLR with Vectornav VN-200 GPS (Lattitude & Longitude) + IMU (Compass Heading)


GPS (Global Positioning System) refers to a system of satellites in earth orbit, which transmit signals to devices on the ground. GPS devices detect these signals and use them to triangulate their position, heading, speed, altitude and other information. This location information can be embedded in an image to show the photographer where the camera was when the photo was taken.

Recording GPS data can be useful for the travel photographer who is always shooting on location, to be able to go into the image metadata and see exactly where an image was captured. Some photographers like to keep track of their travels on a world map; and some websites and programs incorporate maps that let you view or categorize your photos by GPS location. This is known as geotagging.

Geotagging is great for photographers who like to share with fellow photographic enthusiasts exactly where they captured a specific image, so others can find that spot and make their own images of the same subject. We also know a few photographers who like to keep their favorite shooting spots a secret and won't divulge the GPS coordinates of these locations!

Nikon DSLR Camera are commonly deliver with a 10-pin remote terminal, are capable of automatically writting geo-refferential meta-data into image headers (Exif), known as "geo-tagging".

GPS module communicate using the NMEA 0813 standard (National Marine Electronics Association).  That standard allows one-way communication from a single  talker  (the GPS module)  to several  listeners  (making it possible to connect  in parallel  devices like cameras, display units, computers or microcontrollers).

Balanced lines are recommended but the standard also allows the simple RS232-level signals which Nikon uses.  Asynchronous serial communications is performed with no handshake at 4800 bauds, 8 data bits  (bit 7 being 0)  no parity and one stop bit.

This picture below show Icon "GPS" indicating that the GPS is connected. (top screen of the Nikon D800).


In the "Setup Menu" - "GPS" - "Position" of the camera, the last position, Altitude, Heading, and the current UTC from the GPS satellites time are displayed. You can choose to automatically sync the camera to the GPS time in the menu.




Vectornav VN-200 have an internal 3-axis Compass, so the heading information is provided into display. The 3-axis Compass provides accurate data even when tilted to various angles of all 3-axis.


Nikon would be able to display and record Heading information to the EXIF header if they receive NMEA data with a "$HCHDG" prefix sentences.

HCHDG - Compass output is used on Garmin etrex summit, vista , and 76S receivers to output the value of the internal flux-gate compass. Only the magnetic heading and magnetic variation is shown in the message.
  $HCHDG,101.1,,,7.1,W*3C

where:
     HCHDG    Magnetic heading, deviation, variation
     101.1    heading
     ,,       deviation (no data)
     7.1,W    variation

HDG Heading–Deviation and Variation
        1   2  3  4  5 6
        |   |  |  |  | |
$--HDG,x.x,x.x,a,x.x,a*hh
1) Magnetic Sensor heading in degrees
2) Magnetic Deviation, degrees
3) Magnetic Deviation direction, E = Easterly, W = Westerly
4) Magnetic Variation degrees
5) Magnetic Variation direction, E = Easterly, W = Westerly
6) checksum


User can also adding heading, pitch and roll (HPR) information to the EXIF header, but these information were not displayed into the Camera. User can read this information using software EXIF reader. This could be done if NIKON Camera receive NMEA data with a "$PTNTHPR"  prefix sentences.

HPR Transducer Measurements (proprietary data)

          1  2  3  4  5  6 7
          |  |  |  |  |  | |
$PTNTHPR,x.x,a,x.x,a,x.x,a*hh
1)Heading
2)N for Number
3)Pitch in degrees
4)N for Number
5)Roll in degrees
6)N for Number
7)checksum


To display and record Lattitude, Longitude, Altitude, and the current UTC from the GPS satellites time information to the EXIF header if NIKON Camera receive NMEA data with a "$GPRMC" and "$GPGGA" prefix sentences.

GGA - essential fix data which provide 3D location and accuracy data.
 $GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47

Where:
     GGA          Global Positioning System Fix Data
     123519       Fix taken at 12:35:19 UTC
     4807.038,N   Latitude 48 deg 07.038' N
     01131.000,E  Longitude 11 deg 31.000' E
     1            Fix quality: 0 = invalid
                               1 = GPS fix (SPS)
                               2 = DGPS fix
                               3 = PPS fix
                               4 = Real Time Kinematic
                               5 = Float RTK
                               6 = estimated (dead reckoning) (2.3 feature)
                               7 = Manual input mode
                               8 = Simulation mode
     08           Number of satellites being tracked
     0.9          Horizontal dilution of position
     545.4,M      Altitude, Meters, above mean sea level
     46.9,M       Height of geoid (mean sea level) above WGS84
                      ellipsoid
     (empty field) time in seconds since last DGPS update
     (empty field) DGPS station ID number
     *47          the checksum data, always begins with *


If the height of geoid is missing then the altitude should be suspect. Some non-standard implementations report altitude with respect to the ellipsoid rather than geoid altitude. Some units do not report negative altitudes at all. This is the only sentence that reports altitude.

RMC - NMEA has its own version of essential gps pvt (position, velocity, time) data. It is called RMC, The Recommended Minimum, which will look similar to:
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A

Where:
     RMC          Recommended Minimum sentence C
     123519       Fix taken at 12:35:19 UTC
     A            Status A=active or V=Void.
     4807.038,N   Latitude 48 deg 07.038' N
     01131.000,E  Longitude 11 deg 31.000' E
     022.4        Speed over the ground in knots
     084.4        Track angle in degrees True
     230394       Date - 23rd of March 1994
     003.1,W      Magnetic Variation
     *6A          The checksum data, always begins with *


At least NIKON Camera receive NMEA data with 3 prefix sentences, $GPGGA, $GPRMC, "$HCHDG" for geotagging images. Below the examples of streaming NMEA data from GPS to NIKON Camera.








Keywords: Geotagging, geo-tagging, Nikon, DSLR, D800, D810, Heading, NMEA, $GPGGA, $GPRMC, $HCHDG, $PTNTHPR, Exif header, VN-200, Vectornav.



38 comments:

  1. Hi! very interesting post! We are trying to connect a XNAV nmea output to a nikon camera and nikon cannot get position. Baud rate is 4800 and we have GPGGA, GPZDA y GPRMC nmea messages available (not $HCHDG, $PTNTHPR, but we don't need heading). Do you know if nikon needs $HCHDG, $PTNTHPR as a must to get position and write it to exif's photograpy?

    ReplyDelete
    Replies
    1. $HCHDG is not mandatory to write position on exif's image.
      You need to make sure GPGGA and GPRMC are streamed on the serial TTL to nikon cable. Your XNAV modules maybe send serial RS-232 voltage level, so you need to convert it to serial TTL voltage level.

      Delete
  2. I found the problem! I can enable GPRMC messages on xNAV control software but although enabled, it is not sending GPRMC messages (and I have asked to oxts, my model cannot send GPRMC messages), my xNAV model only sends GPGGA and GPZDA messages. Thanks a lot for your post and reply!!!

    ReplyDelete
  3. We are going to purchase a VN-200 but according VN-200 user's manual it's minimum baud rate is 9600. However, nikon cameras need 4800bps. How did you manage to get 4800bps from Vectornav VN-200 ? Thanks a lot!!!

    ReplyDelete
    Replies
    1. You can add Arduino Nano to downrate the baudrate, and also to convert the roll, pitch, yaw data from VN-200 to $HCHDG format.

      Delete
  4. I would like to use the opportunity of saying thanks to you for your professional direction I have constantly enjoyed checking out your site. We are looking forward to the particular commencement of my college research and the entire preparing would never have been complete without visiting your site. If I may be of any assistance to others, I’d personally be happy to help as a result of what I have learned from here. link

    ReplyDelete
  5. I cannot thank you fully for the blogposts on your web page. I know you placed a lot of time and effort into all of them and hope you know how considerably I appreciate it. I hope I will do precisely the same for another individual at some point. Palm Beach Condos try here

    ReplyDelete
  6. My spouse and i got so joyous Edward could carry out his investigation through the entire ideas he came across while using the weblog. It is now and again perplexing to just always be giving for free techniques which usually others might have been selling. We really remember we’ve got you to appreciate for this. The main explanations you’ve made, the easy website navigation, the relationships your site aid to create - it’s got mostly wonderful, and it is aiding our son in addition to the family feel that this issue is exciting, which is certainly very fundamental. Thank you for all the pieces! his comment is here

    ReplyDelete
  7. so… facebook recommended me the pages “food” and “eating” ,,, yeah I’m obese|HasmAttack| browse around this web-site

    ReplyDelete
  8. Spot on with this write-up, I really assume this website needs much more consideration. I’ll probably be once more to read far more, thanks for that info. read the article

    ReplyDelete
  9. Hello there, just became aware of your blog through Google, and found that it is truly informative. I am going to watch out for brussels. I will appreciate if you continue this in future. A lot of people will be benefited from your writing. Cheers! Discover More Here

    ReplyDelete
  10. I discovered your blog internet site on bing and appearance several of your early posts. Preserve up the very good operate. I just now additional the RSS feed to my MSN News Reader. Seeking toward reading far more on your part down the road!… Our site

    ReplyDelete
  11. There is noticeably a bundle comprehend this. I suppose you made specific nice points in functions also. This Site

    ReplyDelete
  12. Generally I don’t read article on blogs, but I would like to say that this write-up very compelled me to try and do so! Your writing style has been amazed me. Thanks, very great post. original site

    ReplyDelete
  13. Youre so cool! I dont suppose Ive read anything in this way before. So nice to uncover somebody with some original ideas on this subject. realy appreciate starting this up. this excellent website is something that is needed over the internet, a person if we do originality. valuable work for bringing something new towards the web! find more info

    ReplyDelete
  14. Great post man, keep the nice work, just shared this with the friendz their explanation

    ReplyDelete
  15. Some genuinely superb blog posts on this website , regards for contribution. view website

    ReplyDelete
  16. Hello there! I could have sworn I’ve been to this blog before but after checking through some of the post I realized it’s new to me. Anyhow, I’m definitely glad I found it and I’ll be bookmarking and checking back frequently! view publisher site

    ReplyDelete
  17. I was trying to find this. Really refreshing take on the information. Thanks a lot. my response

    ReplyDelete
  18. I am definitely bookmarking this website and sharing it with my acquaintances. You will be getting plenty of visitors to your website from me here

    ReplyDelete
  19. I discovered your blog site site on the search engines and check several of your early posts. Always maintain up the very good operate. I recently additional increase Rss to my MSN News Reader. Looking for toward reading much more on your part later on! go to my site

    ReplyDelete
  20. Wow, superb weblog structure! How long have you been blogging for? you make blogging glance easy. The total look of your web site is excellent, neatly as the content material! his explanation

    ReplyDelete
  21. Some really interesting info , well written and broadly speaking user pleasant. check my site

    ReplyDelete
  22. Amazing this hit it at the dot we will post to Bebo and also Fb was great view website

    ReplyDelete
  23. I adore foregathering useful info, this post has got me even more info! . try here

    ReplyDelete
  24. Greetings! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My weblog looks weird when viewing from my iphone. I’m trying to find a template or plugin that might be able to fix this problem. If you have any recommendations, please share. Appreciate it! try here

    ReplyDelete
  25. I have not checked in here for a while as I thought it was getting boring, but the last few posts are good quality so I guess I¡¦ll add you back to my daily bloglist. You deserve it friend more tips here

    ReplyDelete
  26. Thank you for sharing with us, I conceive this website really stands out : D. more information

    ReplyDelete
  27. Spot on with this write-up, I truly assume this website wants much more consideration. probably be again to read much more, thanks for that info. additional reading

    ReplyDelete
  28. I completely understand everything you have said. Actually, I browsed through your additional content articles and I think you happen to be absolutely right. Great job with this online site. more tips here

    ReplyDelete
  29. When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get three emails with the same comment. Is there any way you can remove me from that service? Cheers! This Site

    ReplyDelete
  30. Sites we Like…… [...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose [...]…… site link

    ReplyDelete
  31. Keep up the fantastic piece of work, I read few blog posts on this web site and I believe that your site is real interesting and has lots of great information site link.

    ReplyDelete
  32. We clean up on completion. This may sound obvious but not many a plumber in Sydney does. We wear uniforms and always treat your home or office with respect. view website

    ReplyDelete
  33. Hello There. I found your blog using msn. This is an extremely well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. I’ll certainly comeback my site.

    ReplyDelete
  34. You wouldn’t feel it but I’ve wasted all day digging for some articles about this. You might be a lifesaver, it was an excellent read and has helped me out to no end. Cheers! find more info

    ReplyDelete
  35. I like this website its a master peace ! Glad I found this on google . view publisher site

    ReplyDelete