GPS satellites count

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
fagci
Posts: 80
Joined: 03 Feb 2017 13:06
Location: Novosibirsk, RU
Contact:

GPS satellites count

Post by fagci » 26 Feb 2017 08:15

How can I get this?

Best regards.
All systems nominal.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: GPS satellites count

Post by Martin » 26 Feb 2017 22:17

Hi,

The variable satellites of trigger GPS Status Event should allow to determine this information.

Regards,
Martin

User avatar
fagci
Posts: 80
Joined: 03 Feb 2017 13:06
Location: Novosibirsk, RU
Contact:

Re: GPS satellites count

Post by fagci » 27 Feb 2017 01:38

Wow! So informative information about satellites here!
I think it is about status only.

TY, Martin!
All systems nominal.

ewill
Posts: 67
Joined: 20 Jul 2015 16:42

Re: GPS satellites count

Post by ewill » 02 Mar 2017 15:05

Is there a formula that you could suggest for getting the number of satellites used in fix?

Thank you in advance for the assistance.

User avatar
fagci
Posts: 80
Joined: 03 Feb 2017 13:06
Location: Novosibirsk, RU
Contact:

Re: GPS satellites count

Post by fagci » 02 Mar 2017 16:44

Code: Select all

uif = 0;

satellitesList = newList();

for(s in satellites) {
  p = split(s, ';');
  satellite = newMap();
  for(pv in p) {
    kv = split(pv, '=');
    satellite[kv[0]] = eval(kv[1]);
  }
  addElement(satellitesList, satellite);
}
log(satellitesList);
for(s in satellitesList) {
  if(s['used_in_fix']) uif = uif + 1;
}

log(uif);
maybe eval() isn't necessary
All systems nominal.

ewill
Posts: 67
Joined: 20 Jul 2015 16:42

Re: GPS satellites count

Post by ewill » 02 Mar 2017 17:17

Thank you very much for the assistance. I didn't realize that it would be that complex.

User avatar
fagci
Posts: 80
Joined: 03 Feb 2017 13:06
Location: Novosibirsk, RU
Contact:

Re: GPS satellites count

Post by fagci » 02 Mar 2017 17:29

You can do it with fromJSON(), but it more complex...

If you want only satellites used in fix, you can use something like if(search(s, 'used_in_fix=true')){}
All systems nominal.

Post Reply