X893

DIY DGPS - Step 1 - Prepare server

1. Create a database with records of CAS and STR and fast service broadcast RTCM. The schema is very simple.

Database schema

2. Simple console program (C# .NET 2.0) collects CAS and STR records to database.

Collection program

I used the site http://rtcm-ntrip.org:2101 as root site.
The total number of unique CAS records (servers) = 280. The total number of STR records = 8822.
For DGPS support, I use only RTCM 2/3 mountpoints = 6934 records.


3. Query to find the STR channel using coordinates (also possible to use the Cell ID data from GSM module and opencellid to approximate the coordinates.)

declare @Latitude real, @Longitude real
select  @Latitude = 55.5, @Longitude = 36.7
select
  dbo.GeoDistance(S.Latitude, S.Longitude, @Latitude, @Longitude) AS Distance,
  S.Mountpoint,C.Host,C.Port,
  S.NMEA, S.NavSystem, S.Format, S.FormatDetails, S.Fee, S.Authentication,
  isnull(isnull(S.Username,C.Username),'') as [Username],
  isnull(isnull(S.Password,C.Password),'') as [Password]
from
  [STR] as S, [CAS] as C
where
    ([Latitude] is not null)
and ([Longitude] is not null)
and (Latitude between (@Latitude - 4.0) and (@Latitude + 4.0))
and (Longitude between (@Longitude - 4.0) and (@Longitude + 4.0))
and (dbo.GeoDistance(Latitude,Longitude, @Latitude, @Longitude) < 500000.0)
and (C.[UID] = S.[CASID])
order by Distance asc

Distance(m) Latitude Longitude Mountpoint Host             Port NMEA NacSystem Format   Format-Details             Fee Authentication
4388.535    55.52    36.76     ZWE20      139.17.3.112     4080 0    GPS       RTCM3.0  1004(1),1006(10),1007(10)  N   B
178066.1    56       34        56N034E    www.egnos-ip.net 2101 0    GPS       RTCM 2.0 1(1.8),3(180)              N   B
329013.8    53       34        53N034E    www.egnos-ip.net 2101 0    GPS       RTCM 2.0 1(1.8),3(180)              N   B
422100.1    59       34        59N034E    www.egnos-ip.net 2101 0    GPS       RTCM 2.0 1(1.8),3(180)              N   B

4. Use the first two entries (4.5 km and 178 km). To receive data from Mountpoint must have a name and password.

To be continued ...

0 comment(s) so far

Post your comment

Thanks for your comments

  • Comment

Github
Bitbucket
SF.net

Skype
Telegram

Subscribe to x893 blog Subscribe