Windows Elapsed Distance Sim Issue

JF,

If you Simulate the data, then start the timer, the distance values will work correctly. If you do the steps in the reverse order it will display the 0.00 value that you have experienced.


Hi, thanks for trying to reproduce the problem.

On my PC, I get a different behaviour from your simulator:

1. Run the program
2. The output starts at "null"
3. Simulation -> FIT Data -> Simulate data
4. Output continues at "null"
5. Click the start activity button on the watch
6. Output will be some kind of distance, but then doesn't change (the output is always the same distance forever)

Next try, reversing the order:

1. Run the program
2. The output starts at "null"
3. Click the start activity button on the watch
4. Output is "0.0000"
5. Simulation -> FIT Data -> Simulate data
6. Output remains at "0.0000"

It seems the simulator gets stuck on the first distance reported by the data feed, but never updates afterwards...


Regards,
JF
  • I moved this post from the other thread because the issue is slightly different though related and it is a different development environment. This will help us better track the issues. I did see a ticket that closely reflects this issue, but it had been resolved. I'm opening a new ticket to investigate this as well. I should note that I don't get the same behavior if I "Simulate" the data, but I do see similar behavior if I use Simulation>FIT Data> Playback. The ticket will be to address that unless I can reproduce what you are seeing.

    Thanks,
    Coleman
  • I cannot reproduce this problem using the following code..

    class MyView extends Ui.SimpleDataField
    {
    function initialize(model) {
    SimpleDataField.initialize();
    }

    function onLayout(dc) {
    Sys.println("onLayout");
    }

    function onTimerStart() {
    Sys.println("onTimerStart");
    }

    function onTimerStop() {
    Sys.println("onTimerStop");
    }

    function onTimerPause() {
    Sys.println("onTimerPause");
    }

    function onTimerResume() {
    Sys.println("onTimerResume");
    }

    function onTimerReset() {
    Sys.println("onTimerReset");
    }

    function onTimerLap() {
    Sys.println("onTimerLap");
    }

    function compute(info) {
    Sys.println(info.elapsedDistance);
    return info.elapsedDistance;
    }
    }


    I was running the program according to your instructions above. Here is the output if I simulate data, start the activity, stop the activity, and then stop simulating...

    Device id 1 name "A garmin device"
    Shell Version 0.1.0
    null
    null
    null
    null
    null
    null
    null
    onTimerStart
    8.430859
    16.975500
    25.651262
    34.426178
    52.164013
    61.017395
    69.931488
    78.837990
    87.608803
    onTimerStop
    96.538239
    96.538239
    96.538239
    96.538239
    96.538239
    96.538239
    96.538239
    96.538239
    96.538239
    Complete
    Connection Finished


    Here is the output if I start the activity, start simulating data, stop simulating data, and then stop the activity...

    Device id 1 name "A garmin device"
    Shell Version 0.1.0
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    null
    onTimerStart
    null
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    18.815382
    28.135361
    37.358524
    46.733978
    56.260178
    75.231293
    84.684334
    93.983940
    93.983940
    93.983940
    93.983940
    93.983940
    93.983940
    onTimerStop
    93.983940
    93.983940
    93.983940
    Complete
    Connection Finished


    I was able to reproduce something like you are describing, but only if I failed to save or discard my previous recording. To reproduce the behavior I'm seeing

    • Run the program under the simulator (you'll see 'null' in the output window).
    • Start the device timer (Data Field > Timer > Start Activity from the menu or click the Start/Stop button on the simulated device).
    • You will see 0.00 on the simulated device screen.
    • Stop the device timer (Data Field > Timer > Stop Activity from the menu or click the Start/Stop button on the simulated device).
    • Kill the simulator (CTRL+K or File > Kill App from the menu).
    • Run the program under the simulator (you'll see 'null' in the output window).
    • Start simulating data (Simulation > FIT Data > Simulate Data).


    I'm hoping that this isn't your issue as the solution is to just start the activity again.
  • Hi,

    Update: problem still persists in connectiq-sdk-mac-2.2.2.

    Slight difference when testing with simulated data (instead of .fit playback). After clicking the start button, the elapsed distance does change, but starts with a garbage value. Here's an example:

    null
    null
    null
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    0.000000
    4329882.500000
    4329891.000000
    4329899.500000
    4329908.000000
    4329916.000000
    4329924.000000
    4329932.000000
    4329940.000000
    4329948.000000


    In the above output, null is before I click the start button. When I start the activity, it goes to 0.00000. Then, I select data simulation and get those weird values.

    Regards,
    JF
  • Actually the distance you see may not be crazy. It depends on how long you had the simulor running with "simulated data".

    When you first start "simulated data", the distance is 0. But keeps increasing, and I've seen it go at 20mph.

    So, an hour after starting the "simulate data" starts, if you run your app and press start, the first real distance could be 20 miles (in meters).

    And if you'd been simulating data for a day or two, the first distance could get quite large.
  • Former Member
    Former Member over 8 years ago
    The simulated values don't store distance. They provide speed/location/ect to the activity processing module, which computes distance, so you should not see a distance jump if you run simulation for a period of time before starting the timer.

    We currently still have the bug described in this thread. When you start simulation with the activity timer already active, the activity module is processing an invalid location, which causes a massive distance offset to the first valid location. We have not yet been able to correct this issue. The suggested workaround is to start simulation before starting the activity timer. Distance should behave properly if you do this.
  • Brain - maybe I was thinking of the old simulated data (the two minute loop), as I just tried it and the distance did reset!
  • The suggested workaround is to start simulation before starting the activity timer. Distance should behave properly if you do this.


    I confirm this works.

    Using a recorded FIT file form my Fenix 3 watch displays 0.0000 if I start the activity before loading the file, and a very large distance if I load then start (the strange distance then always remains the same).

    Regards,
    JF