GPS - alanbjohnston/CubeSatSim GitHub Wiki

You can connect a GPS module to the CubeSatSim, and if it has a good view of the sky, it can get its exact latitude and longitude for APRS packets!

The CubeSatSim v2.2 software supports a GPS sensor. It can be added to the Main board and read by the Raspberry Pi Pico microcontroller.

If you have a Lite board, a GPS can be connected to it and read by the Raspberry Pi Zero 2.

GPS Modules

First, you need a serial GPS module. For example, these ones work:

https://www.amazon.com/HiLetgo-GY-NEO6MV2-Controller-Ceramic-Antenna/dp/B01D1D0F5M

https://www.amazon.com/dp/B09LQDG1HY

Three wires are needed to be wired to J12 on the Main PCB or Lite PCB.

  3.3V <-> supplies power to the GPS module on Vcc pin.
  GND <-> ground for the power to the GPS module on GND pin.
  RXD <-> connected to the Transmit data TX pin of the GPS module.

If you are using the Lite Board, a USB GPS module could be connected to the Pi Zero 2 and used.

Main Board

This section describes how to test your GPS module wired to the Main board. If your GPS is wired to the Lite board, see the next section.

Once you wire it up to J12, the best way to test the GPS sensor is to connect a micro USB cable to the Raspberry Pi Pico and use the Arduino IDE Serial Monitor to see the GPS messages.

Alternatively, you can log into the Pi Zero 2 and type the command CubeSatSim/config -p to see the coordinates listed after “GPS”

The GPS antenna will need to either be outdoors with a good view of the sky or near a window. It can take up to 15 minutes for a GPS module to get a location lock. Many GPS modules have a “lock” LED which illuminates or blinks when it has a good location.

You will see GPS messages and eventually the three numbers after GPS will be non-zero.

The GPS coordinates will then be used in APRS packets.

Lite Board

First, make sure GPS is enabled on the Pi Zero 2 by typing CubeSatSim/config -u The default gpsd configuration will work for many GPS serial modules wired to J12. If yours uses a different bps than 9600, then you might need to edit the gaps configuration file using the command sudo nano /etc/defaults/gpsd

To see if your GPS module is wired up correctly, type the gpsmon command in the Pi Zero 2 and you should get a display similar to below that updates about every second:

You won't get a latitude (Lat: n/a) or longitude (Lon: n/a) displayed until your GPS has a good view of the sky and has been powered up for about 15 minutes.

Here's what gpsmon looks like when it has a lock:

Receiving APRS Packets with GPS

Make sure the CubeSatSim is in APRS mode using the pushbutton (press and hold until the green LED blinks once then release) or typing the command CubeSatSim/config -a

Your receiver should be tuned to 434.9 MHz, unless a different frequency has been set on your CubeSatSim.

If you decode the APRS packet, you will initially see GPS 0.0 0.0 0.0 in the telemetry string in the Comment column. The APRS packet will have a default location of Washington, D.C.

When the GPS module has a lock (typically after 15 minutes outside with a good view of the sky), the latitude, longitude and altitude will replace the three zeros. At this point, the APRS packet will have the GPS location.

Here's how the packets will look in OpenWebRX WebSDR:

If you click on the satellite icon in the Coord column, OpenWebRX will pull up a map. If the location shows Washington, DC, that is the default coordinates which are not from the GPS. Instead, you should be mapped to the latitude and longitude in the GPS string.

If you are using Direwolf, the latitude and longitude will be decoded and displayed in degrees and fractional minutes:

Other APRS decoders such as Sound Modem or Qtmm AFSK 1200 Decoder can also be used.