This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC430F5137: Creating a local database to store GPS information and reading the same using CC430F5137

Part Number: CC430F5137


Tool/software: Code Composer Studio

Hi,

I have been working with CC430 Sub-GHz module to wirelessly transmit the GPS data on to the receiver. The system requires automatic setting on the receiver side based on the location coordinates received.

Can anyone please let me know if there is a method to create a database of coordinates and to read from it using the MCU.

Thanks ,

Sushmitha R

  • Can you be more clear? Were do you want to store the "database" ? Do you just need to store a single location in non-volatile storage? If not, how many locations do you need to store?
  • Hi Keith,

    Thank you for your reply. The database must be such that it must be retrievable from within the code for the system to compare the latitude - longitude values received from the GPS, against the values in the database.

    Yes I would want it to be a non-volatile storage since it is a static data.Also storing around 15 locations would be sufficient.

    Thanks and regards,

    Sushmitha R

  • When you have fifteen predetermined locations, you could just store them in an array:

    struct location {
        float lon;
        float lat;
        const char *name;
    };
    
    static const struct location locations[15] = {
        { .lon = 12.345, .lat = 34.567, .name = "here"  },
        { .lon = 23.456, .lat = 45.678, .name = "there" },
        ...
    };

    Why are you calling it "database"? Do you need to do anything special with the data? Do you need any operation except searching for the nearest location? Is there any reason such a constant array would not work?

  • Hi,

    Thank you very much.Initial assignment was to include location coordinates of at least 30 locations.Hence to shorten the code length I felt a dedicated storage would be better.

    I will incorporate your logic for 15 locations and try the output.

    Thanks and regards,

    Sushmitha R

**Attention** This is a public forum